Merge lp:~openerp-dev/openobject-addons/trunk-account-project-move-cod into lp:openobject-addons
- trunk-account-project-move-cod
- Merge into trunk
Status: | Work in progress |
---|---|
Proposed branch: | lp:~openerp-dev/openobject-addons/trunk-account-project-move-cod |
Merge into: | lp:openobject-addons |
Diff against target: |
6946 lines (+2838/-2691) 115 files modified
account/__init__.py (+1/-1) account/__openerp__.py (+1/-17) account/account_analytic.py (+37/-0) account/account_analytic_line.py (+2/-1) account/account_analytic_view.xml (+159/-0) account/demo/account_minimal.xml (+6/-6) account/partner_view.xml (+2/-2) account/project/__init__.py (+0/-28) account/project/analytic_account_demo.xml (+0/-235) account/project/project.py (+0/-50) account/project/project_demo.xml (+0/-15) account/project/project_report.xml (+0/-54) account/project/project_view.xml (+0/-372) account/project/report/__init__.py (+0/-29) account/project/report/analytic_balance.py (+0/-157) account/project/report/analytic_journal.py (+0/-68) account/project/report/cost_ledger.py (+0/-111) account/project/report/inverted_analytic_balance.py (+0/-130) account/project/report/quantity_cost_ledger.py (+0/-127) account/project/views/report_analyticbalance.xml (+0/-62) account/project/views/report_analyticcostledger.xml (+0/-90) account/project/views/report_analyticcostledgerquantity.xml (+0/-87) account/project/views/report_analyticjournal.xml (+0/-90) account/project/views/report_invertedanalyticbalance.xml (+0/-91) account/project/wizard/__init__.py (+0/-30) account/project/wizard/account_analytic_balance_report.py (+0/-55) account/project/wizard/account_analytic_balance_report_view.xml (+0/-46) account/project/wizard/account_analytic_chart.py (+0/-49) account/project/wizard/account_analytic_chart_view.xml (+0/-43) account/project/wizard/account_analytic_cost_ledger_for_journal_report.py (+0/-54) account/project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml (+0/-44) account/project/wizard/account_analytic_cost_ledger_report.py (+0/-54) account/project/wizard/account_analytic_cost_ledger_view.xml (+0/-43) account/project/wizard/account_analytic_inverted_balance_report.py (+0/-52) account/project/wizard/account_analytic_inverted_balance_report.xml (+0/-43) account/project/wizard/account_analytic_journal_report.py (+0/-74) account/project/wizard/account_analytic_journal_report_view.xml (+0/-51) account/project/wizard/project_account_analytic_line.py (+0/-57) account/project/wizard/project_account_analytic_line_view.xml (+0/-34) account/report/account_analytic_entries_report.py (+2/-2) account/report/account_analytic_entries_report_view.xml (+2/-2) account/security/account_security.xml (+1/-1) account/security/ir.model.access.csv (+3/-3) account/test/account_fiscalyear_close.yml (+1/-1) account/test/account_report.yml (+10/-10) account_analytic_analysis/account_analytic_analysis_view.xml (+17/-2) account_analytic_analysis/analytic_account_demo.xml (+6/-6) account_analytic_plans/test/acount_analytic_plans_report.yml (+3/-2) account_budget/account_budget_demo.xml (+17/-17) account_budget/test/account_budget.yml (+2/-2) account_budget/test/account_budget_report.yml (+1/-1) account_voucher/test/case1_usd_usd.yml (+1/-1) account_voucher/test/case1_usd_usd_payment_rate.yml (+1/-1) account_voucher/test/case2_suppl_usd_eur.yml (+2/-2) account_voucher/test/case2_usd_eur_debtor_in_eur.yml (+2/-2) account_voucher/test/case2_usd_eur_debtor_in_usd.yml (+2/-2) account_voucher/test/case3_eur_eur.yml (+1/-1) account_voucher/test/case4_cad_chf.yml (+1/-1) account_voucher/test/case5_suppl_usd_usd.yml (+2/-2) account_voucher/test/case_eur_usd.yml (+1/-1) analytic/__init__.py (+2/-1) analytic/__openerp__.py (+19/-2) analytic/project/__init__.py (+27/-0) analytic/project/analytic_account_demo.xml (+235/-0) analytic/project/project.py (+41/-0) analytic/project/project_demo.xml (+15/-0) analytic/project/project_report.xml (+55/-0) analytic/project/project_view.xml (+309/-0) analytic/project/wizard/__init__.py (+30/-0) analytic/project/wizard/account_analytic_balance_report.py (+57/-0) analytic/project/wizard/account_analytic_balance_report_view.xml (+46/-0) analytic/project/wizard/account_analytic_chart.py (+49/-0) analytic/project/wizard/account_analytic_chart_view.xml (+35/-0) analytic/project/wizard/account_analytic_cost_ledger_for_journal_report.py (+54/-0) analytic/project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml (+44/-0) analytic/project/wizard/account_analytic_cost_ledger_report.py (+54/-0) analytic/project/wizard/account_analytic_cost_ledger_view.xml (+43/-0) analytic/project/wizard/account_analytic_inverted_balance_report.py (+52/-0) analytic/project/wizard/account_analytic_inverted_balance_report.xml (+43/-0) analytic/project/wizard/account_analytic_journal_report.py (+75/-0) analytic/project/wizard/account_analytic_journal_report_view.xml (+35/-0) analytic/project/wizard/project_account_analytic_line.py (+57/-0) analytic/project/wizard/project_account_analytic_line_view.xml (+34/-0) analytic/report/__init__.py (+29/-0) analytic/report/analytic_balance.py (+162/-0) analytic/report/analytic_cost_ledger.py (+111/-0) analytic/report/analytic_inverted_balance.py (+131/-0) analytic/report/analytic_journal.py (+68/-0) analytic/report/analytic_quantity_cost_ledger.py (+126/-0) analytic/report/report_analyticbalance.xml (+62/-0) analytic/report/report_analyticcostledger.xml (+90/-0) analytic/report/report_analyticcostledgerquantity.xml (+87/-0) analytic/report/report_analyticjournal.xml (+90/-0) analytic/report/report_invertedanalyticbalance.xml (+91/-0) hr_expense/hr_expense.py (+2/-0) hr_expense/hr_expense_demo.xml (+4/-4) hr_expense/hr_expense_view.xml (+2/-2) hr_expense/hr_expense_workflow.xml (+0/-1) hr_timesheet/hr_timesheet_demo.xml (+15/-15) hr_timesheet/test/hr_timesheet_demo.yml (+1/-1) hr_timesheet/test/test_hr_timesheet.yml (+2/-2) hr_timesheet_invoice/hr_timesheet_invoice_demo.xml (+7/-7) hr_timesheet_invoice/hr_timesheet_invoice_view.xml (+4/-4) hr_timesheet_invoice/report/hr_timesheet_invoice_report.py (+1/-1) hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml (+5/-5) hr_timesheet_invoice/test/test_hr_timesheet_invoice_no_prod_tax.yml (+5/-5) hr_timesheet_sheet/report/hr_timesheet_report.py (+1/-1) hr_timesheet_sheet/report/hr_timesheet_report_view.xml (+1/-1) hr_timesheet_sheet/report/timesheet_report.py (+1/-1) hr_timesheet_sheet/report/timesheet_report_view.xml (+1/-1) hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml (+2/-2) multi_company/multi_company_demo.xml (+15/-15) project/project.py (+11/-3) project_issue/project_issue.py (+11/-0) project_timesheet/project_timesheet_view.xml (+3/-3) |
To merge this branch: | bzr merge lp:~openerp-dev/openobject-addons/trunk-account-project-move-cod |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
OpenERP Core Team | Pending | ||
Review via email: mp+214206@code.launchpad.net |
Commit message
Description of the change
- 9289. By Chirag Dodiya(OpenERP)
-
[IMP]Improved code
Chirag Dodiya(OpenERP) (chirag.dodiya-openerp) wrote : | # |
Hello @tde,
Sorry for inconvenience, I will take care of it from next time.
Details of commits:
Rev No. 9287 :
> [IMP] Moved view of account analytic line in analytic module.
Rev No, 9288 :
> [IMP] Improved code for filter and replace filter with the field
Rev No. 9289 :
> [IMP] Improved xpath for replace filter with the field.
Thanks.
- 9290. By Chirag Dodiya(OpenERP)
-
[MRG]Merge with lp:openobject-addons
- 9291. By Chirag Dodiya(OpenERP)
-
[MRG]Merged lp:~openerp-dev/openobject-addons/trunk-improve-visibility-contract-analytic-bth-jar, for Merge the task -> Visibility: contracts/analytic accounts
- 9292. By Chirag Dodiya(OpenERP)
-
[MRG]Merged with lp:openobject-addons and resolved some conflicts
- 9293. By Chirag Dodiya(OpenERP)
-
[IMP]Improved openerp py file:removed project report view file.
- 9294. By Chirag Dodiya(OpenERP)
-
[IMP]Improved py file for analytic report, improved tempate id
- 9295. By Chirag Dodiya(OpenERP)
-
[MRG]Merged with lp:openobject-addons
- 9296. By Chirag Dodiya(OpenERP)
-
[IMP]Improved yml test case of account analytic plans
- 9297. By Chirag Dodiya(OpenERP)
-
[MRG]Merged with lp:openobject-addons
- 9298. By Chirag Dodiya(OpenERP)
-
[MRG]Merged with lp:openobject-addons
Unmerged revisions
- 9298. By Chirag Dodiya(OpenERP)
-
[MRG]Merged with lp:openobject-addons
- 9297. By Chirag Dodiya(OpenERP)
-
[MRG]Merged with lp:openobject-addons
- 9296. By Chirag Dodiya(OpenERP)
-
[IMP]Improved yml test case of account analytic plans
- 9295. By Chirag Dodiya(OpenERP)
-
[MRG]Merged with lp:openobject-addons
- 9294. By Chirag Dodiya(OpenERP)
-
[IMP]Improved py file for analytic report, improved tempate id
- 9293. By Chirag Dodiya(OpenERP)
-
[IMP]Improved openerp py file:removed project report view file.
- 9292. By Chirag Dodiya(OpenERP)
-
[MRG]Merged with lp:openobject-addons and resolved some conflicts
- 9291. By Chirag Dodiya(OpenERP)
-
[MRG]Merged lp:~openerp-dev/openobject-addons/trunk-improve-visibility-contract-analytic-bth-jar, for Merge the task -> Visibility: contracts/analytic accounts
- 9290. By Chirag Dodiya(OpenERP)
-
[MRG]Merge with lp:openobject-addons
- 9289. By Chirag Dodiya(OpenERP)
-
[IMP]Improved code
Preview Diff
1 | === modified file 'account/__init__.py' |
2 | --- account/__init__.py 2012-11-29 22:26:45 +0000 |
3 | +++ account/__init__.py 2014-04-28 09:41:45 +0000 |
4 | @@ -22,7 +22,6 @@ |
5 | import partner |
6 | import account |
7 | import installer |
8 | -import project |
9 | import account_invoice |
10 | import account_bank_statement |
11 | import account_bank |
12 | @@ -38,5 +37,6 @@ |
13 | import res_currency |
14 | import edi |
15 | import res_config |
16 | +import account_analytic |
17 | |
18 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
19 | |
20 | === modified file 'account/__openerp__.py' |
21 | --- account/__openerp__.py 2014-04-03 09:18:18 +0000 |
22 | +++ account/__openerp__.py 2014-04-28 09:41:45 +0000 |
23 | @@ -96,24 +96,16 @@ |
24 | 'wizard/account_automatic_reconcile_view.xml', |
25 | 'wizard/account_financial_report_view.xml', |
26 | 'wizard/pos_box.xml', |
27 | - 'project/wizard/project_account_analytic_line_view.xml', |
28 | 'account_end_fy.xml', |
29 | 'account_invoice_view.xml', |
30 | 'data/account_data.xml', |
31 | 'data/data_account_type.xml', |
32 | 'data/configurable_account_chart.xml', |
33 | 'account_invoice_workflow.xml', |
34 | - 'project/project_view.xml', |
35 | - 'project/project_report.xml', |
36 | - 'project/wizard/account_analytic_balance_report_view.xml', |
37 | - 'project/wizard/account_analytic_cost_ledger_view.xml', |
38 | - 'project/wizard/account_analytic_inverted_balance_report.xml', |
39 | - 'project/wizard/account_analytic_journal_report_view.xml', |
40 | - 'project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml', |
41 | - 'project/wizard/account_analytic_chart_view.xml', |
42 | 'partner_view.xml', |
43 | 'product_view.xml', |
44 | 'account_assert_test.xml', |
45 | + 'account_analytic_view.xml', |
46 | 'process/statement_process.xml', |
47 | 'process/customer_invoice_process.xml', |
48 | 'process/supplier_invoice_process.xml', |
49 | @@ -124,7 +116,6 @@ |
50 | 'account_bank_view.xml', |
51 | 'res_config_view.xml', |
52 | 'account_pre_install.yml', |
53 | - |
54 | 'views/report_vat.xml', |
55 | 'views/report_invoice.xml', |
56 | 'views/report_trialbalance.xml', |
57 | @@ -139,11 +130,6 @@ |
58 | 'views/report_partnerledgerother.xml', |
59 | 'views/report_financial.xml', |
60 | 'views/report_generalledger.xml', |
61 | - 'project/views/report_analyticbalance.xml', |
62 | - 'project/views/report_analyticjournal.xml', |
63 | - 'project/views/report_analyticcostledgerquantity.xml', |
64 | - 'project/views/report_analyticcostledger.xml', |
65 | - 'project/views/report_invertedanalyticbalance.xml', |
66 | ], |
67 | 'js': [ |
68 | 'static/src/js/account_move_reconciliation.js', |
69 | @@ -160,8 +146,6 @@ |
70 | ], |
71 | 'demo': [ |
72 | 'demo/account_demo.xml', |
73 | - 'project/project_demo.xml', |
74 | - 'project/analytic_account_demo.xml', |
75 | 'demo/account_minimal.xml', |
76 | 'demo/account_invoice_demo.xml', |
77 | 'account_unit_test.xml', |
78 | |
79 | === added file 'account/account_analytic.py' |
80 | --- account/account_analytic.py 1970-01-01 00:00:00 +0000 |
81 | +++ account/account_analytic.py 2014-04-28 09:41:45 +0000 |
82 | @@ -0,0 +1,37 @@ |
83 | +# -*- coding: utf-8 -*- |
84 | +############################################################################## |
85 | +# |
86 | +# OpenERP, Open Source Management Solution |
87 | +# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). |
88 | +# |
89 | +# This program is free software: you can redistribute it and/or modify |
90 | +# it under the terms of the GNU Affero General Public License as |
91 | +# published by the Free Software Foundation, either version 3 of the |
92 | +# License, or (at your option) any later version. |
93 | +# |
94 | +# This program is distributed in the hope that it will be useful, |
95 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
96 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
97 | +# GNU Affero General Public License for more details. |
98 | +# |
99 | +# You should have received a copy of the GNU Affero General Public License |
100 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
101 | +# |
102 | +############################################################################## |
103 | + |
104 | +from openerp.osv import fields, osv |
105 | + |
106 | + |
107 | +class account_journal(osv.osv): |
108 | + _inherit="account.journal" |
109 | + |
110 | + _columns = { |
111 | + 'analytic_journal_id':fields.many2one('account.analytic.journal','Analytic Journal', help="Journal for analytic entries"), |
112 | + } |
113 | + |
114 | +class account_analytic_journal(osv.osv): |
115 | + _inherit="account.analytic.journal" |
116 | + |
117 | + _columns = { |
118 | + 'line_ids': fields.one2many('account.analytic.line', 'journal_id', 'Lines'), |
119 | + } |
120 | |
121 | === modified file 'account/account_analytic_line.py' |
122 | --- account/account_analytic_line.py 2013-10-27 12:31:04 +0000 |
123 | +++ account/account_analytic_line.py 2014-04-28 09:41:45 +0000 |
124 | @@ -29,13 +29,14 @@ |
125 | _columns = { |
126 | 'product_uom_id': fields.many2one('product.uom', 'Unit of Measure'), |
127 | 'product_id': fields.many2one('product.product', 'Product'), |
128 | - 'general_account_id': fields.many2one('account.account', 'General Account', required=True, ondelete='restrict'), |
129 | + 'general_account_id': fields.many2one('account.account', 'Financial Account', required=True, ondelete='restrict'), |
130 | 'move_id': fields.many2one('account.move.line', 'Move Line', ondelete='cascade', select=True), |
131 | 'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal', required=True, ondelete='restrict', select=True), |
132 | 'code': fields.char('Code', size=8), |
133 | 'ref': fields.char('Ref.', size=64), |
134 | 'currency_id': fields.related('move_id', 'currency_id', type='many2one', relation='res.currency', string='Account Currency', store=True, help="The related account currency if not equal to the company one.", readonly=True), |
135 | 'amount_currency': fields.related('move_id', 'amount_currency', type='float', string='Amount Currency', store=True, help="The amount expressed in the related account currency if not equal to the company one.", readonly=True), |
136 | + 'partner_id': fields.related('account_id', 'partner_id', type='many2one', relation='res.partner', string='Partner', store=True), |
137 | } |
138 | |
139 | _defaults = { |
140 | |
141 | === added file 'account/account_analytic_view.xml' |
142 | --- account/account_analytic_view.xml 1970-01-01 00:00:00 +0000 |
143 | +++ account/account_analytic_view.xml 2014-04-28 09:41:45 +0000 |
144 | @@ -0,0 +1,159 @@ |
145 | +<?xml version="1.0" encoding="utf-8"?> |
146 | +<openerp> |
147 | + <data> |
148 | + <record id="view_account_analytic_line_form_1" model="ir.ui.view"> |
149 | + <field name="name">account.analytic.line.form.1</field> |
150 | + <field name="model">account.analytic.line</field> |
151 | + <field name="inherit_id" ref="analytic.view_account_analytic_line_form"/> |
152 | + <field name="arch" type="xml"> |
153 | + <xpath expr="//field[@name='account_id']" position="after"> |
154 | + <field name="journal_id"/> |
155 | + </xpath> |
156 | + <xpath expr="//field[@name='date']" position="after"> |
157 | + <field name="product_id" string="Product"/> |
158 | + <field name="ref"/> |
159 | + </xpath> |
160 | + <xpath expr="//field[@name='company_id']" position="after"> |
161 | + <field name="partner_id"/> |
162 | + </xpath> |
163 | + <xpath expr="//field[@name='amount']" position="after"> |
164 | + <label for="amount_currency" groups="base.group_multi_currency"/> |
165 | + <div groups="base.group_multi_currency"> |
166 | + <field name="amount_currency" class="oe_inline"/> |
167 | + <field name="currency_id" class="oe_inline"/> |
168 | + </div> |
169 | + </xpath> |
170 | + <xpath expr="//group[@string='Product Information']" position="replace"> |
171 | + <group string="Product Information"> |
172 | + <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/> |
173 | + <label for="unit_amount"/> |
174 | + <div> |
175 | + <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/> |
176 | + <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/> |
177 | + </div> |
178 | + </group> |
179 | + </xpath> |
180 | + <xpath expr="//group[@string='Product Information']" position="after"> |
181 | + <group string="General Accounting"> |
182 | + <field name="general_account_id"/> |
183 | + <field name="move_id" readonly="1"/> |
184 | + </group> |
185 | + </xpath> |
186 | + </field> |
187 | + </record> |
188 | + <record id="view_account_analytic_line_tree_1" model="ir.ui.view"> |
189 | + <field name="name">account.analytic.line.tree.1</field> |
190 | + <field name="model">account.analytic.line</field> |
191 | + <field name="inherit_id" ref="analytic.view_account_analytic_line_tree"/> |
192 | + <field name="arch" type="xml"> |
193 | + <xpath expr="//field[@name='date']" position="after"> |
194 | + <field name="ref" invisible="context.get('to_invoice', False)"/> |
195 | + </xpath> |
196 | + <xpath expr="//field[@name='user_id']" position="after"> |
197 | + <field name="partner_id"/> |
198 | + <field name="journal_id" invisible="context.get('to_invoice', False)"/> |
199 | + </xpath> |
200 | + <xpath expr="//field[@name='amount']" position="after"> |
201 | + <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)" invisible="not context.get('to_invoice', False)"/> |
202 | + </xpath> |
203 | + <xpath expr="//field[@name='unit_amount']" position="after"> |
204 | + <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" invisible="not context.get('to_invoice', False)"/> |
205 | + </xpath> |
206 | + <xpath expr="//field[@name='account_id']" position="after"> |
207 | + <field name="general_account_id" invisible="context.get('to_invoice', False)"/> |
208 | + </xpath> |
209 | + </field> |
210 | + </record> |
211 | + <record id="view_account_analytic_line_filter_1" model="ir.ui.view"> |
212 | + <field name="name">account.analytic.line.select.1</field> |
213 | + <field name="model">account.analytic.line</field> |
214 | + <field name="inherit_id" ref="analytic.view_account_analytic_line_filter"/> |
215 | + <field name="arch" type="xml"> |
216 | + <xpath expr="//field[@name='date']" position="after"> |
217 | + <field name="product_id"/> |
218 | + <filter name="sales" string="Sales" domain="[('journal_id.type','=','sale')]" help="Analytic Journal Items related to a sale journal."/> |
219 | + <filter name="purchases" string="Purchases" domain="[('journal_id.type','=','purchase')]" help="Analytic Journal Items related to a purchase journal."/> |
220 | + <filter name="others" string="Others" domain="[('journal_id.type','in',('cash','general','situation'))]"/> |
221 | + </xpath> |
222 | + <xpath expr="//field[@name='account_id']" position="after"> |
223 | + <field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/> |
224 | + </xpath> |
225 | + <xpath expr="//filter[@string='Analytic Account']" position="after"> |
226 | + <filter string="Financial Account" context="{'group_by':'general_account_id'}"/> |
227 | + <filter string="Journal" context="{'group_by':'journal_id'}" name="group_journal"/> |
228 | + </xpath> |
229 | + <xpath expr="//filter[@string='User']" position="before"> |
230 | + <filter string="Product" context="{'group_by':'product_id'}"/> |
231 | + <filter string="Partner" context="{'group_by':'partner_id'}"/> |
232 | + </xpath> |
233 | + </field> |
234 | + </record> |
235 | + <record id="account_analytic_line_extended_form_1" model="ir.ui.view"> |
236 | + <field name="name">account.analytic.line.extended_form.1</field> |
237 | + <field name="model">account.analytic.line</field> |
238 | + <field name="inherit_id" ref="analytic.account_analytic_line_extended_form"/> |
239 | + <field name="arch" type="xml"> |
240 | + <xpath expr="//field[@name='account_id']" position="after"> |
241 | + <field name="journal_id"/> |
242 | + </xpath> |
243 | + <xpath expr="//field[@name='amount']" position="after"> |
244 | + <label for="amount_currency" groups="base.group_multi_currency"/> |
245 | + <div groups="base.group_multi_currency"> |
246 | + <field name="amount_currency" class="oe_inline"/> |
247 | + <field name="currency_id" class="oe_inline"/> |
248 | + </div> |
249 | + <field invisible="1" name="general_account_id"/> |
250 | + </xpath> |
251 | + <xpath expr="//group[@string='Product Information']" position="after"> |
252 | + <group string="General Accounting"> |
253 | + <field name="general_account_id"/> |
254 | + <field name="move_id" readonly="1"/> |
255 | + </group> |
256 | + </xpath> |
257 | + </field> |
258 | + </record> |
259 | + |
260 | + <menuitem groups="analytic.group_analytic_accounting" |
261 | + action="analytic.action_account_analytic_journal_open_form" |
262 | + id="account_analytic_journal_entries" |
263 | + parent="menu_finance_entries"/> |
264 | + |
265 | + <record id="view_account_journal_1" model="ir.ui.view"> |
266 | + <field name="name">account.journal.form.1</field> |
267 | + <field name="model">account.journal</field> |
268 | + <field name="inherit_id" ref="account.view_account_journal_form"/> |
269 | + <field name="arch" type="xml"> |
270 | + <field name="type" position="after"> |
271 | + <field name="analytic_journal_id" groups="analytic.group_analytic_accounting"/> |
272 | + </field> |
273 | + </field> |
274 | + </record> |
275 | + |
276 | + <record model="ir.values" id="account_analytic_journal_values"> |
277 | + <field name="model_id" ref="account.model_account_analytic_journal" /> |
278 | + <field name="name">Account Analytic Journal</field> |
279 | + <field name="key2">client_print_multi</field> |
280 | + <field name="value" eval="'ir.actions.act_window,' + str(ref('analytic.action_account_analytic_journal'))" /> |
281 | + <field name="key">action</field> |
282 | + <field name="model">account.analytic.journal</field> |
283 | + </record> |
284 | + <menuitem groups="analytic.group_analytic_accounting" id="next_id_40" |
285 | + name="Analytic" parent="account.menu_finance_generic_reporting" |
286 | + sequence="4"/> |
287 | + <menuitem groups="analytic.group_analytic_accounting" |
288 | + action="analytic.action_account_analytic_journal" |
289 | + id="account_analytic_journal_print" parent="account.next_id_40"/> |
290 | + <menuitem |
291 | + name="Chart of Analytic Accounts" |
292 | + parent="account.menu_finance_charts" |
293 | + action="analytic.action_account_analytic_chart" |
294 | + id="menu_action_analytic_account_tree2" |
295 | + icon="STOCK_INDENT" |
296 | + groups="analytic.group_analytic_accounting"/> |
297 | + <menuitem action="analytic.action_account_analytic_account_form" id="account_analytic_def_account" |
298 | + parent="menu_analytic_accounting" |
299 | + groups="analytic.group_analytic_accounting"/> |
300 | + |
301 | + <menuitem groups="analytic.group_analytic_accounting" action="analytic.action_account_analytic_journal_form" id="account_def_analytic_journal" parent="menu_analytic_accounting" sequence="5"/> |
302 | + </data> |
303 | +</openerp> |
304 | |
305 | === modified file 'account/demo/account_minimal.xml' |
306 | --- account/demo/account_minimal.xml 2013-10-27 12:31:04 +0000 |
307 | +++ account/demo/account_minimal.xml 2014-04-28 09:41:45 +0000 |
308 | @@ -315,7 +315,7 @@ |
309 | <field name="sequence_id" ref="sequence_sale_journal"/> |
310 | <field name="default_credit_account_id" ref="a_sale"/> |
311 | <field name="default_debit_account_id" ref="a_sale"/> |
312 | - <field name="analytic_journal_id" ref="cose_journal_sale"/> |
313 | + <field name="analytic_journal_id" ref="analytic.cose_journal_sale"/> |
314 | <field name="user_id" ref="base.user_root"/> |
315 | </record> |
316 | <record id="refund_sales_journal" model="account.journal"> |
317 | @@ -325,7 +325,7 @@ |
318 | <field name="sequence_id" ref="sequence_refund_sales_journal"/> |
319 | <field name="default_credit_account_id" ref="a_sale"/> |
320 | <field name="default_debit_account_id" ref="a_sale"/> |
321 | - <field name="analytic_journal_id" ref="cose_journal_sale"/> |
322 | + <field name="analytic_journal_id" ref="analytic.cose_journal_sale"/> |
323 | <field name="user_id" ref="base.user_root"/> |
324 | </record> |
325 | |
326 | @@ -357,7 +357,7 @@ |
327 | <field name="sequence_id" ref="sequence_bank_journal"/> |
328 | <field name="default_debit_account_id" ref="bnk"/> |
329 | <field name="default_credit_account_id" ref="bnk"/> |
330 | - <field name="analytic_journal_id" ref="sit"/> |
331 | + <field name="analytic_journal_id" ref="analytic.sit"/> |
332 | <field name="user_id" ref="base.user_root"/> |
333 | </record> |
334 | <record id="check_journal" model="account.journal"> |
335 | @@ -367,7 +367,7 @@ |
336 | <field name="sequence_id" ref="sequence_check_journal"/> |
337 | <field name="default_debit_account_id" ref="cash"/> |
338 | <field name="default_credit_account_id" ref="cash"/> |
339 | - <field name="analytic_journal_id" ref="sit"/> |
340 | + <field name="analytic_journal_id" ref="analytic.sit"/> |
341 | <field name="user_id" ref="base.user_root"/> |
342 | </record> |
343 | <record id="cash_journal" model="account.journal"> |
344 | @@ -387,7 +387,7 @@ |
345 | <field name="sequence_id" ref="sequence_cash_journal"/> |
346 | <field name="default_debit_account_id" ref="cash"/> |
347 | <field name="default_credit_account_id" ref="cash"/> |
348 | - <field name="analytic_journal_id" ref="sit"/> |
349 | + <field name="analytic_journal_id" ref="analytic.sit"/> |
350 | <field name="user_id" ref="base.user_root"/> |
351 | </record> |
352 | <record id="miscellaneous_journal" model="account.journal"> |
353 | @@ -395,7 +395,7 @@ |
354 | <field name="code">TMIS</field> |
355 | <field name="type">general</field> |
356 | <field name="sequence_id" ref="sequence_miscellaneous_journal"/> |
357 | - <field name="analytic_journal_id" ref="sit"/> |
358 | + <field name="analytic_journal_id" ref="analytic.sit"/> |
359 | <field name="user_id" ref="base.user_root"/> |
360 | </record> |
361 | <record id="opening_journal" model="account.journal"> |
362 | |
363 | === modified file 'account/partner_view.xml' |
364 | --- account/partner_view.xml 2013-10-27 12:31:04 +0000 |
365 | +++ account/partner_view.xml 2014-04-28 09:41:45 +0000 |
366 | @@ -54,8 +54,8 @@ |
367 | <field name="context">{'search_default_partner_id': [active_id], 'default_partner_id': active_id}</field> |
368 | <field name="name">Contracts/Analytic Accounts</field> |
369 | <field name="res_model">account.analytic.account</field> |
370 | - <field name="view_id" ref="view_account_analytic_account_tree"/> |
371 | - <field name="search_view_id" ref="view_account_analytic_account_search"/> |
372 | + <field name="view_id" ref="analytic.view_account_analytic_account_tree"/> |
373 | + <field name="search_view_id" ref="analytic.view_account_analytic_account_search"/> |
374 | </record> |
375 | <record model="ir.ui.view" id="partner_view_buttons"> |
376 | <field name="name">partner.view.buttons</field> |
377 | |
378 | === removed directory 'account/project' |
379 | === removed file 'account/project/__init__.py' |
380 | --- account/project/__init__.py 2011-01-14 00:11:01 +0000 |
381 | +++ account/project/__init__.py 1970-01-01 00:00:00 +0000 |
382 | @@ -1,28 +0,0 @@ |
383 | -# -*- coding: utf-8 -*- |
384 | -############################################################################## |
385 | -# |
386 | -# OpenERP, Open Source Management Solution |
387 | -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
388 | -# |
389 | -# This program is free software: you can redistribute it and/or modify |
390 | -# it under the terms of the GNU Affero General Public License as |
391 | -# published by the Free Software Foundation, either version 3 of the |
392 | -# License, or (at your option) any later version. |
393 | -# |
394 | -# This program is distributed in the hope that it will be useful, |
395 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
396 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
397 | -# GNU Affero General Public License for more details. |
398 | -# |
399 | -# You should have received a copy of the GNU Affero General Public License |
400 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
401 | -# |
402 | -############################################################################## |
403 | - |
404 | -import project |
405 | -import report |
406 | -import wizard |
407 | - |
408 | - |
409 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
410 | - |
411 | |
412 | === removed file 'account/project/analytic_account_demo.xml' |
413 | --- account/project/analytic_account_demo.xml 2012-12-21 16:48:08 +0000 |
414 | +++ account/project/analytic_account_demo.xml 1970-01-01 00:00:00 +0000 |
415 | @@ -1,235 +0,0 @@ |
416 | -<?xml version="1.0" encoding="utf-8"?> |
417 | -<openerp> |
418 | - <data noupdate="1"> |
419 | - <record id="analytic_root" model="account.analytic.account"> |
420 | - <field name="name" model="res.company" use="name" search="[]"/> |
421 | - </record> |
422 | - <record id="analytic_absences" model="account.analytic.account"> |
423 | - <field name="name">Leaves</field> |
424 | - <field name="type">view</field> |
425 | - <field name="parent_id" ref="analytic_root"/> |
426 | - </record> |
427 | - <record id="analytic_internal" model="account.analytic.account"> |
428 | - <field name="name">Internal</field> |
429 | - <field name="type">view</field> |
430 | - <field name="parent_id" ref="analytic_root"/> |
431 | - </record> |
432 | - <record id="analytic_our_super_product" model="account.analytic.account"> |
433 | - <field name="name">Our Super Product</field> |
434 | - <field name="state">open</field> |
435 | - <field name="type">view</field> |
436 | - <field name="parent_id" ref="analytic_root"/> |
437 | - </record> |
438 | - <record id="analytic_project_1" model="account.analytic.account"> |
439 | - <field name="name">Project 1</field> |
440 | - <field name="type">view</field> |
441 | - <field name="parent_id" ref="analytic_root"/> |
442 | - </record> |
443 | - <record id="analytic_project_2" model="account.analytic.account"> |
444 | - <field name="name">Project 2</field> |
445 | - <field name="type">view</field> |
446 | - <field name="parent_id" ref="analytic_root"/> |
447 | - </record> |
448 | - <record id="analytic_journal_trainings" model="account.analytic.account"> |
449 | - <field name="name">Training</field> |
450 | - <field name="type">view</field> |
451 | - <field name="parent_id" ref="analytic_internal"/> |
452 | - </record> |
453 | - <record id="analytic_in_house" model="account.analytic.account"> |
454 | - <field name="name">In House</field> |
455 | - <field name="type">normal</field> |
456 | - <field name="parent_id" ref="analytic_journal_trainings"/> |
457 | - </record> |
458 | - <record id="analytic_online" model="account.analytic.account"> |
459 | - <field name="name">Online</field> |
460 | - <field name="type">normal</field> |
461 | - <field name="parent_id" ref="analytic_journal_trainings"/> |
462 | - </record> |
463 | - <record id="analytic_support" model="account.analytic.account"> |
464 | - <field name="name">Support</field> |
465 | - <field name="type">view</field> |
466 | - <field name="parent_id" ref="analytic_our_super_product"/> |
467 | - </record> |
468 | - <record id="analytic_partners" model="account.analytic.account"> |
469 | - <field name="name">Partners</field> |
470 | - <field name="type">view</field> |
471 | - <field name="parent_id" ref="analytic_support"/> |
472 | - </record> |
473 | - <record id="analytic_customers" model="account.analytic.account"> |
474 | - <field name="name">Customers</field> |
475 | - <field name="type">view</field> |
476 | - <field name="parent_id" ref="analytic_support"/> |
477 | - </record> |
478 | - <record id="analytic_support_internal" model="account.analytic.account"> |
479 | - <field name="name">Internal</field> |
480 | - <field name="type">contract</field> |
481 | - <field name="parent_id" ref="analytic_support"/> |
482 | - </record> |
483 | - <record id="analytic_integration" model="account.analytic.account"> |
484 | - <field name="name">Integration</field> |
485 | - <field name="type">view</field> |
486 | - <field name="parent_id" ref="analytic_our_super_product"/> |
487 | - </record> |
488 | - <record id="analytic_consultancy" model="account.analytic.account"> |
489 | - <field name="name">Consultancy</field> |
490 | - <field name="type">contract</field> |
491 | - <field name="parent_id" ref="analytic_our_super_product"/> |
492 | - </record> |
493 | - <record id="analytic_super_product_trainings" model="account.analytic.account"> |
494 | - <field name="name">Training</field> |
495 | - <field name="type">contract</field> |
496 | - <field name="parent_id" ref="analytic_our_super_product"/> |
497 | - </record> |
498 | - <record id="analytic_seagate_p1" model="account.analytic.account"> |
499 | - <field name="name">Seagate P1</field> |
500 | - <field name="parent_id" ref="analytic_integration"/> |
501 | - <field name="type">normal</field> |
502 | - <field name="state">open</field> |
503 | - <field name="partner_id" ref="base.res_partner_19"/> |
504 | - </record> |
505 | - <record id="analytic_seagate_p2" model="account.analytic.account"> |
506 | - <field name="name">Seagate P2</field> |
507 | - <field name="type">normal</field> |
508 | - <field name="parent_id" ref="analytic_integration"/> |
509 | - <field name="state">open</field> |
510 | - <field name="partner_id" ref="base.res_partner_19"/> |
511 | - </record> |
512 | - <record id="analytic_millennium_industries" model="account.analytic.account"> |
513 | - <field name="name">Millennium Industries</field> |
514 | - <field name="parent_id" ref="analytic_integration"/> |
515 | - <field name="type">normal</field> |
516 | - <field name="partner_id" ref="base.res_partner_15"/> |
517 | - </record> |
518 | - <record id="analytic_integration_c2c" model="account.analytic.account"> |
519 | - <field name="name">CampToCamp</field> |
520 | - <field name="type">normal</field> |
521 | - <field eval="str(time.localtime()[0] - 1) + '-08-07'" name="date_start"/> |
522 | - <field eval="time.strftime('%Y-12-31')" name="date"/> |
523 | - <field name="parent_id" ref="analytic_integration"/> |
524 | - <field name="partner_id" ref="base.res_partner_12"/> |
525 | - <field name="state">open</field> |
526 | - </record> |
527 | - <record id="analytic_agrolait" model="account.analytic.account"> |
528 | - <field name="name">Agrolait</field> |
529 | - <field name="parent_id" ref="analytic_customers"/> |
530 | - <field name="type">normal</field> |
531 | - <field name="partner_id" ref="base.res_partner_2"/> |
532 | - </record> |
533 | - <record id="analytic_asustek" model="account.analytic.account"> |
534 | - <field name="name">Asustek</field> |
535 | - <field name="type">normal</field> |
536 | - <field name="parent_id" ref="analytic_customers"/> |
537 | - <field name="partner_id" ref="base.res_partner_1"/> |
538 | - </record> |
539 | - <record id="analytic_deltapc" model="account.analytic.account"> |
540 | - <field name="name">Delta PC</field> |
541 | - <field name="parent_id" ref="analytic_customers"/> |
542 | - <field name="type">normal</field> |
543 | - <field name="partner_id" ref="base.res_partner_4"/> |
544 | - </record> |
545 | - <record id="analytic_spark" model="account.analytic.account"> |
546 | - <field name="name">Spark Systems</field> |
547 | - <field eval="str(time.localtime()[0] - 1) + '-05-09'" name="date_start"/> |
548 | - <field eval="time.strftime('%Y-05-08')" name="date"/> |
549 | - <field name="parent_id" ref="analytic_partners"/> |
550 | - <field name="type">normal</field> |
551 | - <field name="partner_id" ref="base.res_partner_16"/> |
552 | - <field name="state">open</field> |
553 | - </record> |
554 | - <record id="analytic_nebula" model="account.analytic.account"> |
555 | - <field name="name">Nebula</field> |
556 | - <field eval="time.strftime('%Y-02-01')" name="date_start"/> |
557 | - <field eval="time.strftime('%Y-07-01')" name="date"/> |
558 | - <field name="type">normal</field> |
559 | - <field name="parent_id" ref="analytic_partners"/> |
560 | - <field name="partner_id" ref="base.res_partner_17"/> |
561 | - <field name="state">open</field> |
562 | - </record> |
563 | - <record id="analytic_luminous_technologies" model="account.analytic.account"> |
564 | - <field name="name">Luminous Technologies</field> |
565 | - <field eval="time.strftime('%Y-04-24')" name="date_start"/> |
566 | - <field eval="str(time.localtime()[0] + 1) + '-04-24'" name="date"/> |
567 | - <field name="type">normal</field> |
568 | - <field name="parent_id" ref="analytic_partners"/> |
569 | - <field name="partner_id" ref="base.res_partner_11"/> |
570 | - </record> |
571 | - <record id="analytic_desertic_hispafuentes" model="account.analytic.account"> |
572 | - <field name="name">Desertic - Hispafuentes</field> |
573 | - <field eval="time.strftime('%Y-02-01')" name="date_start"/> |
574 | - <field eval="str(time.localtime()[0] + 1) + '-02-01'" name="date"/> |
575 | - <field name="type">normal</field> |
576 | - <field name="parent_id" ref="analytic_partners"/> |
577 | - <field name="partner_id" ref="base.res_partner_12"/> |
578 | - </record> |
579 | - <record id="analytic_think_big_systems" model="account.analytic.account"> |
580 | - <field name="name">Think Big Systems</field> |
581 | - <field name="type">normal</field> |
582 | - <field name="parent_id" ref="analytic_partners"/> |
583 | - <field name="partner_id" ref="base.res_partner_18"/> |
584 | - </record> |
585 | - <record id="analytic_partners_camp_to_camp" model="account.analytic.account"> |
586 | - <field name="name">Camp to Camp</field> |
587 | - <field eval="time.strftime('%Y-%m-%d', time.localtime(time.time() - 365 * 86400))" name="date_start"/> |
588 | - <field eval="time.strftime('%Y-%m-%d')" name="date"/> |
589 | - <field name="type">normal</field> |
590 | - <field name="parent_id" ref="analytic_partners"/> |
591 | - <field name="partner_id" ref="base.res_partner_12"/> |
592 | - <field name="state">open</field> |
593 | - </record> |
594 | - <record id="analytic_project_2_support" model="account.analytic.account"> |
595 | - <field name="name">Support</field> |
596 | - <field name="type">normal</field> |
597 | - <field name="parent_id" ref="analytic_project_2"/> |
598 | - </record> |
599 | - <record id="analytic_project_2_development" model="account.analytic.account"> |
600 | - <field name="name">Development</field> |
601 | - <field name="type">normal</field> |
602 | - <field name="parent_id" ref="analytic_project_2"/> |
603 | - </record> |
604 | - <record id="analytic_project_1_trainings" model="account.analytic.account"> |
605 | - <field name="name">Training</field> |
606 | - <field name="type">normal</field> |
607 | - <field name="parent_id" ref="analytic_project_1"/> |
608 | - </record> |
609 | - <record id="analytic_project_1_development" model="account.analytic.account"> |
610 | - <field name="name">Development</field> |
611 | - <field name="type">normal</field> |
612 | - <field name="parent_id" ref="analytic_project_1"/> |
613 | - </record> |
614 | - <record id="analytic_administratif" model="account.analytic.account"> |
615 | - <field name="name">Administrative</field> |
616 | - <field name="type">normal</field> |
617 | - <field name="parent_id" ref="analytic_internal"/> |
618 | - </record> |
619 | - <record id="analytic_commercial_marketing" model="account.analytic.account"> |
620 | - <field name="name">Commercial & Marketing</field> |
621 | - <field name="type">normal</field> |
622 | - <field name="parent_id" ref="analytic_internal"/> |
623 | - </record> |
624 | - <record id="analytic_our_super_product_development" model="account.analytic.account"> |
625 | - <field name="name">Our Super Product Development</field> |
626 | - <field name="type">view</field> |
627 | - <field name="parent_id" ref="analytic_internal"/> |
628 | - </record> |
629 | - <record id="analytic_stable" model="account.analytic.account"> |
630 | - <field name="name">Stable</field> |
631 | - <field name="type">normal</field> |
632 | - <field name="parent_id" ref="analytic_our_super_product_development"/> |
633 | - </record> |
634 | - <record id="analytic_trunk" model="account.analytic.account"> |
635 | - <field name="name">Trunk</field> |
636 | - <field name="type">normal</field> |
637 | - <field name="parent_id" ref="analytic_our_super_product_development"/> |
638 | - </record> |
639 | - <record id="analytic_paid" model="account.analytic.account"> |
640 | - <field name="name">Paid</field> |
641 | - <field name="type">normal</field> |
642 | - <field name="parent_id" ref="analytic_absences"/> |
643 | - </record> |
644 | - <record id="analytic_unpaid" model="account.analytic.account"> |
645 | - <field name="name">Unpaid</field> |
646 | - <field name="type">normal</field> |
647 | - <field name="parent_id" ref="analytic_absences"/> |
648 | - </record> |
649 | - </data> |
650 | -</openerp> |
651 | |
652 | === removed file 'account/project/project.py' |
653 | --- account/project/project.py 2013-10-27 12:31:04 +0000 |
654 | +++ account/project/project.py 1970-01-01 00:00:00 +0000 |
655 | @@ -1,50 +0,0 @@ |
656 | -# -*- coding: utf-8 -*- |
657 | -############################################################################## |
658 | -# |
659 | -# OpenERP, Open Source Management Solution |
660 | -# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). |
661 | -# |
662 | -# This program is free software: you can redistribute it and/or modify |
663 | -# it under the terms of the GNU Affero General Public License as |
664 | -# published by the Free Software Foundation, either version 3 of the |
665 | -# License, or (at your option) any later version. |
666 | -# |
667 | -# This program is distributed in the hope that it will be useful, |
668 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
669 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
670 | -# GNU Affero General Public License for more details. |
671 | -# |
672 | -# You should have received a copy of the GNU Affero General Public License |
673 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
674 | -# |
675 | -############################################################################## |
676 | - |
677 | -from openerp.osv import fields, osv |
678 | - |
679 | -class account_analytic_journal(osv.osv): |
680 | - _name = 'account.analytic.journal' |
681 | - _description = 'Analytic Journal' |
682 | - _columns = { |
683 | - 'name': fields.char('Journal Name', size=64, required=True), |
684 | - 'code': fields.char('Journal Code', size=8), |
685 | - 'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the analytic journal without removing it."), |
686 | - 'type': fields.selection([('sale','Sale'), ('purchase','Purchase'), ('cash','Cash'), ('general','General'), ('situation','Situation')], 'Type', size=32, required=True, help="Gives the type of the analytic journal. When it needs for a document (eg: an invoice) to create analytic entries, OpenERP will look for a matching journal of the same type."), |
687 | - 'line_ids': fields.one2many('account.analytic.line', 'journal_id', 'Lines'), |
688 | - 'company_id': fields.many2one('res.company', 'Company', required=True), |
689 | - } |
690 | - _defaults = { |
691 | - 'active': True, |
692 | - 'type': 'general', |
693 | - 'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id, |
694 | - } |
695 | - |
696 | - |
697 | -class account_journal(osv.osv): |
698 | - _inherit="account.journal" |
699 | - |
700 | - _columns = { |
701 | - 'analytic_journal_id':fields.many2one('account.analytic.journal','Analytic Journal', help="Journal for analytic entries"), |
702 | - } |
703 | - |
704 | - |
705 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
706 | |
707 | === removed file 'account/project/project_demo.xml' |
708 | --- account/project/project_demo.xml 2013-12-10 15:29:57 +0000 |
709 | +++ account/project/project_demo.xml 1970-01-01 00:00:00 +0000 |
710 | @@ -1,15 +0,0 @@ |
711 | -<?xml version="1.0" encoding="utf-8"?> |
712 | -<openerp> |
713 | - <data noupdate="1"> |
714 | - <record id="cose_journal_sale" model="account.analytic.journal"> |
715 | - <field name="code">SAL</field> |
716 | - <field name="name">Sales</field> |
717 | - <field name="type">sale</field> |
718 | - </record> |
719 | - <record id="sit" model="account.analytic.journal"> |
720 | - <field name="code">START</field> |
721 | - <field name="name">Miscellaneous Operation</field> |
722 | - <field name="type">situation</field> |
723 | - </record> |
724 | - </data> |
725 | -</openerp> |
726 | |
727 | === removed file 'account/project/project_report.xml' |
728 | --- account/project/project_report.xml 2014-03-27 18:25:20 +0000 |
729 | +++ account/project/project_report.xml 1970-01-01 00:00:00 +0000 |
730 | @@ -1,54 +0,0 @@ |
731 | -<?xml version="1.0" encoding="utf-8"?> |
732 | -<openerp> |
733 | - <data> |
734 | - <report |
735 | - id="action_account_analytic_account_inverted_balance" |
736 | - model="account.analytic.account" |
737 | - string="Inverted Analytic Balance" |
738 | - report_type="qweb-pdf" |
739 | - name="account.report_invertedanalyticbalance" |
740 | - file="account.report_invertedanalyticbalance" |
741 | - menu="False" |
742 | - /> |
743 | - |
744 | - <report |
745 | - id="action_report_analytic_journal" |
746 | - model="account.analytic.journal" |
747 | - string="Analytic Journal" |
748 | - report_type="qweb-pdf" |
749 | - name="account.report_analyticjournal" |
750 | - file="account.report_analyticjournal" |
751 | - menu="False" |
752 | - /> |
753 | - |
754 | - <report |
755 | - id="action_report_analytic_balance" |
756 | - model="account.analytic.account" |
757 | - string="Analytic Balance" |
758 | - report_type="qweb-pdf" |
759 | - name="account.report_analyticbalance" |
760 | - file="account.report_analyticbalance" |
761 | - menu="False" |
762 | - /> |
763 | - |
764 | - <report |
765 | - id="action_report_cost_ledger" |
766 | - model="account.analytic.account" |
767 | - report_type="qweb-pdf" |
768 | - string="Cost Ledger" |
769 | - name="account.report_analyticcostledger" |
770 | - file="account.report_analyticcostledger" |
771 | - menu="False" |
772 | - /> |
773 | - |
774 | - <report |
775 | - id="action_report_cost_ledgerquantity" |
776 | - model="account.analytic.account" |
777 | - report_type="qweb-pdf" |
778 | - string="Cost Ledger (Only quantities)" |
779 | - name="account.report_analyticcostledgerquantity" |
780 | - file="account.report_analyticcostledgerquantity" |
781 | - menu="False" |
782 | - /> |
783 | - </data> |
784 | -</openerp> |
785 | |
786 | === removed file 'account/project/project_view.xml' |
787 | --- account/project/project_view.xml 2013-10-27 12:31:04 +0000 |
788 | +++ account/project/project_view.xml 1970-01-01 00:00:00 +0000 |
789 | @@ -1,372 +0,0 @@ |
790 | -<?xml version="1.0" encoding="utf-8"?> |
791 | -<openerp> |
792 | - <data> |
793 | - |
794 | - <record id="view_account_analytic_account_list" model="ir.ui.view"> |
795 | - <field name="name">account.analytic.account.list</field> |
796 | - <field name="model">account.analytic.account</field> |
797 | - <field eval="8" name="priority"/> |
798 | - <field name="arch" type="xml"> |
799 | - <tree toolbar="1" colors="red:state=='pending';grey:state in ('cancelled','close');blue:type=='view'" string="Analytic Accounts"> |
800 | - <field name="complete_name"/> |
801 | - <field name="partner_id"/> |
802 | - <field name="code"/> |
803 | - <field name="date_start"/> |
804 | - <field name="date"/> |
805 | - <field name="user_id" invisible="1"/> |
806 | - <field name="manager_id"/> |
807 | - <field name="parent_id" invisible="1"/> |
808 | - <field name="state" invisible="1"/> |
809 | - <field name="type" invisible="1"/> |
810 | - <field name="template_id" invisible="1"/> |
811 | - <field name="company_id" groups="base.group_multi_company"/> |
812 | - </tree> |
813 | - </field> |
814 | - </record> |
815 | - |
816 | - <record id="view_account_analytic_account_search" model="ir.ui.view"> |
817 | - <field name="name">account.analytic.account.search</field> |
818 | - <field name="model">account.analytic.account</field> |
819 | - <field name="arch" type="xml"> |
820 | - <search string="Analytic Account"> |
821 | - <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Analytic Account"/> |
822 | - <field name="date"/> |
823 | - <field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/> |
824 | - <field name="manager_id"/> |
825 | - <field name="parent_id"/> |
826 | - <field name="user_id"/> |
827 | - <filter string="Open" domain="[('state','=','open')]" help="Current Accounts"/> |
828 | - <filter string="Pending" domain="[('state','=','pending')]" help="Pending Accounts"/> |
829 | - <group expand="0" string="Group By..."> |
830 | - <filter string="Associated Partner" domain="[]" context="{'group_by':'partner_id'}"/> |
831 | - <filter string="Type" domain="[]" context="{'group_by':'type'}"/> |
832 | - <filter string="Template" domain="[]" context="{'group_by':'template_id'}"/> |
833 | - <filter string="Parent Account" domain="[]" context="{'group_by':'parent_id'}"/> |
834 | - <filter string="Status" domain="[]" context="{'group_by':'state'}" groups="base.group_no_one"/> |
835 | - </group> |
836 | - </search> |
837 | - </field> |
838 | - </record> |
839 | - |
840 | - <record id="view_account_analytic_account_tree" model="ir.ui.view"> |
841 | - <field name="name">account.analytic.account.tree</field> |
842 | - <field name="model">account.analytic.account</field> |
843 | - <field name="field_parent">child_complete_ids</field> |
844 | - <field name="arch" type="xml"> |
845 | - <tree colors="blue:state=='pending';grey:state in ('close','cancelled');blue:type=='view'" string="Analytic account" toolbar="1"> |
846 | - <field name="name" invisible="1"/> |
847 | - <field name="complete_name"/> |
848 | - <field name="code"/> |
849 | - <field name="debit"/> |
850 | - <field name="credit"/> |
851 | - <field name="balance"/> |
852 | - <field name="state" invisible="1"/> |
853 | - <field name="currency_id" groups="base.group_multi_currency"/> |
854 | - <field name="date" invisible="1"/> |
855 | - <field name="user_id" invisible="1"/> |
856 | - <field name="partner_id" invisible="1"/> |
857 | - <field name="parent_id" invisible="1"/> |
858 | - <field name="type"/> |
859 | - <field name="company_id" groups="base.group_multi_company"/> |
860 | - <field name="template_id" invisible="1"/> |
861 | - </tree> |
862 | - </field> |
863 | - </record> |
864 | - |
865 | - |
866 | - <record id="action_account_analytic_account_form" model="ir.actions.act_window"> |
867 | - <field name="name">Analytic Accounts</field> |
868 | - <field name="type">ir.actions.act_window</field> |
869 | - <field name="res_model">account.analytic.account</field> |
870 | - <field name="context">{}</field> <!-- repair invalid context by setting empty one --> |
871 | - <field name="view_type">form</field> |
872 | - <field name="view_mode">tree,form</field> |
873 | - <field name="view_id" ref="view_account_analytic_account_tree"/> |
874 | - <field name="search_view_id" ref="account.view_account_analytic_account_search"/> |
875 | - </record> |
876 | - <menuitem action="action_account_analytic_account_form" id="account_analytic_def_account" |
877 | - parent="menu_analytic_accounting" |
878 | - groups="analytic.group_analytic_accounting"/> |
879 | - |
880 | - <record id="act_account_renew_view" model="ir.actions.act_window"> |
881 | - <field name="name">Accounts to Renew</field> |
882 | - <field name="type">ir.actions.act_window</field> |
883 | - <field name="res_model">account.analytic.account</field> |
884 | - <field name="view_type">form</field> |
885 | - <field name="view_mode">tree,form</field> |
886 | - <field name="domain">[('date','<',time.strftime('%Y-%m-%d %H:%M:%S'))]</field> |
887 | - <field name="filter" eval="True"/> |
888 | - </record> |
889 | - |
890 | - <record id="action_account_analytic_account_tree2" model="ir.actions.act_window"> |
891 | - <field name="name">Chart of Analytic Accounts</field> |
892 | - <field name="res_model">account.analytic.account</field> |
893 | - <field name="view_type">tree</field> |
894 | - <field name="view_id" ref="view_account_analytic_account_tree"/> |
895 | - <field name="domain">[('parent_id','=',False)]</field> |
896 | - <field name="help" type="html"> |
897 | - <p> |
898 | - Click to add a new analytic account. |
899 | - </p><p> |
900 | - The normal chart of accounts has a structure defined by the |
901 | - legal requirement of the country. The analytic chart of |
902 | - accounts structure should reflect your own business needs in |
903 | - term of costs/revenues reporting. |
904 | - </p><p> |
905 | - They are usually structured by contracts, projects, products or |
906 | - departements. Most of the OpenERP operations (invoices, |
907 | - timesheets, expenses, etc) generate analytic entries on the |
908 | - related account. |
909 | - </p> |
910 | - </field> |
911 | - </record> |
912 | - |
913 | - |
914 | - <record id="view_account_analytic_line_form" model="ir.ui.view"> |
915 | - <field name="name">account.analytic.line.form</field> |
916 | - <field name="model">account.analytic.line</field> |
917 | - <field name="priority">1</field> |
918 | - <field name="arch" type="xml"> |
919 | - <form string="Analytic Entry" version="7.0"> |
920 | - <group> |
921 | - <group> |
922 | - <field name="name"/> |
923 | - <field name="account_id"/> |
924 | - <field name="journal_id"/> |
925 | - <field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'account.group_account_invoice']}"/> |
926 | - </group> |
927 | - <group> |
928 | - <field name="date"/> |
929 | - <field name="ref"/> |
930 | - <field name="company_id" groups="base.group_multi_company"/> |
931 | - </group> |
932 | - <group string="Amount"> |
933 | - <field name="amount"/> |
934 | - <label for="amount_currency" groups="base.group_multi_currency"/> |
935 | - <div groups="base.group_multi_currency"> |
936 | - <field name="amount_currency" class="oe_inline"/> |
937 | - <field name="currency_id" class="oe_inline"/> |
938 | - </div> |
939 | - </group> |
940 | - <group string="Product Information"> |
941 | - <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/> |
942 | - <label for="unit_amount"/> |
943 | - <div> |
944 | - <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/> |
945 | - <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/> |
946 | - </div> |
947 | - </group> |
948 | - <group string="General Accounting"> |
949 | - <field name="general_account_id"/> |
950 | - <field name="move_id" readonly="1"/> |
951 | - </group> |
952 | - </group> |
953 | - </form> |
954 | - </field> |
955 | - </record> |
956 | - <record id="view_account_analytic_line_tree" model="ir.ui.view"> |
957 | - <field name="name">account.analytic.line.tree</field> |
958 | - <field name="model">account.analytic.line</field> |
959 | - <field name="arch" type="xml"> |
960 | - <tree string="Analytic Entries"> |
961 | - <field name="date"/> |
962 | - <field name="ref" invisible="context.get('to_invoice', False)"/> |
963 | - <field name="name"/> |
964 | - <field name="user_id"/> |
965 | - <field name="journal_id" invisible="context.get('to_invoice', False)"/> |
966 | - <field name="amount" sum="Total" invisible="context.get('to_invoice', False)"/> |
967 | - <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)" invisible="not context.get('to_invoice', False)"/> |
968 | - <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" sum="Total Quantity"/> |
969 | - <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" invisible="not context.get('to_invoice', False)"/> |
970 | - <field domain="[('type','=','normal')]" name="account_id"/> |
971 | - <field name="general_account_id" invisible="context.get('to_invoice', False)"/> |
972 | - <field name="company_id" groups="base.group_multi_company"/> |
973 | - </tree> |
974 | - </field> |
975 | - </record> |
976 | - <record id="view_account_analytic_line_filter" model="ir.ui.view"> |
977 | - <field name="name">account.analytic.line.select</field> |
978 | - <field name="model">account.analytic.line</field> |
979 | - <field name="arch" type="xml"> |
980 | - <search string="Search Analytic Lines"> |
981 | - <field name="name" string="Analytic Line"/> |
982 | - <field name="date"/> |
983 | - <filter name="sales" string="Sales" domain="[('journal_id.type','=','sale')]" help="Analytic Journal Items related to a sale journal."/> |
984 | - <filter name="purchases" string="Purchases" domain="[('journal_id.type','=','purchase')]" help="Analytic Journal Items related to a purchase journal."/> |
985 | - <filter name="others" string="Others" domain="[('journal_id.type','in',('cash','general','situation'))]"/> |
986 | - <separator/> |
987 | - <filter string="My Entries" domain="[('user_id','=',uid)]"/> |
988 | - <field name="account_id"/> |
989 | - <field name="user_id"/> |
990 | - <group string="Group By..." expand="0"> |
991 | - <filter string="Analytic Account" context="{'group_by':'account_id'}"/> |
992 | - <filter string="Fin. Account" context="{'group_by':'general_account_id'}"/> |
993 | - <filter string="Journal" context="{'group_by':'journal_id'}" name="group_journal"/> |
994 | - <separator/> |
995 | - <filter string="Product" context="{'group_by':'product_id'}"/> |
996 | - <filter string="User" context="{'group_by':'user_id'}"/> |
997 | - <separator/> |
998 | - <filter string="Tasks Month" context="{'group_by':'date'}" name="group_date" help="Invoice Tasks by Month"/> |
999 | - |
1000 | - </group> |
1001 | - </search> |
1002 | - </field> |
1003 | - </record> |
1004 | - <record id="action_account_analytic_line_form" model="ir.actions.act_window"> |
1005 | - <field name="name">Analytic Entries</field> |
1006 | - <field name="type">ir.actions.act_window</field> |
1007 | - <field name="res_model">account.analytic.line</field> |
1008 | - <field name="view_type">form</field> |
1009 | - <field name="context">{"search_default_user_id":uid}</field> |
1010 | - <field name="view_id" ref="view_account_analytic_line_tree"/> |
1011 | - </record> |
1012 | - |
1013 | - <!-- Entries by Line --> |
1014 | - |
1015 | - <record id="action_account_tree1" model="ir.actions.act_window"> |
1016 | - <field name="name">Analytic Items</field> |
1017 | - <field name="res_model">account.analytic.line</field> |
1018 | - <field name="view_type">form</field> |
1019 | - <field name="view_mode">tree,form</field> |
1020 | - <field name="domain">[('account_id','child_of',[active_id])]</field> |
1021 | - <field name="context">{'account_id':active_id}</field> |
1022 | - <field name="search_view_id" ref="view_account_analytic_line_filter"/> |
1023 | - </record> |
1024 | - <record id="ir_open_account_analytic_account" model="ir.values"> |
1025 | - <field eval="'tree_but_open'" name="key2"/> |
1026 | - <field eval="'account.analytic.account'" name="model"/> |
1027 | - <field name="name">Open Account Tree</field> |
1028 | - <field eval="'ir.actions.act_window,%d'%action_account_tree1" name="value"/> |
1029 | - </record> |
1030 | - |
1031 | - <record id="account_analytic_line_extended_form" model="ir.ui.view"> |
1032 | - <field name="name">account.analytic.line.extended_form</field> |
1033 | - <field name="model">account.analytic.line</field> |
1034 | - <field name="arch" type="xml"> |
1035 | - <form string="Project line" version="7.0"> |
1036 | - <group> |
1037 | - <group> |
1038 | - <field name="name"/> |
1039 | - <field name="account_id"/> |
1040 | - <field name="journal_id"/> |
1041 | - </group> |
1042 | - <group> |
1043 | - <field name="date" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/> |
1044 | - <field name="company_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/> |
1045 | - </group> |
1046 | - <group string="Amount"> |
1047 | - <field name="amount"/> |
1048 | - <label for="amount_currency" groups="base.group_multi_currency"/> |
1049 | - <div groups="base.group_multi_currency"> |
1050 | - <field name="amount_currency" class="oe_inline"/> |
1051 | - <field name="currency_id" class="oe_inline"/> |
1052 | - </div> |
1053 | - <field invisible="1" name="general_account_id"/> |
1054 | - </group> |
1055 | - <group string="Product Information"> |
1056 | - <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/> |
1057 | - <label for="unit_amount"/> |
1058 | - <div> |
1059 | - <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/> |
1060 | - <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/> |
1061 | - </div> |
1062 | - </group> |
1063 | - </group> |
1064 | - </form> |
1065 | - </field> |
1066 | - </record> |
1067 | - <record id="action_account_analytic_account_line_extended_form" model="ir.actions.act_window"> |
1068 | - <field name="name">account.analytic.line.extended</field> |
1069 | - <field name="type">ir.actions.act_window</field> |
1070 | - <field name="res_model">account.analytic.line</field> |
1071 | - <field name="view_type">form</field> |
1072 | - <field name="view_id" ref="account_analytic_line_extended_form"/> |
1073 | - </record> |
1074 | - |
1075 | - # |
1076 | - # Analytic Journal |
1077 | - # |
1078 | - |
1079 | - <record id="view_account_analytic_journal_tree" model="ir.ui.view"> |
1080 | - <field name="name">account.analytic.journal.tree</field> |
1081 | - <field name="model">account.analytic.journal</field> |
1082 | - <field name="arch" type="xml"> |
1083 | - <tree string="Analytic Journal"> |
1084 | - <field name="code"/> |
1085 | - <field name="name"/> |
1086 | - <field name="type"/> |
1087 | - </tree> |
1088 | - </field> |
1089 | - </record> |
1090 | - |
1091 | - <record id="view_analytic_journal_search" model="ir.ui.view"> |
1092 | - <field name="name">account.analytic.journal.search</field> |
1093 | - <field name="model">account.analytic.journal</field> |
1094 | - <field name="arch" type="xml"> |
1095 | - <search string="Analytic Journals"> |
1096 | - <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Analytic Journal"/> |
1097 | - <field name="type"/> |
1098 | - <group expand="0" string="Group By..."> |
1099 | - <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/> |
1100 | - </group> |
1101 | - </search> |
1102 | - </field> |
1103 | - </record> |
1104 | - |
1105 | - <record id="view_account_analytic_journal_form" model="ir.ui.view"> |
1106 | - <field name="name">account.analytic.journal.form</field> |
1107 | - <field name="model">account.analytic.journal</field> |
1108 | - <field name="arch" type="xml"> |
1109 | - <form string="Analytic Journal" version="7.0"> |
1110 | - <group col="4"> |
1111 | - <field name="name"/> |
1112 | - <field name="code"/> |
1113 | - <field name="type"/> |
1114 | - <field name="active"/> |
1115 | - <field name="company_id" groups="base.group_multi_company"/> |
1116 | - </group> |
1117 | - </form> |
1118 | - </field> |
1119 | - </record> |
1120 | - <record id="action_account_analytic_journal_form" model="ir.actions.act_window"> |
1121 | - <field name="name">Analytic Journals</field> |
1122 | - <field name="res_model">account.analytic.journal</field> |
1123 | - <field name="view_type">form</field> |
1124 | - <field name="view_mode">tree,form</field> |
1125 | - <field name="search_view_id" ref="view_analytic_journal_search" /> |
1126 | - </record> |
1127 | - <menuitem groups="analytic.group_analytic_accounting" action="action_account_analytic_journal_form" id="account_def_analytic_journal" parent="menu_analytic_accounting" sequence="5"/> |
1128 | - |
1129 | - # |
1130 | - # Open journal entries |
1131 | - # |
1132 | - |
1133 | - <record id="action_account_analytic_journal_open_form" model="ir.actions.act_window"> |
1134 | - <field name="name">Analytic Journal Items</field> |
1135 | - <field name="res_model">account.analytic.line</field> |
1136 | - <field name="view_type">form</field> |
1137 | - <field name="view_mode">tree,form</field> |
1138 | - </record> |
1139 | - <menuitem groups="analytic.group_analytic_accounting" |
1140 | - action="action_account_analytic_journal_open_form" |
1141 | - id="account_analytic_journal_entries" |
1142 | - parent="menu_finance_entries"/> |
1143 | - |
1144 | - # |
1145 | - # Reporting |
1146 | - # |
1147 | - |
1148 | - |
1149 | - <record id="view_account_journal_1" model="ir.ui.view"> |
1150 | - <field name="name">account.journal.form.1</field> |
1151 | - <field name="model">account.journal</field> |
1152 | - <field name="inherit_id" ref="account.view_account_journal_form"/> |
1153 | - <field name="arch" type="xml"> |
1154 | - <field name="type" position="after"> |
1155 | - <field name="analytic_journal_id" groups="analytic.group_analytic_accounting"/> |
1156 | - </field> |
1157 | - </field> |
1158 | - </record> |
1159 | - |
1160 | - </data> |
1161 | -</openerp> |
1162 | |
1163 | === removed directory 'account/project/report' |
1164 | === removed file 'account/project/report/__init__.py' |
1165 | --- account/project/report/__init__.py 2011-01-14 00:11:01 +0000 |
1166 | +++ account/project/report/__init__.py 1970-01-01 00:00:00 +0000 |
1167 | @@ -1,29 +0,0 @@ |
1168 | -# -*- coding: utf-8 -*- |
1169 | -############################################################################## |
1170 | -# |
1171 | -# OpenERP, Open Source Management Solution |
1172 | -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
1173 | -# |
1174 | -# This program is free software: you can redistribute it and/or modify |
1175 | -# it under the terms of the GNU Affero General Public License as |
1176 | -# published by the Free Software Foundation, either version 3 of the |
1177 | -# License, or (at your option) any later version. |
1178 | -# |
1179 | -# This program is distributed in the hope that it will be useful, |
1180 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1181 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1182 | -# GNU Affero General Public License for more details. |
1183 | -# |
1184 | -# You should have received a copy of the GNU Affero General Public License |
1185 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1186 | -# |
1187 | -############################################################################## |
1188 | - |
1189 | -import analytic_journal |
1190 | -import analytic_balance |
1191 | -import inverted_analytic_balance |
1192 | -import cost_ledger |
1193 | -import quantity_cost_ledger |
1194 | - |
1195 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1196 | - |
1197 | |
1198 | === removed file 'account/project/report/analytic_balance.py' |
1199 | --- account/project/report/analytic_balance.py 2014-04-02 16:40:53 +0000 |
1200 | +++ account/project/report/analytic_balance.py 1970-01-01 00:00:00 +0000 |
1201 | @@ -1,157 +0,0 @@ |
1202 | -# -*- coding: utf-8 -*- |
1203 | -############################################################################## |
1204 | -# |
1205 | -# OpenERP, Open Source Management Solution |
1206 | -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
1207 | -# |
1208 | -# This program is free software: you can redistribute it and/or modify |
1209 | -# it under the terms of the GNU Affero General Public License as |
1210 | -# published by the Free Software Foundation, either version 3 of the |
1211 | -# License, or (at your option) any later version. |
1212 | -# |
1213 | -# This program is distributed in the hope that it will be useful, |
1214 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1215 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1216 | -# GNU Affero General Public License for more details. |
1217 | -# |
1218 | -# You should have received a copy of the GNU Affero General Public License |
1219 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1220 | -# |
1221 | -############################################################################## |
1222 | - |
1223 | -import time |
1224 | -from openerp.osv import osv |
1225 | -from openerp.report import report_sxw |
1226 | - |
1227 | - |
1228 | -class account_analytic_balance(report_sxw.rml_parse): |
1229 | - def __init__(self, cr, uid, name, context): |
1230 | - super(account_analytic_balance, self).__init__(cr, uid, name, context=context) |
1231 | - self.localcontext.update( { |
1232 | - 'time': time, |
1233 | - 'get_objects': self._get_objects, |
1234 | - 'lines_g': self._lines_g, |
1235 | - 'move_sum': self._move_sum, |
1236 | - 'sum_all': self._sum_all, |
1237 | - 'sum_balance': self._sum_balance, |
1238 | - 'move_sum_balance': self._move_sum_balance, |
1239 | - }) |
1240 | - self.acc_ids = [] |
1241 | - self.read_data = [] |
1242 | - self.empty_acc = False |
1243 | - self.acc_data_dict = {}# maintains a relation with an account with its successors. |
1244 | - self.acc_sum_list = []# maintains a list of all ids |
1245 | - |
1246 | - def get_children(self, ids): |
1247 | - read_data = self.pool.get('account.analytic.account').read(self.cr, self.uid, ids,['child_ids','code','complete_name','balance']) |
1248 | - for data in read_data: |
1249 | - if (data['id'] not in self.acc_ids): |
1250 | - inculde_empty = True |
1251 | - if (not self.empty_acc) and data['balance'] == 0.00: |
1252 | - inculde_empty = False |
1253 | - if inculde_empty: |
1254 | - self.acc_ids.append(data['id']) |
1255 | - self.read_data.append(data) |
1256 | - if data['child_ids']: |
1257 | - self.get_children(data['child_ids']) |
1258 | - return True |
1259 | - |
1260 | - def _get_objects(self, empty_acc): |
1261 | - if self.read_data: |
1262 | - return self.read_data |
1263 | - self.empty_acc = empty_acc |
1264 | - self.read_data = [] |
1265 | - self.get_children(self.ids) |
1266 | - return self.read_data |
1267 | - |
1268 | - def _lines_g(self, account_id, date1, date2): |
1269 | - account_analytic_obj = self.pool.get('account.analytic.account') |
1270 | - ids = account_analytic_obj.search(self.cr, self.uid, |
1271 | - [('parent_id', 'child_of', [account_id])]) |
1272 | - self.cr.execute("SELECT aa.name AS name, aa.code AS code, \ |
1273 | - sum(aal.amount) AS balance, sum(aal.unit_amount) AS quantity \ |
1274 | - FROM account_analytic_line AS aal, account_account AS aa \ |
1275 | - WHERE (aal.general_account_id=aa.id) \ |
1276 | - AND (aal.account_id IN %s)\ |
1277 | - AND (date>=%s) AND (date<=%s) AND aa.active \ |
1278 | - GROUP BY aal.general_account_id, aa.name, aa.code, aal.code \ |
1279 | - ORDER BY aal.code", (tuple(ids), date1, date2)) |
1280 | - res = self.cr.dictfetchall() |
1281 | - |
1282 | - for r in res: |
1283 | - if r['balance'] > 0: |
1284 | - r['debit'] = r['balance'] |
1285 | - r['credit'] = 0.0 |
1286 | - elif r['balance'] < 0: |
1287 | - r['debit'] = 0.0 |
1288 | - r['credit'] = -r['balance'] |
1289 | - else: |
1290 | - r['balance'] == 0 |
1291 | - r['debit'] = 0.0 |
1292 | - r['credit'] = 0.0 |
1293 | - return res |
1294 | - |
1295 | - def _move_sum(self, account_id, date1, date2, option): |
1296 | - if account_id not in self.acc_data_dict: |
1297 | - account_analytic_obj = self.pool.get('account.analytic.account') |
1298 | - ids = account_analytic_obj.search(self.cr, self.uid,[('parent_id', 'child_of', [account_id])]) |
1299 | - self.acc_data_dict[account_id] = ids |
1300 | - else: |
1301 | - ids = self.acc_data_dict[account_id] |
1302 | - |
1303 | - query_params = (tuple(ids), date1, date2) |
1304 | - if option == "credit": |
1305 | - self.cr.execute("SELECT COALESCE(-sum(amount),0.0) FROM account_analytic_line \ |
1306 | - WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0",query_params) |
1307 | - elif option == "debit": |
1308 | - self.cr.execute("SELECT COALESCE(sum(amount),0.0) FROM account_analytic_line \ |
1309 | - WHERE account_id IN %s\ |
1310 | - AND date>=%s AND date<=%s AND amount>0",query_params) |
1311 | - elif option == "quantity": |
1312 | - self.cr.execute("SELECT COALESCE(sum(unit_amount),0.0) FROM account_analytic_line \ |
1313 | - WHERE account_id IN %s\ |
1314 | - AND date>=%s AND date<=%s",query_params) |
1315 | - return self.cr.fetchone()[0] or 0.0 |
1316 | - |
1317 | - def _move_sum_balance(self, account_id, date1, date2): |
1318 | - debit = self._move_sum(account_id, date1, date2, 'debit') |
1319 | - credit = self._move_sum(account_id, date1, date2, 'credit') |
1320 | - return (debit-credit) |
1321 | - |
1322 | - def _sum_all(self, accounts, date1, date2, option): |
1323 | - account_analytic_obj = self.pool.get('account.analytic.account') |
1324 | - ids = map(lambda x: x['id'], accounts) |
1325 | - if not ids: |
1326 | - return 0.0 |
1327 | - |
1328 | - if not self.acc_sum_list: |
1329 | - ids2 = account_analytic_obj.search(self.cr, self.uid,[('parent_id', 'child_of', ids)]) |
1330 | - self.acc_sum_list = ids2 |
1331 | - else: |
1332 | - ids2 = self.acc_sum_list |
1333 | - |
1334 | - query_params = (tuple(ids2), date1, date2) |
1335 | - if option == "debit": |
1336 | - self.cr.execute("SELECT COALESCE(sum(amount),0.0) FROM account_analytic_line \ |
1337 | - WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0",query_params) |
1338 | - elif option == "credit": |
1339 | - self.cr.execute("SELECT COALESCE(-sum(amount),0.0) FROM account_analytic_line \ |
1340 | - WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0",query_params) |
1341 | - elif option == "quantity": |
1342 | - self.cr.execute("SELECT COALESCE(sum(unit_amount),0.0) FROM account_analytic_line \ |
1343 | - WHERE account_id IN %s AND date>=%s AND date<=%s",query_params) |
1344 | - return self.cr.fetchone()[0] or 0.0 |
1345 | - |
1346 | - def _sum_balance(self, accounts, date1, date2): |
1347 | - debit = self._sum_all(accounts, date1, date2, 'debit') or 0.0 |
1348 | - credit = self._sum_all(accounts, date1, date2, 'credit') or 0.0 |
1349 | - return (debit-credit) |
1350 | - |
1351 | - |
1352 | -class report_analyticbalance(osv.AbstractModel): |
1353 | - _name = 'report.account.report_analyticbalance' |
1354 | - _inherit = 'report.abstract_report' |
1355 | - _template = 'account.report_analyticbalance' |
1356 | - _wrapped_report_class = account_analytic_balance |
1357 | - |
1358 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1359 | |
1360 | === removed file 'account/project/report/analytic_journal.py' |
1361 | --- account/project/report/analytic_journal.py 2014-04-02 16:40:53 +0000 |
1362 | +++ account/project/report/analytic_journal.py 1970-01-01 00:00:00 +0000 |
1363 | @@ -1,68 +0,0 @@ |
1364 | -# -*- coding: utf-8 -*- |
1365 | -############################################################################## |
1366 | -# |
1367 | -# OpenERP, Open Source Management Solution |
1368 | -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
1369 | -# |
1370 | -# This program is free software: you can redistribute it and/or modify |
1371 | -# it under the terms of the GNU Affero General Public License as |
1372 | -# published by the Free Software Foundation, either version 3 of the |
1373 | -# License, or (at your option) any later version. |
1374 | -# |
1375 | -# This program is distributed in the hope that it will be useful, |
1376 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1377 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1378 | -# GNU Affero General Public License for more details. |
1379 | -# |
1380 | -# You should have received a copy of the GNU Affero General Public License |
1381 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1382 | -# |
1383 | -############################################################################## |
1384 | - |
1385 | -import time |
1386 | -from openerp.osv import osv |
1387 | -from openerp.report import report_sxw |
1388 | - |
1389 | - |
1390 | -# |
1391 | -# Use period and Journal for selection or resources |
1392 | -# |
1393 | -class account_analytic_journal(report_sxw.rml_parse): |
1394 | - def __init__(self, cr, uid, name, context): |
1395 | - super(account_analytic_journal, self).__init__(cr, uid, name, context=context) |
1396 | - self.localcontext.update( { |
1397 | - 'time': time, |
1398 | - 'lines': self._lines, |
1399 | - 'lines_a': self._lines_a, |
1400 | - 'sum_general': self._sum_general, |
1401 | - 'sum_analytic': self._sum_analytic, |
1402 | - }) |
1403 | - |
1404 | - def _lines(self, journal_id, date1, date2): |
1405 | - self.cr.execute('SELECT DISTINCT move_id FROM account_analytic_line WHERE (date>=%s) AND (date<=%s) AND (journal_id=%s) AND (move_id is not null)', (date1, date2, journal_id,)) |
1406 | - ids = map(lambda x: x[0], self.cr.fetchall()) |
1407 | - return self.pool.get('account.move.line').browse(self.cr, self.uid, ids) |
1408 | - |
1409 | - def _lines_a(self, move_id, journal_id, date1, date2): |
1410 | - ids = self.pool.get('account.analytic.line').search(self.cr, self.uid, [('move_id','=',move_id), ('journal_id','=',journal_id), ('date','>=',date1), ('date','<=',date2)]) |
1411 | - if not ids: |
1412 | - return [] |
1413 | - return self.pool.get('account.analytic.line').browse(self.cr, self.uid, ids) |
1414 | - |
1415 | - def _sum_general(self, journal_id, date1, date2): |
1416 | - self.cr.execute('SELECT SUM(debit-credit) FROM account_move_line WHERE id IN (SELECT move_id FROM account_analytic_line WHERE (date>=%s) AND (date<=%s) AND (journal_id=%s) AND (move_id is not null))', (date1, date2, journal_id,)) |
1417 | - return self.cr.fetchall()[0][0] or 0 |
1418 | - |
1419 | - def _sum_analytic(self, journal_id, date1, date2): |
1420 | - self.cr.execute("SELECT SUM(amount) FROM account_analytic_line WHERE date>=%s AND date<=%s AND journal_id=%s", (date1, date2, journal_id)) |
1421 | - res = self.cr.dictfetchone() |
1422 | - return res['sum'] or 0 |
1423 | - |
1424 | - |
1425 | -class report_analyticjournal(osv.AbstractModel): |
1426 | - _name = 'report.account.report_analyticjournal' |
1427 | - _inherit = 'report.abstract_report' |
1428 | - _template = 'account.report_analyticjournal' |
1429 | - _wrapped_report_class = account_analytic_journal |
1430 | - |
1431 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1432 | |
1433 | === removed file 'account/project/report/cost_ledger.py' |
1434 | --- account/project/report/cost_ledger.py 2014-04-02 16:40:53 +0000 |
1435 | +++ account/project/report/cost_ledger.py 1970-01-01 00:00:00 +0000 |
1436 | @@ -1,111 +0,0 @@ |
1437 | -# -*- coding: utf-8 -*- |
1438 | -############################################################################## |
1439 | -# |
1440 | -# OpenERP, Open Source Management Solution |
1441 | -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
1442 | -# |
1443 | -# This program is free software: you can redistribute it and/or modify |
1444 | -# it under the terms of the GNU Affero General Public License as |
1445 | -# published by the Free Software Foundation, either version 3 of the |
1446 | -# License, or (at your option) any later version. |
1447 | -# |
1448 | -# This program is distributed in the hope that it will be useful, |
1449 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1450 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1451 | -# GNU Affero General Public License for more details. |
1452 | -# |
1453 | -# You should have received a copy of the GNU Affero General Public License |
1454 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1455 | -# |
1456 | -############################################################################## |
1457 | - |
1458 | -import time |
1459 | -from openerp.osv import osv |
1460 | -from openerp.report import report_sxw |
1461 | - |
1462 | - |
1463 | -class account_analytic_cost_ledger(report_sxw.rml_parse): |
1464 | - def __init__(self, cr, uid, name, context): |
1465 | - super(account_analytic_cost_ledger, self).__init__(cr, uid, name, context=context) |
1466 | - self.localcontext.update( { |
1467 | - 'time': time, |
1468 | - 'lines_g': self._lines_g, |
1469 | - 'lines_a': self._lines_a, |
1470 | - 'account_sum_debit': self._account_sum_debit, |
1471 | - 'account_sum_credit': self._account_sum_credit, |
1472 | - 'account_sum_balance': self._account_sum_balance, |
1473 | - 'sum_debit': self._sum_debit, |
1474 | - 'sum_credit': self._sum_credit, |
1475 | - 'sum_balance': self._sum_balance, |
1476 | - }) |
1477 | - self.children = {} # a memo for the method _get_children |
1478 | - |
1479 | - def _get_children(self, accounts): |
1480 | - """ return all children accounts of the given accounts |
1481 | - :param accounts: list of browse records of 'account.analytic.account' |
1482 | - :return: tuple of account ids |
1483 | - """ |
1484 | - analytic_obj = self.pool.get('account.analytic.account') |
1485 | - res = set() |
1486 | - for account in accounts: |
1487 | - if account.id not in self.children: |
1488 | - self.children[account.id] = analytic_obj.search(self.cr, self.uid, [('parent_id', 'child_of', [account.id])]) |
1489 | - res.update(self.children[account.id]) |
1490 | - return tuple(res) |
1491 | - |
1492 | - def _lines_g(self, account, date1, date2): |
1493 | - self.cr.execute("SELECT sum(aal.amount) AS balance, aa.code AS code, aa.name AS name, aa.id AS id \ |
1494 | - FROM account_account AS aa, account_analytic_line AS aal \ |
1495 | - WHERE (aal.account_id IN %s) AND (aal.date>=%s) AND (aal.date<=%s) AND (aal.general_account_id=aa.id) AND aa.active \ |
1496 | - GROUP BY aa.code, aa.name, aa.id ORDER BY aa.code", (self._get_children([account]), date1, date2)) |
1497 | - res = self.cr.dictfetchall() |
1498 | - for r in res: |
1499 | - r['debit'] = r['balance'] if r['balance'] > 0 else 0.0 |
1500 | - r['credit'] = -r['balance'] if r['balance'] < 0 else 0.0 |
1501 | - return res |
1502 | - |
1503 | - def _lines_a(self, general_account, account, date1, date2): |
1504 | - self.cr.execute("SELECT aal.name AS name, aal.code AS code, aal.amount AS balance, aal.date AS date, aaj.code AS cj FROM account_analytic_line AS aal, account_analytic_journal AS aaj \ |
1505 | - WHERE (aal.general_account_id=%s) AND (aal.account_id IN %s) AND (aal.date>=%s) AND (aal.date<=%s) \ |
1506 | - AND (aal.journal_id=aaj.id) \ |
1507 | - ORDER BY aal.date, aaj.code, aal.code", (general_account['id'], self._get_children([account]), date1, date2)) |
1508 | - res = self.cr.dictfetchall() |
1509 | - for r in res: |
1510 | - r['debit'] = r['balance'] if r['balance'] > 0 else 0.0 |
1511 | - r['credit'] = -r['balance'] if r['balance'] < 0 else 0.0 |
1512 | - return res |
1513 | - |
1514 | - def _account_sum_debit(self, account, date1, date2): |
1515 | - return self._sum_debit([account], date1, date2) |
1516 | - |
1517 | - def _account_sum_credit(self, account, date1, date2): |
1518 | - return self._sum_credit([account], date1, date2) |
1519 | - |
1520 | - def _account_sum_balance(self, account, date1, date2): |
1521 | - debit = self._account_sum_debit(account, date1, date2) |
1522 | - credit = self._account_sum_credit(account, date1, date2) |
1523 | - return (debit-credit) |
1524 | - |
1525 | - def _sum_debit(self, accounts, date1, date2): |
1526 | - self.cr.execute("SELECT sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0", |
1527 | - (self._get_children(accounts), date1, date2,)) |
1528 | - return self.cr.fetchone()[0] or 0.0 |
1529 | - |
1530 | - def _sum_credit(self, accounts, date1, date2): |
1531 | - self.cr.execute("SELECT -sum(amount) FROM account_analytic_line WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0", |
1532 | - (self._get_children(accounts), date1, date2,)) |
1533 | - return self.cr.fetchone()[0] or 0.0 |
1534 | - |
1535 | - def _sum_balance(self, accounts, date1, date2): |
1536 | - debit = self._sum_debit(accounts, date1, date2) |
1537 | - credit = self._sum_credit(accounts, date1, date2) |
1538 | - return (debit-credit) |
1539 | - |
1540 | - |
1541 | -class report_analyticcostledger(osv.AbstractModel): |
1542 | - _name = 'report.account.report_analyticcostledger' |
1543 | - _inherit = 'report.abstract_report' |
1544 | - _template = 'account.report_analyticcostledger' |
1545 | - _wrapped_report_class = account_analytic_cost_ledger |
1546 | - |
1547 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1548 | |
1549 | === removed file 'account/project/report/inverted_analytic_balance.py' |
1550 | --- account/project/report/inverted_analytic_balance.py 2014-04-02 16:40:53 +0000 |
1551 | +++ account/project/report/inverted_analytic_balance.py 1970-01-01 00:00:00 +0000 |
1552 | @@ -1,130 +0,0 @@ |
1553 | -# -*- coding: utf-8 -*- |
1554 | -############################################################################## |
1555 | -# |
1556 | -# OpenERP, Open Source Management Solution |
1557 | -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
1558 | -# |
1559 | -# This program is free software: you can redistribute it and/or modify |
1560 | -# it under the terms of the GNU Affero General Public License as |
1561 | -# published by the Free Software Foundation, either version 3 of the |
1562 | -# License, or (at your option) any later version. |
1563 | -# |
1564 | -# This program is distributed in the hope that it will be useful, |
1565 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1566 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1567 | -# GNU Affero General Public License for more details. |
1568 | -# |
1569 | -# You should have received a copy of the GNU Affero General Public License |
1570 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1571 | -# |
1572 | -############################################################################## |
1573 | - |
1574 | -import time |
1575 | -from openerp.osv import osv |
1576 | -from openerp.report import report_sxw |
1577 | - |
1578 | -class account_inverted_analytic_balance(report_sxw.rml_parse): |
1579 | - def __init__(self, cr, uid, name, context): |
1580 | - super(account_inverted_analytic_balance, self).__init__(cr, uid, name, context=context) |
1581 | - self.localcontext.update( { |
1582 | - 'time': time, |
1583 | - 'lines_g': self._lines_g, |
1584 | - 'lines_a': self._lines_a, |
1585 | - 'sum_debit': self._sum_debit, |
1586 | - 'sum_credit': self._sum_credit, |
1587 | - 'sum_balance': self._sum_balance, |
1588 | - 'sum_quantity': self._sum_quantity, |
1589 | - }) |
1590 | - |
1591 | - def _lines_g(self, accounts, date1, date2): |
1592 | - ids = map(lambda x: x.id, accounts) |
1593 | - self.cr.execute("SELECT aa.name AS name, aa.code AS code, " |
1594 | - "sum(aal.amount) AS balance, " |
1595 | - "sum(aal.unit_amount) AS quantity, aa.id AS id \ |
1596 | - FROM account_analytic_line AS aal, account_account AS aa \ |
1597 | - WHERE (aal.general_account_id=aa.id) " |
1598 | - "AND (aal.account_id IN %s) " |
1599 | - "AND (date>=%s) AND (date<=%s) AND aa.active \ |
1600 | - GROUP BY aal.general_account_id, aa.name, aa.code, aal.code, aa.id " |
1601 | - "ORDER BY aal.code", |
1602 | - (tuple(ids), date1, date2)) |
1603 | - res = self.cr.dictfetchall() |
1604 | - for r in res: |
1605 | - if r['balance'] > 0: |
1606 | - r['debit'] = r['balance'] |
1607 | - r['credit'] = 0.0 |
1608 | - elif r['balance'] < 0: |
1609 | - r['debit'] = 0.0 |
1610 | - r['credit'] = -r['balance'] |
1611 | - else: |
1612 | - r['debit'] = 0.0 |
1613 | - r['credit'] = 0.0 |
1614 | - return res |
1615 | - |
1616 | - def _lines_a(self, accounts, general_account_id, date1, date2): |
1617 | - ids = map(lambda x: x.id, accounts) |
1618 | - self.cr.execute("SELECT sum(aal.amount) AS balance, " |
1619 | - "sum(aal.unit_amount) AS quantity, " |
1620 | - "aaa.code AS code, aaa.name AS name, account_id \ |
1621 | - FROM account_analytic_line AS aal, " |
1622 | - "account_analytic_account AS aaa \ |
1623 | - WHERE aal.account_id=aaa.id AND aal.account_id IN %s " |
1624 | - "AND aal.general_account_id=%s AND aal.date>=%s " |
1625 | - "AND aal.date<=%s \ |
1626 | - GROUP BY aal.account_id, general_account_id, aaa.code, aaa.name " |
1627 | - "ORDER BY aal.account_id", |
1628 | - (tuple(ids), general_account_id, date1, date2)) |
1629 | - res = self.cr.dictfetchall() |
1630 | - |
1631 | - aaa_obj = self.pool.get('account.analytic.account') |
1632 | - res2 = aaa_obj.read(self.cr, self.uid, ids, ['complete_name']) |
1633 | - complete_name = {} |
1634 | - for r in res2: |
1635 | - complete_name[r['id']] = r['complete_name'] |
1636 | - for r in res: |
1637 | - r['complete_name'] = complete_name[r['account_id']] |
1638 | - if r['balance'] > 0: |
1639 | - r['debit'] = r['balance'] |
1640 | - r['credit'] = 0.0 |
1641 | - elif r['balance'] < 0: |
1642 | - r['debit'] = 0.0 |
1643 | - r['credit'] = -r['balance'] |
1644 | - else: |
1645 | - r['debit'] = 0.0 |
1646 | - r['credit'] = 0.0 |
1647 | - return res |
1648 | - |
1649 | - def _sum_debit(self, accounts, date1, date2): |
1650 | - ids = map(lambda x: x.id, accounts) |
1651 | - self.cr.execute("SELECT sum(amount) \ |
1652 | - FROM account_analytic_line \ |
1653 | - WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0", (tuple(ids),date1, date2,)) |
1654 | - return self.cr.fetchone()[0] or 0.0 |
1655 | - |
1656 | - def _sum_credit(self, accounts, date1, date2): |
1657 | - ids = map(lambda x: x.id, accounts) |
1658 | - self.cr.execute("SELECT -sum(amount) \ |
1659 | - FROM account_analytic_line \ |
1660 | - WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0", (tuple(ids),date1, date2,)) |
1661 | - return self.cr.fetchone()[0] or 0.0 |
1662 | - |
1663 | - def _sum_balance(self, accounts, date1, date2): |
1664 | - debit = self._sum_debit(accounts, date1, date2) |
1665 | - credit = self._sum_credit(accounts, date1, date2) |
1666 | - return (debit-credit) |
1667 | - |
1668 | - def _sum_quantity(self, accounts, date1, date2): |
1669 | - ids = map(lambda x: x.id, accounts) |
1670 | - self.cr.execute("SELECT sum(unit_amount) \ |
1671 | - FROM account_analytic_line \ |
1672 | - WHERE account_id IN %s AND date>=%s AND date<=%s", (tuple(ids),date1, date2,)) |
1673 | - return self.cr.fetchone()[0] or 0.0 |
1674 | - |
1675 | - |
1676 | -class report_invertedanalyticbalance(osv.AbstractModel): |
1677 | - _name = 'report.account.report_invertedanalyticbalance' |
1678 | - _inherit = 'report.abstract_report' |
1679 | - _template = 'account.report_invertedanalyticbalance' |
1680 | - _wrapped_report_class = account_inverted_analytic_balance |
1681 | - |
1682 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1683 | |
1684 | === removed file 'account/project/report/quantity_cost_ledger.py' |
1685 | --- account/project/report/quantity_cost_ledger.py 2014-04-02 16:40:53 +0000 |
1686 | +++ account/project/report/quantity_cost_ledger.py 1970-01-01 00:00:00 +0000 |
1687 | @@ -1,127 +0,0 @@ |
1688 | -# -*- coding: utf-8 -*- |
1689 | -############################################################################## |
1690 | -# |
1691 | -# OpenERP, Open Source Management Solution |
1692 | -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
1693 | -# |
1694 | -# This program is free software: you can redistribute it and/or modify |
1695 | -# it under the terms of the GNU Affero General Public License as |
1696 | -# published by the Free Software Foundation, either version 3 of the |
1697 | -# License, or (at your option) any later version. |
1698 | -# |
1699 | -# This program is distributed in the hope that it will be useful, |
1700 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
1701 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1702 | -# GNU Affero General Public License for more details. |
1703 | -# |
1704 | -# You should have received a copy of the GNU Affero General Public License |
1705 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
1706 | -# |
1707 | -############################################################################## |
1708 | -import time |
1709 | -from openerp.osv import osv |
1710 | -from openerp.report import report_sxw |
1711 | - |
1712 | - |
1713 | -class account_analytic_quantity_cost_ledger(report_sxw.rml_parse): |
1714 | - def __init__(self, cr, uid, name, context): |
1715 | - super(account_analytic_quantity_cost_ledger, self).__init__(cr, uid, name, context=context) |
1716 | - self.localcontext.update( { |
1717 | - 'time': time, |
1718 | - 'lines_g': self._lines_g, |
1719 | - 'lines_a': self._lines_a, |
1720 | - 'sum_quantity': self._sum_quantity, |
1721 | - 'account_sum_quantity': self._account_sum_quantity, |
1722 | - }) |
1723 | - |
1724 | - def _lines_g(self, account_id, date1, date2, journals): |
1725 | - if not journals: |
1726 | - self.cr.execute("SELECT sum(aal.unit_amount) AS quantity, \ |
1727 | - aa.code AS code, aa.name AS name, aa.id AS id \ |
1728 | - FROM account_account AS aa, account_analytic_line AS aal \ |
1729 | - WHERE (aal.account_id=%s) AND (aal.date>=%s) \ |
1730 | - AND (aal.date<=%s) AND (aal.general_account_id=aa.id) \ |
1731 | - AND aa.active \ |
1732 | - GROUP BY aa.code, aa.name, aa.id ORDER BY aa.code", |
1733 | - (account_id, date1, date2)) |
1734 | - else: |
1735 | - journal_ids = journals |
1736 | - self.cr.execute("SELECT sum(aal.unit_amount) AS quantity, \ |
1737 | - aa.code AS code, aa.name AS name, aa.id AS id \ |
1738 | - FROM account_account AS aa, account_analytic_line AS aal \ |
1739 | - WHERE (aal.account_id=%s) AND (aal.date>=%s) \ |
1740 | - AND (aal.date<=%s) AND (aal.general_account_id=aa.id) \ |
1741 | - AND aa.active \ |
1742 | - AND (aal.journal_id IN %s ) \ |
1743 | - GROUP BY aa.code, aa.name, aa.id ORDER BY aa.code", |
1744 | - (account_id, date1, date2, tuple(journal_ids))) |
1745 | - res = self.cr.dictfetchall() |
1746 | - return res |
1747 | - |
1748 | - def _lines_a(self, general_account_id, account_id, date1, date2, journals): |
1749 | - if not journals: |
1750 | - self.cr.execute("SELECT aal.name AS name, aal.code AS code, \ |
1751 | - aal.unit_amount AS quantity, aal.date AS date, \ |
1752 | - aaj.code AS cj \ |
1753 | - FROM account_analytic_line AS aal, \ |
1754 | - account_analytic_journal AS aaj \ |
1755 | - WHERE (aal.general_account_id=%s) AND (aal.account_id=%s) \ |
1756 | - AND (aal.date>=%s) AND (aal.date<=%s) \ |
1757 | - AND (aal.journal_id=aaj.id) \ |
1758 | - ORDER BY aal.date, aaj.code, aal.code", |
1759 | - (general_account_id, account_id, date1, date2)) |
1760 | - else: |
1761 | - journal_ids = journals |
1762 | - self.cr.execute("SELECT aal.name AS name, aal.code AS code, \ |
1763 | - aal.unit_amount AS quantity, aal.date AS date, \ |
1764 | - aaj.code AS cj \ |
1765 | - FROM account_analytic_line AS aal, \ |
1766 | - account_analytic_journal AS aaj \ |
1767 | - WHERE (aal.general_account_id=%s) AND (aal.account_id=%s) \ |
1768 | - AND (aal.date>=%s) AND (aal.date<=%s) \ |
1769 | - AND (aal.journal_id=aaj.id) AND (aaj.id IN %s) \ |
1770 | - ORDER BY aal.date, aaj.code, aal.code", |
1771 | - (general_account_id, account_id, date1, date2,tuple(journal_ids))) |
1772 | - res = self.cr.dictfetchall() |
1773 | - return res |
1774 | - |
1775 | - def _account_sum_quantity(self, account_id, date1, date2, journals): |
1776 | - if not journals: |
1777 | - self.cr.execute("SELECT sum(unit_amount) \ |
1778 | - FROM account_analytic_line \ |
1779 | - WHERE account_id=%s AND date>=%s AND date<=%s", |
1780 | - (account_id, date1, date2)) |
1781 | - else: |
1782 | - journal_ids = journals |
1783 | - self.cr.execute("SELECT sum(unit_amount) \ |
1784 | - FROM account_analytic_line \ |
1785 | - WHERE account_id = %s AND date >= %s AND date <= %s \ |
1786 | - AND journal_id IN %s", |
1787 | - (account_id, date1, date2, tuple(journal_ids),)) |
1788 | - return self.cr.fetchone()[0] or 0.0 |
1789 | - |
1790 | - def _sum_quantity(self, accounts, date1, date2, journals): |
1791 | - ids = map(lambda x: x.id, accounts) |
1792 | - if not ids: |
1793 | - return 0.0 |
1794 | - if not journals: |
1795 | - self.cr.execute("SELECT sum(unit_amount) \ |
1796 | - FROM account_analytic_line \ |
1797 | - WHERE account_id IN %s AND date>=%s AND date<=%s", |
1798 | - (tuple(ids), date1, date2,)) |
1799 | - else: |
1800 | - journal_ids = journals |
1801 | - self.cr.execute("SELECT sum(unit_amount) \ |
1802 | - FROM account_analytic_line \ |
1803 | - WHERE account_id IN %s AND date >= %s AND date <= %s \ |
1804 | - AND journal_id IN %s",(tuple(ids), date1, date2, tuple(journal_ids))) |
1805 | - return self.cr.fetchone()[0] or 0.0 |
1806 | - |
1807 | - |
1808 | -class report_analyticcostledgerquantity(osv.AbstractModel): |
1809 | - _name = 'report.account.report_analyticcostledgerquantity' |
1810 | - _inherit = 'report.abstract_report' |
1811 | - _template = 'account.report_analyticcostledgerquantity' |
1812 | - _wrapped_report_class = account_analytic_quantity_cost_ledger |
1813 | - |
1814 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
1815 | |
1816 | === removed directory 'account/project/views' |
1817 | === removed file 'account/project/views/report_analyticbalance.xml' |
1818 | --- account/project/views/report_analyticbalance.xml 2014-04-02 16:40:53 +0000 |
1819 | +++ account/project/views/report_analyticbalance.xml 1970-01-01 00:00:00 +0000 |
1820 | @@ -1,62 +0,0 @@ |
1821 | -<?xml version="1.0" encoding="utf-8"?> |
1822 | -<openerp> |
1823 | -<data> |
1824 | -<template id="report_analyticbalance"> |
1825 | - <t t-call="report.html_container"> |
1826 | - <t t-call="report.internal_layout"> |
1827 | - <div class="page"> |
1828 | - <h2>Analytic Balance - <span t-esc="res_company.currency_id.name"/></h2> |
1829 | - |
1830 | - <table class="table table-condensed"> |
1831 | - <thead> |
1832 | - <tr> |
1833 | - <th>Code</th> |
1834 | - <th>Account Name</th> |
1835 | - <th>Debit</th> |
1836 | - <th>Credit</th> |
1837 | - <th>Balance</th> |
1838 | - <th>Quantity</th> |
1839 | - </tr> |
1840 | - </thead> |
1841 | - <tbody> |
1842 | - <tr> |
1843 | - <td colspan="2">Total</td> |
1844 | - <td> |
1845 | - <span t-esc="formatLang(sum_all(get_objects(data['form']['empty_acc']), data['form']['date1'], data['form']['date2'], 'debit'))"/> |
1846 | - </td> |
1847 | - <td> |
1848 | - <span t-esc="formatLang(sum_all(get_objects(data['form']['empty_acc']), data['form']['date1'], data['form']['date2'], 'credit'))"/> |
1849 | - </td> |
1850 | - <td> |
1851 | - <span t-esc="formatLang(sum_balance(get_objects(data['form']['empty_acc']), data['form']['date1'], data['form']['date2']),currency_obj=res_company.currency_id)"/> |
1852 | - </td> |
1853 | - <td> |
1854 | - <span t-esc="formatLang(sum_all(get_objects(data['form']['empty_acc']), data['form']['date1'], data['form']['date2'], 'quantity'))"/> |
1855 | - </td> |
1856 | - </tr> |
1857 | - <t t-foreach="get_objects(data['form']['empty_acc'])" t-as="o"> |
1858 | - <tr> |
1859 | - <td><span t-esc="o['code']"/></td> |
1860 | - <td><span t-esc="o['complete_name']"/></td> |
1861 | - <td><span t-esc="formatLang(move_sum(o['id'], data['form']['date1'], data['form']['date2'], 'debit'))"/></td> |
1862 | - <td><span t-esc="formatLang(move_sum(o['id'], data['form']['date1'], data['form']['date2'], 'credit'))"/></td> |
1863 | - <td><span t-esc="formatLang(move_sum_balance(o['id'], data['form']['date1'], data['form']['date2']), currency_obj=res_company.currency_id)"/></td> |
1864 | - <td><span t-esc="formatLang(move_sum(o['id'], data['form']['date1'], data['form']['date2'], 'quantity'))"/></td> |
1865 | - </tr> |
1866 | - <tr t-foreach="lines_g(o['id'], data['form']['date1'], data['form']['date2'])" t-as="move_g"> |
1867 | - <td><span t-esc="move_g['code']"/></td> |
1868 | - <td><span t-esc="move_g['name']"/></td> |
1869 | - <td><span t-esc="formatLang(move_g['debit'])"/></td> |
1870 | - <td><span t-esc="formatLang(move_g['credit'])"/></td> |
1871 | - <td><span t-esc="formatLang(move_g['balance'], currency_obj=res_company.currency_id)"/></td> |
1872 | - <td><span t-esc="formatLang(move_g['quantity'])"/></td> |
1873 | - </tr> |
1874 | - </t> |
1875 | - </tbody> |
1876 | - </table> |
1877 | - </div> |
1878 | - </t> |
1879 | - </t> |
1880 | -</template> |
1881 | -</data> |
1882 | -</openerp> |
1883 | |
1884 | === removed file 'account/project/views/report_analyticcostledger.xml' |
1885 | --- account/project/views/report_analyticcostledger.xml 2014-04-02 16:40:53 +0000 |
1886 | +++ account/project/views/report_analyticcostledger.xml 1970-01-01 00:00:00 +0000 |
1887 | @@ -1,90 +0,0 @@ |
1888 | -<?xml version="1.0" encoding="utf-8"?> |
1889 | -<openerp> |
1890 | -<data> |
1891 | -<template id="report_analyticcostledger"> |
1892 | - <t t-call="report.html_container"> |
1893 | - <t t-call="report.internal_layout"> |
1894 | - <div class="page"> |
1895 | - <h2>Cost Ledger</h2> |
1896 | - |
1897 | - <div class="row mt32 mb32"> |
1898 | - <div class="col-xs-3"> |
1899 | - <strong>Period From:</strong> |
1900 | - <p t-esc="formatLang(data['form']['date1'], date=True)"/> |
1901 | - </div> |
1902 | - <div class="col-xs-3"> |
1903 | - <strong>Period To:</strong> |
1904 | - <p t-esc="formatLang(data['form']['date2'], date=True)"/> |
1905 | - </div> |
1906 | - <div class="col-xs-3"> |
1907 | - <strong>Printing Date:</strong> |
1908 | - <p t-esc="formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time=True)" /> |
1909 | - </div> |
1910 | - </div> |
1911 | - |
1912 | - <table class="table table-condensed"> |
1913 | - <thead> |
1914 | - <tr> |
1915 | - <th>Date/Code</th> |
1916 | - <th>J.C. /Move</th> |
1917 | - <th>Name</th> |
1918 | - <th>Debit</th> |
1919 | - <th>Credit</th> |
1920 | - <th>Balance</th> |
1921 | - </tr> |
1922 | - </thead> |
1923 | - <tbody> |
1924 | - <tr style="font-weight: bold;"> |
1925 | - <td>Total:</td> |
1926 | - <td></td> |
1927 | - <td></td> |
1928 | - <td><span t-esc="formatLang(sum_debit(docs, data['form']['date1'], data['form']['date2']))"/></td> |
1929 | - <td><span t-esc="formatLang(sum_credit(docs,data['form']['date1'],data['form']['date2']))"/></td> |
1930 | - <td> |
1931 | - <span t-esc="formatLang(sum_debit(docs, data['form']['date1'], data['form']['date2']) - sum_credit(docs, data['form']['date1'], data['form']['date2']), currency_obj=res_company.currency_id)"/> |
1932 | - </td> |
1933 | - </tr> |
1934 | - |
1935 | - <t t-foreach="docs" t-as="account"> |
1936 | - <tr style="font-weight: bold;"> |
1937 | - <td><span t-esc="account.code"/></td> |
1938 | - <td></td> |
1939 | - <td><span t-esc="account.complete_name"/></td> |
1940 | - <td><span t-esc="formatLang(sum_debit([account], data['form']['date1'], data['form']['date2']))"/></td> |
1941 | - <td><span t-esc="formatLang(sum_credit([account], data['form']['date1'], data['form']['date2']))"/></td> |
1942 | - <td><span t-esc="formatLang(sum_debit([account], data['form']['date1'], data['form']['date2']) - sum_credit([account], data['form']['date1'], data['form']['date2']), currency_obj=res_company.currency_id)"/></td> |
1943 | - </tr> |
1944 | - |
1945 | - <t t-foreach="lines_g(account, data['form']['date1'], data['form']['date2'])" t-as="move_g"> |
1946 | - <tr> |
1947 | - <td><span t-esc="move_g['code']"/></td> |
1948 | - <td></td> |
1949 | - <td><span t-esc="move_g['name']"/></td> |
1950 | - <td><span t-esc="move_g['debit']"/></td> |
1951 | - <td><span t-esc="move_g['credit']"/></td> |
1952 | - <td> |
1953 | - <span t-esc="formatLang(move_g['balance'], currency_obj=res_company.currency_id)"/> |
1954 | - </td> |
1955 | - </tr> |
1956 | - <tr t-foreach="lines_a(move_g, account, data['form']['date1'], data['form']['date2'])" t-as="move_a"> |
1957 | - <td> |
1958 | - <t t-esc="formatLang(move_a['date'], date=True)"></t> |
1959 | - </td> |
1960 | - <td><span t-esc="move_a['cj']"/></td> |
1961 | - <td><span t-esc="move_a['name']"/></td> |
1962 | - <td><span t-esc="move_a['debit']"/></td> |
1963 | - <td><span t-esc="move_a['credit']"/></td> |
1964 | - <td> |
1965 | - <span t-esc="formatLang(move_a['balance'], currency_obj=res_company.currency_id)"/> |
1966 | - </td> |
1967 | - </tr> |
1968 | - </t> |
1969 | - </t> |
1970 | - </tbody> |
1971 | - </table> |
1972 | - </div> |
1973 | - </t> |
1974 | - </t> |
1975 | -</template> |
1976 | -</data> |
1977 | -</openerp> |
1978 | \ No newline at end of file |
1979 | |
1980 | === removed file 'account/project/views/report_analyticcostledgerquantity.xml' |
1981 | --- account/project/views/report_analyticcostledgerquantity.xml 2014-04-02 16:40:53 +0000 |
1982 | +++ account/project/views/report_analyticcostledgerquantity.xml 1970-01-01 00:00:00 +0000 |
1983 | @@ -1,87 +0,0 @@ |
1984 | -<?xml version="1.0" encoding="utf-8"?> |
1985 | -<openerp> |
1986 | -<data> |
1987 | -<template id="report_analyticcostledgerquantity"> |
1988 | - <t t-call="report.html_container"> |
1989 | - <t t-call="report.internal_layout"> |
1990 | - <div class="page"> |
1991 | - <h2>Cost Ledger</h2> |
1992 | - |
1993 | - <div class="row mt32 mb32"> |
1994 | - <div class="col-xs-3"> |
1995 | - <strong>Period From:</strong> |
1996 | - <p t-esc="formatLang(data['form']['date1'], date=True)"/> |
1997 | - </div> |
1998 | - <div class="col-xs-3"> |
1999 | - <strong>Period To:</strong> |
2000 | - <p t-esc="formatLang(data['form']['date2'], date=True)"/> |
2001 | - </div> |
2002 | - <div class="col-xs-3"> |
2003 | - <strong>Printing Date:</strong> |
2004 | - <p t-esc="formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time=True)" /> |
2005 | - </div> |
2006 | - </div> |
2007 | - |
2008 | - <table class="table table-condensed"> |
2009 | - <thead> |
2010 | - <tr> |
2011 | - <th>Date/Code</th> |
2012 | - <th>J.C./Move</th> |
2013 | - <th>Name</th> |
2014 | - <th>Quantity</th> |
2015 | - <th>Total</th> |
2016 | - </tr> |
2017 | - </thead> |
2018 | - <tbody> |
2019 | - <tr style="font-weight:bold;"> |
2020 | - <td>Total:</td> |
2021 | - <td></td> |
2022 | - <td></td> |
2023 | - <td></td> |
2024 | - <td> |
2025 | - <span t-esc="sum_quantity(docs, data['form']['date1'], data['form']['date2'], data['form']['journal'])"/> |
2026 | - </td> |
2027 | - </tr> |
2028 | - |
2029 | - <t t-foreach="docs" t-as="account"> |
2030 | - <tr style="font-weight:bold;"> |
2031 | - <td><span t-esc="account.code"/></td> |
2032 | - <td><span t-esc="account.complete_name"/></td> |
2033 | - <td></td> |
2034 | - <td> |
2035 | - <p t-if="account.quantity_max"> |
2036 | - Max quantity : <span t-esc="formatLang(account.quantity_max)"/> |
2037 | - </p> |
2038 | - </td> |
2039 | - <td> |
2040 | - <span t-esc="account_sum_quantity(account.id, data['form']['date1'], data['form']['date2'], data['form']['journal'])"/> |
2041 | - </td> |
2042 | - </tr> |
2043 | - |
2044 | - <t t-foreach="lines_g(account.id, data['form']['date1'], data['form']['date2'], data['form']['journal'])" t-as="move_g"> |
2045 | - <tr style="font-weight:bold;"> |
2046 | - <td><span t-esc="move_g['code']"/></td> |
2047 | - <td colspan="2"><span t-esc="move_g['name']"/></td> |
2048 | - <td></td> |
2049 | - <td class="text-right"><span t-esc="move_g['quantity']"/></td> |
2050 | - </tr> |
2051 | - |
2052 | - <t t-foreach="lines_a(move_g['id'], account.id, data['form']['date1'], data['form']['date2'], data['form']['journal'])" t-as="move_a"> |
2053 | - <tr style="font-weight:normal;"> |
2054 | - <td><span t-esc="formatLang(move_a['date'], date=True)"/></td> |
2055 | - <td><span t-esc="move_a['cj']"/></td> |
2056 | - <td><span t-esc="move_a['name']"/></td> |
2057 | - <td></td> |
2058 | - <td class="text-right"><span t-esc="move_a['quantity']"/></td> |
2059 | - </tr> |
2060 | - </t> |
2061 | - </t> |
2062 | - </t> |
2063 | - </tbody> |
2064 | - </table> |
2065 | - </div> |
2066 | - </t> |
2067 | - </t> |
2068 | -</template> |
2069 | -</data> |
2070 | -</openerp> |
2071 | \ No newline at end of file |
2072 | |
2073 | === removed file 'account/project/views/report_analyticjournal.xml' |
2074 | --- account/project/views/report_analyticjournal.xml 2014-04-02 16:40:53 +0000 |
2075 | +++ account/project/views/report_analyticjournal.xml 1970-01-01 00:00:00 +0000 |
2076 | @@ -1,90 +0,0 @@ |
2077 | -<?xml version="1.0" encoding="utf-8"?> |
2078 | -<openerp> |
2079 | -<data> |
2080 | -<template id="report_analyticjournal"> |
2081 | - <t t-call="report.html_container"> |
2082 | - <t t-foreach="docs" t-as="o"> |
2083 | - <t t-call="report.internal_layout"> |
2084 | - <div class="page"> |
2085 | - <h2>Analytic Journal</h2> |
2086 | - |
2087 | - <div class="row mt32 mb32"> |
2088 | - <div class="col-xs-3"> |
2089 | - <strong>Period From:</strong> |
2090 | - <p t-esc="formatLang(data['form']['date1'], date=True)"/> |
2091 | - </div> |
2092 | - <div class="col-xs-3"> |
2093 | - <strong>Period To:</strong> |
2094 | - <p t-esc="formatLang(data['form']['date2'], date=True)"/> |
2095 | - </div> |
2096 | - <div class="col-xs-3"> |
2097 | - <strong>Currency:</strong> |
2098 | - <p t-field="res_company.currency_id" /> |
2099 | - </div> |
2100 | - </div> |
2101 | - |
2102 | - <table class="table table-condensed"> |
2103 | - <thead> |
2104 | - <tr> |
2105 | - <th>Date</th> |
2106 | - <th>Code</th> |
2107 | - <th>Move Name</th> |
2108 | - <th>Account n°</th> |
2109 | - <th>General</th> |
2110 | - <th>Analytic</th> |
2111 | - </tr> |
2112 | - <tr> |
2113 | - <th colspan="4"><t t-if="o.code"><span t-esc="o.code"/></t> - <span t-esc="o.name"/></th> |
2114 | - <th><span t-esc="formatLang(sum_general(o.id, data['form']['date1'], data['form']['date2']))"/></th> |
2115 | - <th><span t-esc="formatLang(sum_analytic(o.id, data['form']['date1'], data['form']['date2']))"/></th> |
2116 | - </tr> |
2117 | - </thead> |
2118 | - <tbody> |
2119 | - <t t-foreach="lines(o.id, data['form']['date1'], data['form']['date2'])" t-as="move"> |
2120 | - <tr> |
2121 | - <td></td> |
2122 | - <td></td> |
2123 | - <td> |
2124 | - <span t-esc="move.name"/> |
2125 | - </td> |
2126 | - <td> |
2127 | - <span t-esc="move.account_id.code"/> |
2128 | - <span t-esc="move.account_id.name"/> |
2129 | - </td> |
2130 | - <td> |
2131 | - <span t-esc="formatLang(move.debit-move.credit)"/> |
2132 | - </td> |
2133 | - <td></td> |
2134 | - </tr> |
2135 | - <tr t-foreach="lines_a(move.id, o.id, data['form']['date1'], data['form']['date2'])" t-as="move_a"> |
2136 | - <td> |
2137 | - <span t-esc="formatLang(move_a.date,date = True)"/> |
2138 | - </td> |
2139 | - <td> |
2140 | - <p t-if="move_a.code"><span t-esc="move_a.code"/></p> |
2141 | - </td> |
2142 | - <td> |
2143 | - <span t-esc="move_a.name"/> |
2144 | - </td> |
2145 | - <td><span t-esc="move_a.account_id.code"/> - <span t-esc="move_a.account_id.name"/></td> |
2146 | - <td></td> |
2147 | - <td><span t-esc="formatLang(move_a.amount)"/></td> |
2148 | - </tr> |
2149 | - </t> |
2150 | - <tr t-foreach="lines_a(False, o.id, data['form']['date1'], data['form']['date2'])" t-as="move_a"> |
2151 | - <td><span t-esc="formatLang(move_a.date,date = True)"/></td> |
2152 | - <td><p t-if="move_a.code"><span t-esc="move_a.code"/></p></td> |
2153 | - <td><span t-esc="move_a.name"/></td> |
2154 | - <td><span t-esc="move_a.account_id.code"/> - <span t-esc="move_a.account_id.name"/></td> |
2155 | - <td></td> |
2156 | - <td><span t-esc="formatLang(move_a.amount)"/></td> |
2157 | - </tr> |
2158 | - </tbody> |
2159 | - </table> |
2160 | - </div> |
2161 | - </t> |
2162 | - </t> |
2163 | - </t> |
2164 | -</template> |
2165 | -</data> |
2166 | -</openerp> |
2167 | |
2168 | === removed file 'account/project/views/report_invertedanalyticbalance.xml' |
2169 | --- account/project/views/report_invertedanalyticbalance.xml 2014-04-02 16:40:53 +0000 |
2170 | +++ account/project/views/report_invertedanalyticbalance.xml 1970-01-01 00:00:00 +0000 |
2171 | @@ -1,91 +0,0 @@ |
2172 | -<?xml version="1.0" encoding="utf-8"?> |
2173 | -<openerp> |
2174 | -<data> |
2175 | -<template id="report_invertedanalyticbalance"> |
2176 | - <t t-call="report.html_container"> |
2177 | - <t t-call="report.internal_layout"> |
2178 | - <div class="page"> |
2179 | - <h2>Inverted Analytic Balance - <span t-esc="res_company.currency_id.name"/></h2> |
2180 | - |
2181 | - <table class="table table-condensed"> |
2182 | - <thead> |
2183 | - <tr> |
2184 | - <th>Code</th> |
2185 | - <th>Account Name</th> |
2186 | - <th>Debit</th> |
2187 | - <th>Credit</th> |
2188 | - <th>Balance</th> |
2189 | - <th>Quantity</th> |
2190 | - </tr> |
2191 | - </thead> |
2192 | - <tbody> |
2193 | - <tr> |
2194 | - <td><strong>Total</strong></td> |
2195 | - <td></td> |
2196 | - <td><strong t-esc="formatLang(sum_debit(docs, data['form']['date1'], data['form']['date2']))"/></td> |
2197 | - <td><strong t-esc="formatLang(sum_credit(docs, data['form']['date1'], data['form']['date2']))"/></td> |
2198 | - <td> |
2199 | - <strong t-esc="formatLang(sum_balance(docs, data['form']['date1'], data['form']['date2']), currency_obj=res_company.currency_id)"/> |
2200 | - </td> |
2201 | - <td><strong><span t-esc="formatLang(sum_quantity(docs, data['form']['date1'], data['form']['date2']))"/></strong></td> |
2202 | - </tr> |
2203 | - <t t-foreach="lines_g(docs, data['form']['date1'], data['form']['date2'])" t-as="move_g"> |
2204 | - <tr> |
2205 | - <td> |
2206 | - <strong t-esc="move_g['code']"/> |
2207 | - </td> |
2208 | - <td> |
2209 | - <strong t-esc="move_g['name']"/> |
2210 | - </td> |
2211 | - <td class="text-right"> |
2212 | - <strong> |
2213 | - <span t-esc="formatLang(move_g['debit'])"/> |
2214 | - </strong> |
2215 | - </td> |
2216 | - <td class="text-right"> |
2217 | - <strong> |
2218 | - <span t-esc="formatLang(move_g['credit'])"/> |
2219 | - </strong> |
2220 | - </td> |
2221 | - <td class="text-right"> |
2222 | - <strong> |
2223 | - <span t-esc="formatLang(move_g['balance'], currency_obj = res_company.currency_id)"/> |
2224 | - </strong> |
2225 | - </td> |
2226 | - <td class="text-right"> |
2227 | - <strong> |
2228 | - <span t-esc="formatLang(move_g['quantity'])"/> |
2229 | - </strong> |
2230 | - </td> |
2231 | - </tr> |
2232 | - <t t-foreach="lines_a(docs, move_g['id'], data['form']['date1'], data['form']['date2'])" t-as="move_a"> |
2233 | - <tr> |
2234 | - <td> |
2235 | - <span t-esc="move_a['code']"/> |
2236 | - </td> |
2237 | - <td> |
2238 | - <span t-esc="move_a['complete_name']"/> |
2239 | - </td> |
2240 | - <td class="text-right"> |
2241 | - <span t-esc="formatLang(move_a['debit'])"/> |
2242 | - </td> |
2243 | - <td class="text-right"> |
2244 | - <span t-esc="formatLang(move_a['credit'])"/> |
2245 | - </td> |
2246 | - <td class="text-right"> |
2247 | - <span t-esc="formatLang(move_a['balance'], currency_obj = res_company.currency_id)"/> |
2248 | - </td> |
2249 | - <td class="text-right"> |
2250 | - <span t-esc="formatLang(move_a['quantity'])"/> |
2251 | - </td> |
2252 | - </tr> |
2253 | - </t> |
2254 | - </t> |
2255 | - </tbody> |
2256 | - </table> |
2257 | - </div> |
2258 | - </t> |
2259 | - </t> |
2260 | -</template> |
2261 | -</data> |
2262 | -</openerp> |
2263 | |
2264 | === removed directory 'account/project/wizard' |
2265 | === removed file 'account/project/wizard/__init__.py' |
2266 | --- account/project/wizard/__init__.py 2011-01-14 00:11:01 +0000 |
2267 | +++ account/project/wizard/__init__.py 1970-01-01 00:00:00 +0000 |
2268 | @@ -1,30 +0,0 @@ |
2269 | -# -*- coding: utf-8 -*- |
2270 | -############################################################################## |
2271 | -# |
2272 | -# OpenERP, Open Source Management Solution |
2273 | -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
2274 | -# |
2275 | -# This program is free software: you can redistribute it and/or modify |
2276 | -# it under the terms of the GNU Affero General Public License as |
2277 | -# published by the Free Software Foundation, either version 3 of the |
2278 | -# License, or (at your option) any later version. |
2279 | -# |
2280 | -# This program is distributed in the hope that it will be useful, |
2281 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2282 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2283 | -# GNU Affero General Public License for more details. |
2284 | -# |
2285 | -# You should have received a copy of the GNU Affero General Public License |
2286 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
2287 | -# |
2288 | -############################################################################## |
2289 | - |
2290 | -import account_analytic_journal_report |
2291 | -import account_analytic_balance_report |
2292 | -import account_analytic_inverted_balance_report |
2293 | -import account_analytic_cost_ledger_report |
2294 | -import account_analytic_cost_ledger_for_journal_report |
2295 | -import project_account_analytic_line |
2296 | -import account_analytic_chart |
2297 | - |
2298 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
2299 | |
2300 | === removed file 'account/project/wizard/account_analytic_balance_report.py' |
2301 | --- account/project/wizard/account_analytic_balance_report.py 2014-03-27 18:25:20 +0000 |
2302 | +++ account/project/wizard/account_analytic_balance_report.py 1970-01-01 00:00:00 +0000 |
2303 | @@ -1,55 +0,0 @@ |
2304 | -# -*- coding: utf-8 -*- |
2305 | -############################################################################## |
2306 | -# |
2307 | -# OpenERP, Open Source Management Solution |
2308 | -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
2309 | -# |
2310 | -# This program is free software: you can redistribute it and/or modify |
2311 | -# it under the terms of the GNU Affero General Public License as |
2312 | -# published by the Free Software Foundation, either version 3 of the |
2313 | -# License, or (at your option) any later version. |
2314 | -# |
2315 | -# This program is distributed in the hope that it will be useful, |
2316 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2317 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2318 | -# GNU Affero General Public License for more details. |
2319 | -# |
2320 | -# You should have received a copy of the GNU Affero General Public License |
2321 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
2322 | -# |
2323 | -############################################################################## |
2324 | - |
2325 | -import time |
2326 | -from openerp.osv import fields, osv |
2327 | - |
2328 | - |
2329 | -class account_analytic_balance(osv.osv_memory): |
2330 | - _name = 'account.analytic.balance' |
2331 | - _description = 'Account Analytic Balance' |
2332 | - |
2333 | - _columns = { |
2334 | - 'date1': fields.date('Start of period', required=True), |
2335 | - 'date2': fields.date('End of period', required=True), |
2336 | - 'empty_acc': fields.boolean('Empty Accounts ? ', help='Check if you want to display Accounts with 0 balance too.'), |
2337 | - } |
2338 | - |
2339 | - _defaults = { |
2340 | - 'date1': lambda *a: time.strftime('%Y-01-01'), |
2341 | - 'date2': lambda *a: time.strftime('%Y-%m-%d') |
2342 | - } |
2343 | - |
2344 | - def check_report(self, cr, uid, ids, context=None): |
2345 | - if context is None: |
2346 | - context = {} |
2347 | - data = self.read(cr, uid, ids)[0] |
2348 | - datas = { |
2349 | - 'ids': context.get('active_ids', []), |
2350 | - 'model': 'account.analytic.account', |
2351 | - 'form': data |
2352 | - } |
2353 | - |
2354 | - datas['form']['active_ids'] = context.get('active_ids', False) |
2355 | - |
2356 | - return self.pool['report'].get_action(cr, uid, ids, 'account.report_analyticbalance', data=datas, context=context) |
2357 | - |
2358 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
2359 | |
2360 | === removed file 'account/project/wizard/account_analytic_balance_report_view.xml' |
2361 | --- account/project/wizard/account_analytic_balance_report_view.xml 2012-11-29 22:26:45 +0000 |
2362 | +++ account/project/wizard/account_analytic_balance_report_view.xml 1970-01-01 00:00:00 +0000 |
2363 | @@ -1,46 +0,0 @@ |
2364 | -<?xml version="1.0" encoding="utf-8"?> |
2365 | -<openerp> |
2366 | - <data> |
2367 | - |
2368 | - <record id="account_analytic_balance_view" model="ir.ui.view"> |
2369 | - <field name="name">Account Analytic Balance</field> |
2370 | - <field name="model">account.analytic.balance</field> |
2371 | - <field name="arch" type="xml"> |
2372 | - <form string="Select Period" version="7.0"> |
2373 | - <header> |
2374 | - <button name="check_report" string="Print" type="object" class="oe_highlight"/> |
2375 | - or |
2376 | - <button string="Cancel" class="oe_link" special="cancel"/> |
2377 | - </header> |
2378 | - <group col="4"> |
2379 | - <field name="date1"/> |
2380 | - <field name="date2"/> |
2381 | - <newline/> |
2382 | - <field name="empty_acc"/> |
2383 | - </group> |
2384 | - </form> |
2385 | - </field> |
2386 | - </record> |
2387 | - |
2388 | - <record id="action_account_analytic_balance" model="ir.actions.act_window"> |
2389 | - <field name="name">Analytic Balance</field> |
2390 | - <field name="type">ir.actions.act_window</field> |
2391 | - <field name="res_model">account.analytic.balance</field> |
2392 | - <field name="view_type">form</field> |
2393 | - <field name="view_mode">form</field> |
2394 | - <field name="view_id" ref="account_analytic_balance_view"/> |
2395 | - <field name="target">new</field> |
2396 | - </record> |
2397 | - |
2398 | - <record model="ir.values" id="account_analytic_balance_values"> |
2399 | - <field name="model_id" ref="analytic.model_account_analytic_account" /> |
2400 | - <field name="name">Account Analytic Balance</field> |
2401 | - <field name="key2">client_print_multi</field> |
2402 | - <field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_analytic_balance'))" /> |
2403 | - <field name="key">action</field> |
2404 | - <field name="model">account.analytic.account</field> |
2405 | - </record> |
2406 | - |
2407 | - </data> |
2408 | -</openerp> |
2409 | - |
2410 | |
2411 | === removed file 'account/project/wizard/account_analytic_chart.py' |
2412 | --- account/project/wizard/account_analytic_chart.py 2013-10-27 12:31:04 +0000 |
2413 | +++ account/project/wizard/account_analytic_chart.py 1970-01-01 00:00:00 +0000 |
2414 | @@ -1,49 +0,0 @@ |
2415 | -# -*- coding: utf-8 -*- |
2416 | -############################################################################## |
2417 | -# |
2418 | -# OpenERP, Open Source Management Solution |
2419 | -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
2420 | -# |
2421 | -# This program is free software: you can redistribute it and/or modify |
2422 | -# it under the terms of the GNU Affero General Public License as |
2423 | -# published by the Free Software Foundation, either version 3 of the |
2424 | -# License, or (at your option) any later version. |
2425 | -# |
2426 | -# This program is distributed in the hope that it will be useful, |
2427 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2428 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2429 | -# GNU Affero General Public License for more details. |
2430 | -# |
2431 | -# You should have received a copy of the GNU Affero General Public License |
2432 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
2433 | -# |
2434 | -############################################################################## |
2435 | -from openerp.osv import fields, osv |
2436 | - |
2437 | -class account_analytic_chart(osv.osv_memory): |
2438 | - _name = 'account.analytic.chart' |
2439 | - _description = 'Account Analytic Chart' |
2440 | - |
2441 | - _columns = { |
2442 | - 'from_date': fields.date('From'), |
2443 | - 'to_date': fields.date('To'), |
2444 | - } |
2445 | - |
2446 | - def analytic_account_chart_open_window(self, cr, uid, ids, context=None): |
2447 | - mod_obj = self.pool.get('ir.model.data') |
2448 | - act_obj = self.pool.get('ir.actions.act_window') |
2449 | - result_context = {} |
2450 | - if context is None: |
2451 | - context = {} |
2452 | - result = mod_obj.get_object_reference(cr, uid, 'account', 'action_account_analytic_account_tree2') |
2453 | - id = result and result[1] or False |
2454 | - result = act_obj.read(cr, uid, [id], context=context)[0] |
2455 | - data = self.read(cr, uid, ids, [])[0] |
2456 | - if data['from_date']: |
2457 | - result_context.update({'from_date': data['from_date']}) |
2458 | - if data['to_date']: |
2459 | - result_context.update({'to_date': data['to_date']}) |
2460 | - result['context'] = str(result_context) |
2461 | - return result |
2462 | - |
2463 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
2464 | |
2465 | === removed file 'account/project/wizard/account_analytic_chart_view.xml' |
2466 | --- account/project/wizard/account_analytic_chart_view.xml 2014-02-10 05:26:55 +0000 |
2467 | +++ account/project/wizard/account_analytic_chart_view.xml 1970-01-01 00:00:00 +0000 |
2468 | @@ -1,43 +0,0 @@ |
2469 | -<?xml version="1.0" encoding="utf-8"?> |
2470 | -<openerp> |
2471 | - <data> |
2472 | - |
2473 | - <record id="account_analytic_chart_view" model="ir.ui.view"> |
2474 | - <field name="name">Chart of Analytic Accounts</field> |
2475 | - <field name="model">account.analytic.chart</field> |
2476 | - <field name="arch" type="xml"> |
2477 | - <form string="Analytic Account Charts" version="7.0"> |
2478 | - <group string="Select the Period for Analysis" col="4"> |
2479 | - <field name="from_date"/> |
2480 | - <field name="to_date"/> |
2481 | - <label string="(Keep empty to open the current situation)" colspan="4"/> |
2482 | - </group> |
2483 | - <footer> |
2484 | - <button name="analytic_account_chart_open_window" string="Open Charts" type="object" class="oe_highlight"/> |
2485 | - or |
2486 | - <button string="Cancel" class="oe_link" special="cancel"/> |
2487 | - </footer> |
2488 | - </form> |
2489 | - </field> |
2490 | - </record> |
2491 | - |
2492 | - <record id="action_account_analytic_chart" model="ir.actions.act_window"> |
2493 | - <field name="name">Chart of Analytic Accounts</field> |
2494 | - <field name="type">ir.actions.act_window</field> |
2495 | - <field name="res_model">account.analytic.chart</field> |
2496 | - <field name="view_type">form</field> |
2497 | - <field name="view_mode">form</field> |
2498 | - <field name="view_id" ref="account_analytic_chart_view"/> |
2499 | - <field name="target">new</field> |
2500 | - </record> |
2501 | - |
2502 | - <menuitem |
2503 | - name="Chart of Analytic Accounts" |
2504 | - parent="account.menu_finance_charts" |
2505 | - action="action_account_analytic_chart" |
2506 | - id="menu_action_analytic_account_tree2" |
2507 | - icon="STOCK_INDENT" |
2508 | - groups="analytic.group_analytic_accounting"/> |
2509 | - |
2510 | - </data> |
2511 | -</openerp> |
2512 | |
2513 | === removed file 'account/project/wizard/account_analytic_cost_ledger_for_journal_report.py' |
2514 | --- account/project/wizard/account_analytic_cost_ledger_for_journal_report.py 2014-04-02 16:40:53 +0000 |
2515 | +++ account/project/wizard/account_analytic_cost_ledger_for_journal_report.py 1970-01-01 00:00:00 +0000 |
2516 | @@ -1,54 +0,0 @@ |
2517 | -# -*- coding: utf-8 -*- |
2518 | -############################################################################## |
2519 | -# |
2520 | -# OpenERP, Open Source Management Solution |
2521 | -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
2522 | -# |
2523 | -# This program is free software: you can redistribute it and/or modify |
2524 | -# it under the terms of the GNU Affero General Public License as |
2525 | -# published by the Free Software Foundation, either version 3 of the |
2526 | -# License, or (at your option) any later version. |
2527 | -# |
2528 | -# This program is distributed in the hope that it will be useful, |
2529 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2530 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2531 | -# GNU Affero General Public License for more details. |
2532 | -# |
2533 | -# You should have received a copy of the GNU Affero General Public License |
2534 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
2535 | -# |
2536 | -############################################################################## |
2537 | - |
2538 | -import time |
2539 | -from openerp.osv import fields, osv |
2540 | - |
2541 | - |
2542 | -class account_analytic_cost_ledger_journal_report(osv.osv_memory): |
2543 | - _name = 'account.analytic.cost.ledger.journal.report' |
2544 | - _description = 'Account Analytic Cost Ledger For Journal Report' |
2545 | - |
2546 | - _columns = { |
2547 | - 'date1': fields.date('Start of period', required=True), |
2548 | - 'date2': fields.date('End of period', required=True), |
2549 | - 'journal': fields.many2many('account.analytic.journal', 'ledger_journal_rel', 'ledger_id', 'journal_id', 'Journals'), |
2550 | - } |
2551 | - |
2552 | - _defaults = { |
2553 | - 'date1': lambda *a: time.strftime('%Y-01-01'), |
2554 | - 'date2': lambda *a: time.strftime('%Y-%m-%d') |
2555 | - } |
2556 | - |
2557 | - def check_report(self, cr, uid, ids, context=None): |
2558 | - if context is None: |
2559 | - context = {} |
2560 | - data = self.read(cr, uid, ids)[0] |
2561 | - datas = { |
2562 | - 'ids': context.get('active_ids', []), |
2563 | - 'model': 'account.analytic.account', |
2564 | - 'form': data |
2565 | - } |
2566 | - |
2567 | - datas['form']['active_ids'] = context.get('active_ids', False) |
2568 | - return self.pool['report'].get_action(cr, uid, ids, 'account.report_analyticcostledgerquantity', data=datas, context=context) |
2569 | - |
2570 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
2571 | |
2572 | === removed file 'account/project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml' |
2573 | --- account/project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml 2012-11-29 22:26:45 +0000 |
2574 | +++ account/project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml 1970-01-01 00:00:00 +0000 |
2575 | @@ -1,44 +0,0 @@ |
2576 | -<?xml version="1.0" encoding="utf-8"?> |
2577 | -<openerp> |
2578 | - <data> |
2579 | - |
2580 | - <record id="account_analytic_cost_ledger_journal_view" model="ir.ui.view"> |
2581 | - <field name="name">Account Analytic Cost Ledger Journal</field> |
2582 | - <field name="model">account.analytic.cost.ledger.journal.report</field> |
2583 | - <field name="arch" type="xml"> |
2584 | - <form string="Select period" version="7.0"> |
2585 | - <header> |
2586 | - <button name="check_report" string="Print" type="object" class="oe_highlight"/> |
2587 | - or |
2588 | - <button string="Cancel" class="oe_link" special="cancel"/> |
2589 | - </header> |
2590 | - <group string="Cost Ledger for Period" col="4"> |
2591 | - <field name="date1"/> |
2592 | - <field name="date2"/> |
2593 | - <field name="journal" colspan="4"/> |
2594 | - </group> |
2595 | - </form> |
2596 | - </field> |
2597 | - </record> |
2598 | - |
2599 | - <record id="action_account_analytic_cost_ledger_journal" model="ir.actions.act_window"> |
2600 | - <field name="name">Cost Ledger (Only quantities)</field> |
2601 | - <field name="type">ir.actions.act_window</field> |
2602 | - <field name="res_model">account.analytic.cost.ledger.journal.report</field> |
2603 | - <field name="view_type">form</field> |
2604 | - <field name="view_mode">form</field> |
2605 | - <field name="view_id" ref="account_analytic_cost_ledger_journal_view"/> |
2606 | - <field name="target">new</field> |
2607 | - </record> |
2608 | - |
2609 | - <record model="ir.values" id="account_analytic_cost_ledger_journal_values"> |
2610 | - <field name="model_id" ref="analytic.model_account_analytic_account" /> |
2611 | - <field name="name">Account Analytic Cost Ledger Journal</field> |
2612 | - <field name="key2">client_print_multi</field> |
2613 | - <field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_analytic_cost_ledger_journal'))" /> |
2614 | - <field name="key">action</field> |
2615 | - <field name="model">account.analytic.account</field> |
2616 | - </record> |
2617 | - |
2618 | - </data> |
2619 | -</openerp> |
2620 | |
2621 | === removed file 'account/project/wizard/account_analytic_cost_ledger_report.py' |
2622 | --- account/project/wizard/account_analytic_cost_ledger_report.py 2014-03-27 18:25:20 +0000 |
2623 | +++ account/project/wizard/account_analytic_cost_ledger_report.py 1970-01-01 00:00:00 +0000 |
2624 | @@ -1,54 +0,0 @@ |
2625 | -# -*- coding: utf-8 -*- |
2626 | -############################################################################## |
2627 | -# |
2628 | -# OpenERP, Open Source Management Solution |
2629 | -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
2630 | -# |
2631 | -# This program is free software: you can redistribute it and/or modify |
2632 | -# it under the terms of the GNU Affero General Public License as |
2633 | -# published by the Free Software Foundation, either version 3 of the |
2634 | -# License, or (at your option) any later version. |
2635 | -# |
2636 | -# This program is distributed in the hope that it will be useful, |
2637 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2638 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2639 | -# GNU Affero General Public License for more details. |
2640 | -# |
2641 | -# You should have received a copy of the GNU Affero General Public License |
2642 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
2643 | -# |
2644 | -############################################################################## |
2645 | - |
2646 | -import time |
2647 | -from openerp.osv import osv, fields |
2648 | - |
2649 | - |
2650 | -class account_analytic_cost_ledger(osv.osv_memory): |
2651 | - _name = 'account.analytic.cost.ledger' |
2652 | - _description = 'Account Analytic Cost Ledger' |
2653 | - |
2654 | - _columns = { |
2655 | - 'date1': fields.date('Start of period', required=True), |
2656 | - 'date2': fields.date('End of period', required=True), |
2657 | - } |
2658 | - |
2659 | - _defaults = { |
2660 | - 'date1': lambda *a: time.strftime('%Y-01-01'), |
2661 | - 'date2': lambda *a: time.strftime('%Y-%m-%d') |
2662 | - } |
2663 | - |
2664 | - def check_report(self, cr, uid, ids, context=None): |
2665 | - if context is None: |
2666 | - context = {} |
2667 | - data = self.read(cr, uid, ids)[0] |
2668 | - datas = { |
2669 | - 'ids': context.get('active_ids',[]), |
2670 | - 'model': 'account.analytic.account', |
2671 | - 'form': data |
2672 | - } |
2673 | - |
2674 | - datas['form']['active_ids'] = context.get('active_ids', False) |
2675 | - |
2676 | - return self.pool['report'].get_action(cr, uid, ids, 'account.report_analyticcostledger', data=datas, context=context) |
2677 | - |
2678 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
2679 | |
2680 | === removed file 'account/project/wizard/account_analytic_cost_ledger_view.xml' |
2681 | --- account/project/wizard/account_analytic_cost_ledger_view.xml 2012-11-29 22:26:45 +0000 |
2682 | +++ account/project/wizard/account_analytic_cost_ledger_view.xml 1970-01-01 00:00:00 +0000 |
2683 | @@ -1,43 +0,0 @@ |
2684 | -<?xml version="1.0" encoding="utf-8"?> |
2685 | -<openerp> |
2686 | - <data> |
2687 | - |
2688 | - <record id="account_analytic_cost_view" model="ir.ui.view"> |
2689 | - <field name="name">Account Analytic Check</field> |
2690 | - <field name="model">account.analytic.cost.ledger</field> |
2691 | - <field name="arch" type="xml"> |
2692 | - <form string="Select Period" version="7.0"> |
2693 | - <header> |
2694 | - <button name="check_report" string="Print" type="object" class="oe_highlight"/> |
2695 | - or |
2696 | - <button string="Cancel" class="oe_link" special="cancel"/> |
2697 | - </header> |
2698 | - <group col="4"> |
2699 | - <field name="date1"/> |
2700 | - <field name="date2"/> |
2701 | - </group> |
2702 | - </form> |
2703 | - </field> |
2704 | - </record> |
2705 | - |
2706 | - <record id="action_account_analytic_cost" model="ir.actions.act_window"> |
2707 | - <field name="name">Cost Ledger</field> |
2708 | - <field name="type">ir.actions.act_window</field> |
2709 | - <field name="res_model">account.analytic.cost.ledger</field> |
2710 | - <field name="view_type">form</field> |
2711 | - <field name="view_mode">form</field> |
2712 | - <field name="view_id" ref="account_analytic_cost_view"/> |
2713 | - <field name="target">new</field> |
2714 | - </record> |
2715 | - |
2716 | - <record model="ir.values" id="account_analytic_cost_values"> |
2717 | - <field name="model_id" ref="analytic.model_account_analytic_account" /> |
2718 | - <field name="name">Account Analytic Cost</field> |
2719 | - <field name="key2">client_print_multi</field> |
2720 | - <field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_analytic_cost'))" /> |
2721 | - <field name="key">action</field> |
2722 | - <field name="model">account.analytic.account</field> |
2723 | - </record> |
2724 | - |
2725 | - </data> |
2726 | -</openerp> |
2727 | |
2728 | === removed file 'account/project/wizard/account_analytic_inverted_balance_report.py' |
2729 | --- account/project/wizard/account_analytic_inverted_balance_report.py 2014-04-02 16:40:53 +0000 |
2730 | +++ account/project/wizard/account_analytic_inverted_balance_report.py 1970-01-01 00:00:00 +0000 |
2731 | @@ -1,52 +0,0 @@ |
2732 | -# -*- coding: utf-8 -*- |
2733 | -############################################################################## |
2734 | -# |
2735 | -# OpenERP, Open Source Management Solution |
2736 | -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
2737 | -# |
2738 | -# This program is free software: you can redistribute it and/or modify |
2739 | -# it under the terms of the GNU Affero General Public License as |
2740 | -# published by the Free Software Foundation, either version 3 of the |
2741 | -# License, or (at your option) any later version. |
2742 | -# |
2743 | -# This program is distributed in the hope that it will be useful, |
2744 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2745 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2746 | -# GNU Affero General Public License for more details. |
2747 | -# |
2748 | -# You should have received a copy of the GNU Affero General Public License |
2749 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
2750 | -# |
2751 | -############################################################################## |
2752 | - |
2753 | -import time |
2754 | -from openerp.osv import fields, osv |
2755 | - |
2756 | - |
2757 | -class account_analytic_inverted_balance(osv.osv_memory): |
2758 | - _name = 'account.analytic.inverted.balance' |
2759 | - _description = 'Account Analytic Inverted Balance' |
2760 | - |
2761 | - _columns = { |
2762 | - 'date1': fields.date('Start of period', required=True), |
2763 | - 'date2': fields.date('End of period', required=True), |
2764 | - } |
2765 | - |
2766 | - _defaults = { |
2767 | - 'date1': lambda *a: time.strftime('%Y-01-01'), |
2768 | - 'date2': lambda *a: time.strftime('%Y-%m-%d') |
2769 | - } |
2770 | - |
2771 | - def check_report(self, cr, uid, ids, context=None): |
2772 | - if context is None: |
2773 | - context = {} |
2774 | - data = self.read(cr, uid, ids)[0] |
2775 | - datas = { |
2776 | - 'ids': context.get('active_ids', []), |
2777 | - 'model': 'account.analytic.account', |
2778 | - 'form': data |
2779 | - } |
2780 | - datas['form']['active_ids'] = context.get('active_ids', False) |
2781 | - return self.pool['report'].get_action(cr, uid, ids, 'account.report_invertedanalyticbalance', data=datas, context=context) |
2782 | - |
2783 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
2784 | |
2785 | === removed file 'account/project/wizard/account_analytic_inverted_balance_report.xml' |
2786 | --- account/project/wizard/account_analytic_inverted_balance_report.xml 2012-11-29 22:26:45 +0000 |
2787 | +++ account/project/wizard/account_analytic_inverted_balance_report.xml 1970-01-01 00:00:00 +0000 |
2788 | @@ -1,43 +0,0 @@ |
2789 | -<?xml version="1.0" encoding="utf-8"?> |
2790 | -<openerp> |
2791 | - <data> |
2792 | - |
2793 | - <record id="account_analytic_invert_balance_view" model="ir.ui.view"> |
2794 | - <field name="name">Account Analytic Inverted Balance</field> |
2795 | - <field name="model">account.analytic.inverted.balance</field> |
2796 | - <field name="arch" type="xml"> |
2797 | - <form string="Select Period" version="7.0"> |
2798 | - <header> |
2799 | - <button name="check_report" string="Print" type="object" class="oe_highlight"/> |
2800 | - or |
2801 | - <button string="Cancel" class="oe_link" special="cancel"/> |
2802 | - </header> |
2803 | - <group col="4"> |
2804 | - <field name="date1"/> |
2805 | - <field name="date2"/> |
2806 | - </group> |
2807 | - </form> |
2808 | - </field> |
2809 | - </record> |
2810 | - |
2811 | - <record id="action_account_analytic_invert_balance" model="ir.actions.act_window"> |
2812 | - <field name="name">Inverted Analytic Balance</field> |
2813 | - <field name="type">ir.actions.act_window</field> |
2814 | - <field name="res_model">account.analytic.inverted.balance</field> |
2815 | - <field name="view_type">form</field> |
2816 | - <field name="view_mode">form</field> |
2817 | - <field name="view_id" ref="account_analytic_invert_balance_view"/> |
2818 | - <field name="target">new</field> |
2819 | - </record> |
2820 | - |
2821 | - <record model="ir.values" id="account_analytic_invert_balance_values"> |
2822 | - <field name="model_id" ref="analytic.model_account_analytic_account" /> |
2823 | - <field name="name">Account Analytic Inverted Balance</field> |
2824 | - <field name="key2">client_print_multi</field> |
2825 | - <field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_analytic_invert_balance'))" /> |
2826 | - <field name="key">action</field> |
2827 | - <field name="model">account.analytic.account</field> |
2828 | - </record> |
2829 | - |
2830 | - </data> |
2831 | -</openerp> |
2832 | |
2833 | === removed file 'account/project/wizard/account_analytic_journal_report.py' |
2834 | --- account/project/wizard/account_analytic_journal_report.py 2014-04-03 15:48:56 +0000 |
2835 | +++ account/project/wizard/account_analytic_journal_report.py 1970-01-01 00:00:00 +0000 |
2836 | @@ -1,74 +0,0 @@ |
2837 | -# -*- coding: utf-8 -*- |
2838 | -############################################################################## |
2839 | -# |
2840 | -# OpenERP, Open Source Management Solution |
2841 | -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
2842 | -# |
2843 | -# This program is free software: you can redistribute it and/or modify |
2844 | -# it under the terms of the GNU Affero General Public License as |
2845 | -# published by the Free Software Foundation, either version 3 of the |
2846 | -# License, or (at your option) any later version. |
2847 | -# |
2848 | -# This program is distributed in the hope that it will be useful, |
2849 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2850 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2851 | -# GNU Affero General Public License for more details. |
2852 | -# |
2853 | -# You should have received a copy of the GNU Affero General Public License |
2854 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
2855 | -# |
2856 | -############################################################################## |
2857 | - |
2858 | -import time |
2859 | -from openerp.osv import fields, osv |
2860 | - |
2861 | - |
2862 | -class account_analytic_journal_report(osv.osv_memory): |
2863 | - _name = 'account.analytic.journal.report' |
2864 | - _description = 'Account Analytic Journal' |
2865 | - |
2866 | - _columns = { |
2867 | - 'date1': fields.date('Start of period', required=True), |
2868 | - 'date2': fields.date('End of period', required=True), |
2869 | - 'analytic_account_journal_id': fields.many2many('account.analytic.journal', 'account_analytic_journal_name', 'journal_line_id', 'journal_print_id', 'Analytic Journals', required=True), |
2870 | - } |
2871 | - |
2872 | - _defaults = { |
2873 | - 'date1': lambda *a: time.strftime('%Y-01-01'), |
2874 | - 'date2': lambda *a: time.strftime('%Y-%m-%d') |
2875 | - } |
2876 | - |
2877 | - def check_report(self, cr, uid, ids, context=None): |
2878 | - if context is None: |
2879 | - context = {} |
2880 | - data = self.read(cr, uid, ids)[0] |
2881 | - ids_list = [] |
2882 | - if context.get('active_id',False): |
2883 | - ids_list.append(context.get('active_id',False)) |
2884 | - else: |
2885 | - record = self.browse(cr,uid,ids[0],context=context) |
2886 | - for analytic_record in record.analytic_account_journal_id: |
2887 | - ids_list.append(analytic_record.id) |
2888 | - datas = { |
2889 | - 'ids': ids_list, |
2890 | - 'model': 'account.analytic.journal', |
2891 | - 'form': data |
2892 | - } |
2893 | - context2 = context.copy() |
2894 | - context2['active_model'] = 'account.analytic.journal' |
2895 | - context2['active_ids'] = ids_list |
2896 | - return self.pool['report'].get_action(cr, uid, ids, 'account.report_analyticjournal', data=datas, context=context2) |
2897 | - |
2898 | - def default_get(self, cr, uid, fields, context=None): |
2899 | - if context is None: |
2900 | - context = {} |
2901 | - res = super(account_analytic_journal_report, self).default_get(cr, uid, fields, context=context) |
2902 | - if not context.has_key('active_ids'): |
2903 | - journal_ids = self.pool.get('account.analytic.journal').search(cr, uid, [], context=context) |
2904 | - else: |
2905 | - journal_ids = context.get('active_ids') |
2906 | - if 'analytic_account_journal_id' in fields: |
2907 | - res.update({'analytic_account_journal_id': journal_ids}) |
2908 | - return res |
2909 | - |
2910 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
2911 | |
2912 | === removed file 'account/project/wizard/account_analytic_journal_report_view.xml' |
2913 | --- account/project/wizard/account_analytic_journal_report_view.xml 2012-11-29 22:26:45 +0000 |
2914 | +++ account/project/wizard/account_analytic_journal_report_view.xml 1970-01-01 00:00:00 +0000 |
2915 | @@ -1,51 +0,0 @@ |
2916 | -<?xml version="1.0" encoding="utf-8"?> |
2917 | -<openerp> |
2918 | - <data> |
2919 | - |
2920 | - <record id="account_analytic_journal_view" model="ir.ui.view"> |
2921 | - <field name="name">Account Analytic Journal</field> |
2922 | - <field name="model">account.analytic.journal.report</field> |
2923 | - <field name="arch" type="xml"> |
2924 | - <form string="Select Period" version="7.0"> |
2925 | - <group col="4"> |
2926 | - <field name="date1"/> |
2927 | - <field name="date2"/> |
2928 | - <field name="analytic_account_journal_id" widget="many2many_tags" class="oe_inline" required="1" colspan="4"/> |
2929 | - </group> |
2930 | - <footer> |
2931 | - <button name="check_report" string="Print" type="object" class="oe_highlight"/> |
2932 | - or |
2933 | - <button string="Cancel" class="oe_link" special="cancel"/> |
2934 | - </footer> |
2935 | - </form> |
2936 | - </field> |
2937 | - </record> |
2938 | - |
2939 | - <record id="action_account_analytic_journal" model="ir.actions.act_window"> |
2940 | - <field name="name">Analytic Journal</field> |
2941 | - <field name="type">ir.actions.act_window</field> |
2942 | - <field name="res_model">account.analytic.journal.report</field> |
2943 | - <field name="view_type">form</field> |
2944 | - <field name="view_mode">form</field> |
2945 | - <field name="view_id" ref="account_analytic_journal_view"/> |
2946 | - <field name="target">new</field> |
2947 | - </record> |
2948 | - |
2949 | - <record model="ir.values" id="account_analytic_journal_values"> |
2950 | - <field name="model_id" ref="account.model_account_analytic_journal" /> |
2951 | - <field name="name">Account Analytic Journal</field> |
2952 | - <field name="key2">client_print_multi</field> |
2953 | - <field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_analytic_journal'))" /> |
2954 | - <field name="key">action</field> |
2955 | - <field name="model">account.analytic.journal</field> |
2956 | - </record> |
2957 | - |
2958 | - <menuitem groups="analytic.group_analytic_accounting" id="next_id_40" |
2959 | - name="Analytic" parent="account.menu_finance_generic_reporting" |
2960 | - sequence="4"/> |
2961 | - <menuitem groups="analytic.group_analytic_accounting" |
2962 | - action="account.action_account_analytic_journal" |
2963 | - id="account_analytic_journal_print" parent="account.next_id_40"/> |
2964 | - |
2965 | - </data> |
2966 | -</openerp> |
2967 | |
2968 | === removed file 'account/project/wizard/project_account_analytic_line.py' |
2969 | --- account/project/wizard/project_account_analytic_line.py 2013-10-27 12:31:04 +0000 |
2970 | +++ account/project/wizard/project_account_analytic_line.py 1970-01-01 00:00:00 +0000 |
2971 | @@ -1,57 +0,0 @@ |
2972 | -# -*- coding: utf-8 -*- |
2973 | -############################################################################## |
2974 | -# |
2975 | -# OpenERP, Open Source Management Solution |
2976 | -# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
2977 | -# |
2978 | -# This program is free software: you can redistribute it and/or modify |
2979 | -# it under the terms of the GNU Affero General Public License as |
2980 | -# published by the Free Software Foundation, either version 3 of the |
2981 | -# License, or (at your option) any later version. |
2982 | -# |
2983 | -# This program is distributed in the hope that it will be useful, |
2984 | -# but WITHOUT ANY WARRANTY; without even the implied warranty of |
2985 | -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
2986 | -# GNU Affero General Public License for more details. |
2987 | -# |
2988 | -# You should have received a copy of the GNU Affero General Public License |
2989 | -# along with this program. If not, see <http://www.gnu.org/licenses/>. |
2990 | -# |
2991 | -############################################################################## |
2992 | -from openerp.osv import fields, osv |
2993 | -from openerp.tools.translate import _ |
2994 | - |
2995 | -class project_account_analytic_line(osv.osv_memory): |
2996 | - _name = "project.account.analytic.line" |
2997 | - _description = "Analytic Entries by line" |
2998 | - _columns = { |
2999 | - 'from_date': fields.date('From'), |
3000 | - 'to_date': fields.date('To'), |
3001 | - } |
3002 | - |
3003 | - def action_open_window(self, cr, uid, ids, context=None): |
3004 | - mod_obj =self.pool.get('ir.model.data') |
3005 | - domain = [] |
3006 | - data = self.read(cr, uid, ids, [])[0] |
3007 | - from_date = data['from_date'] |
3008 | - to_date = data['to_date'] |
3009 | - if from_date and to_date: |
3010 | - domain = [('date','>=',from_date), ('date','<=',to_date)] |
3011 | - elif from_date: |
3012 | - domain = [('date','>=',from_date)] |
3013 | - elif to_date: |
3014 | - domain = [('date','<=',to_date)] |
3015 | - result = mod_obj.get_object_reference(cr, uid, 'account', 'view_account_analytic_line_filter') |
3016 | - id = result and result[1] or False |
3017 | - return { |
3018 | - 'name': _('Analytic Entries by line'), |
3019 | - 'view_type': 'form', |
3020 | - "view_mode": 'tree,form', |
3021 | - 'res_model': 'account.analytic.line', |
3022 | - 'type': 'ir.actions.act_window', |
3023 | - 'domain': domain, |
3024 | - 'search_view_id': id['res_id'], |
3025 | - } |
3026 | - |
3027 | - |
3028 | -# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3029 | |
3030 | === removed file 'account/project/wizard/project_account_analytic_line_view.xml' |
3031 | --- account/project/wizard/project_account_analytic_line_view.xml 2012-11-29 22:26:45 +0000 |
3032 | +++ account/project/wizard/project_account_analytic_line_view.xml 1970-01-01 00:00:00 +0000 |
3033 | @@ -1,34 +0,0 @@ |
3034 | -<?xml version="1.0" encoding="utf-8"?> |
3035 | -<openerp> |
3036 | - <data> |
3037 | - |
3038 | - <record id="view_project_account_analytic_line_form" model="ir.ui.view"> |
3039 | - <field name="name">project.account.analytic.line.form</field> |
3040 | - <field name="model">project.account.analytic.line</field> |
3041 | - <field name="arch" type="xml"> |
3042 | - <form string="View Account Analytic Lines" version="7.0"> |
3043 | - <header> |
3044 | - <button string="Open Entries" name="action_open_window" type="object" class="oe_highlight"/> |
3045 | - or |
3046 | - <button string="Cancel" class="oe_link" special="cancel"/> |
3047 | - </header> |
3048 | - <group col="4"> |
3049 | - <field name="from_date"/> |
3050 | - <field name="to_date"/> |
3051 | - </group> |
3052 | - <label string ="(Keep empty to open the current situation)" /> |
3053 | - </form> |
3054 | - </field> |
3055 | - </record> |
3056 | - |
3057 | - <record id="action_project_account_analytic_line_form" model="ir.actions.act_window"> |
3058 | - <field name="name">Entries By Line</field> |
3059 | - <field name="res_model">project.account.analytic.line</field> |
3060 | - <field name="view_type">form</field> |
3061 | - <field name="view_mode">tree,form</field> |
3062 | - <field name="view_id" ref="view_project_account_analytic_line_form"/> |
3063 | - <field name="target">new</field> |
3064 | - </record> |
3065 | - |
3066 | - </data> |
3067 | -</openerp> |
3068 | |
3069 | === modified file 'account/report/account_analytic_entries_report.py' |
3070 | --- account/report/account_analytic_entries_report.py 2014-01-29 16:03:48 +0000 |
3071 | +++ account/report/account_analytic_entries_report.py 2014-04-28 09:41:45 +0000 |
3072 | @@ -33,8 +33,8 @@ |
3073 | 'partner_id': fields.many2one('res.partner', 'Partner'), |
3074 | 'company_id': fields.many2one('res.company', 'Company', required=True), |
3075 | 'currency_id': fields.many2one('res.currency', 'Currency', required=True), |
3076 | - 'account_id': fields.many2one('account.analytic.account', 'Account', required=False), |
3077 | - 'general_account_id': fields.many2one('account.account', 'General Account', required=True), |
3078 | + 'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=False), |
3079 | + 'general_account_id': fields.many2one('account.account', 'Financial Account', required=True), |
3080 | 'journal_id': fields.many2one('account.analytic.journal', 'Journal', required=True), |
3081 | 'move_id': fields.many2one('account.move.line', 'Move', required=True), |
3082 | 'product_id': fields.many2one('product.product', 'Product', required=True), |
3083 | |
3084 | === modified file 'account/report/account_analytic_entries_report_view.xml' |
3085 | --- account/report/account_analytic_entries_report_view.xml 2014-01-29 16:03:48 +0000 |
3086 | +++ account/report/account_analytic_entries_report_view.xml 2014-04-28 09:41:45 +0000 |
3087 | @@ -14,8 +14,8 @@ |
3088 | <group expand="0" string="Group By..."> |
3089 | <filter string="User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/> |
3090 | <filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id'}"/> |
3091 | - <filter string="Account" name="Account" icon="terp-folder-green" context="{'group_by':'account_id'}" groups="analytic.group_analytic_accounting"/> |
3092 | - <filter string="General Account" icon="terp-folder-orange" context="{'group_by':'general_account_id'}"/> |
3093 | + <filter string="Analytic Account" name="Account" icon="terp-folder-green" context="{'group_by':'account_id'}" groups="analytic.group_analytic_accounting"/> |
3094 | + <filter string="Financial Account" icon="terp-folder-orange" context="{'group_by':'general_account_id'}"/> |
3095 | <filter string="Journal" icon="terp-folder-orange" context="{'group_by':'journal_id'}"/> |
3096 | <filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/> |
3097 | <filter string="Product Unit of Measure" icon="terp-mrp" context="{'group_by':'product_uom_id'}"/> |
3098 | |
3099 | === modified file 'account/security/account_security.xml' |
3100 | --- account/security/account_security.xml 2013-10-27 12:31:04 +0000 |
3101 | +++ account/security/account_security.xml 2014-04-28 09:41:45 +0000 |
3102 | @@ -64,7 +64,7 @@ |
3103 | |
3104 | <record id="analytic_journal_comp_rule" model="ir.rule"> |
3105 | <field name="name">Analytic journal multi-company</field> |
3106 | - <field name="model_id" ref="model_account_analytic_journal"/> |
3107 | + <field name="model_id" ref="analytic.model_account_analytic_journal"/> |
3108 | <field name="global" eval="True"/> |
3109 | <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> |
3110 | </record> |
3111 | |
3112 | === modified file 'account/security/ir.model.access.csv' |
3113 | --- account/security/ir.model.access.csv 2013-10-27 12:31:04 +0000 |
3114 | +++ account/security/ir.model.access.csv 2014-04-28 09:41:45 +0000 |
3115 | @@ -24,8 +24,8 @@ |
3116 | access_account_bank_statement_line,account.bank.statement.line,model_account_bank_statement_line,account.group_account_user,1,1,1,1 |
3117 | access_account_analytic_line_manager,account.analytic.line manager,model_account_analytic_line,account.group_account_manager,1,0,0,0 |
3118 | access_account_analytic_account,account.analytic.account,analytic.model_account_analytic_account,base.group_user,1,0,0,0 |
3119 | -access_account_analytic_journal,account.analytic.journal,model_account_analytic_journal,account.group_account_user,1,0,0,0 |
3120 | -access_account_analytic_journal_user,account.analytic.journal,model_account_analytic_journal,base.group_user,1,1,1,0 |
3121 | +access_account_analytic_journal,account.analytic.journal,analytic.model_account_analytic_journal,account.group_account_user,1,0,0,0 |
3122 | +access_account_analytic_journal_user,account.analytic.journal,analytic.model_account_analytic_journal,base.group_user,1,1,1,0 |
3123 | access_account_invoice_uinvoice,account.invoice,model_account_invoice,account.group_account_invoice,1,1,1,1 |
3124 | access_account_invoice_line_uinvoice,account.invoice.line,model_account_invoice_line,account.group_account_invoice,1,1,1,1 |
3125 | access_account_invoice_tax_uinvoice,account.invoice.tax,model_account_invoice_tax,account.group_account_invoice,1,1,1,1 |
3126 | @@ -41,7 +41,7 @@ |
3127 | access_account_period_manager,account.period,model_account_period,account.group_account_manager,1,1,1,1 |
3128 | access_account_period_invoice,account.period invoice,model_account_period,account.group_account_invoice,1,0,0,0 |
3129 | access_account_invoice_group_invoice,account.invoice group invoice,model_account_invoice,account.group_account_invoice,1,1,1,1 |
3130 | -access_account_analytic_journal_manager,account.analytic.journal,model_account_analytic_journal,account.group_account_manager,1,1,1,1 |
3131 | +access_account_analytic_journal_manager,account.analytic.journal,analytic.model_account_analytic_journal,account.group_account_manager,1,1,1,1 |
3132 | access_account_fiscalyear,account.fiscalyear,model_account_fiscalyear,account.group_account_manager,1,1,1,1 |
3133 | access_account_fiscalyear_invoice,account.fiscalyear.invoice,model_account_fiscalyear,account.group_account_invoice,1,0,0,0 |
3134 | access_account_fiscalyear_partner_manager,account.fiscalyear.partnermanager,model_account_fiscalyear,base.group_partner_manager,1,0,0,0 |
3135 | |
3136 | === modified file 'account/test/account_fiscalyear_close.yml' |
3137 | --- account/test/account_fiscalyear_close.yml 2013-11-27 15:32:57 +0000 |
3138 | +++ account/test/account_fiscalyear_close.yml 2014-04-28 09:41:45 +0000 |
3139 | @@ -34,7 +34,7 @@ |
3140 | name: End of Year |
3141 | code: NEW |
3142 | type: situation |
3143 | - analytic_journal_id: sit |
3144 | + analytic_journal_id: analytic.sit |
3145 | default_debit_account_id: cash |
3146 | default_credit_account_id: cash |
3147 | company_id: base.main_company |
3148 | |
3149 | === modified file 'account/test/account_report.yml' |
3150 | --- account/test/account_report.yml 2014-04-02 16:40:53 +0000 |
3151 | +++ account/test/account_report.yml 2014-04-28 09:41:45 +0000 |
3152 | @@ -135,47 +135,47 @@ |
3153 | - |
3154 | !python {model: account.analytic.account}: | |
3155 | ctx={} |
3156 | - ctx.update({'model': 'account.analytic.account','active_ids': [ref('account.analytic_root')]}) |
3157 | + ctx.update({'model': 'account.analytic.account','active_ids': [ref('analytic.analytic_root')]}) |
3158 | data_dict = {} |
3159 | from openerp.tools import test_reports |
3160 | - test_reports.try_report_action(cr, uid, 'action_account_analytic_balance',wiz_data=data_dict, context=ctx, our_module='account') |
3161 | + test_reports.try_report_action(cr, uid, 'analytic.action_account_analytic_balance',wiz_data=data_dict, context=ctx, our_module='account') |
3162 | |
3163 | - |
3164 | Print the Cost Ledger Report through the wizard |
3165 | - |
3166 | !python {model: account.analytic.account}: | |
3167 | ctx={} |
3168 | - ctx.update({'model': 'account.analytic.account','active_ids': [ref('account.analytic_root'),ref('account.analytic_absences'),ref('account.analytic_internal'),ref('account.analytic_our_super_product')]}) |
3169 | + ctx.update({'model': 'account.analytic.account','active_ids': [ref('analytic.analytic_root'),ref('analytic.analytic_absences'),ref('analytic.analytic_internal'),ref('analytic.analytic_our_super_product')]}) |
3170 | data_dict = {} |
3171 | from openerp.tools import test_reports |
3172 | - test_reports.try_report_action(cr, uid, 'action_account_analytic_cost',wiz_data=data_dict, context=ctx, our_module='account') |
3173 | + test_reports.try_report_action(cr, uid, 'analytic.action_account_analytic_cost',wiz_data=data_dict, context=ctx, our_module='account') |
3174 | |
3175 | - |
3176 | Print the Cost Ledger(Only Quantities) Report through the wizard |
3177 | - |
3178 | !python {model: account.analytic.account}: | |
3179 | ctx={} |
3180 | - ctx.update({'model': 'account.analytic.account','active_ids': [ref('account.analytic_root'),ref('account.analytic_absences'),ref('account.analytic_internal'),ref('account.analytic_our_super_product')]}) |
3181 | + ctx.update({'model': 'account.analytic.account','active_ids': [ref('analytic.analytic_root'),ref('analytic.analytic_absences'),ref('analytic.analytic_internal'),ref('analytic.analytic_our_super_product')]}) |
3182 | data_dict = {} |
3183 | from openerp.tools import test_reports |
3184 | - test_reports.try_report_action(cr, uid, 'action_account_analytic_cost_ledger_journal',wiz_data=data_dict, context=ctx, our_module='account') |
3185 | + test_reports.try_report_action(cr, uid, 'analytic.action_account_analytic_cost_ledger_journal',wiz_data=data_dict, context=ctx, our_module='account') |
3186 | |
3187 | - |
3188 | Print the Analytic Journal Report through the wizard |
3189 | - |
3190 | !python {model: account.analytic.journal}: | |
3191 | ctx={} |
3192 | - ctx.update({'model': 'account.analytic.journal','active_ids': [ref('account.cose_journal_sale'), ref('account.exp'), ref('account.sit')]}) |
3193 | + ctx.update({'model': 'account.analytic.journal','active_ids': [ref('analytic.cose_journal_sale'), ref('account.exp'), ref('analytic.sit')]}) |
3194 | data_dict = {} |
3195 | from openerp.tools import test_reports |
3196 | - test_reports.try_report_action(cr, uid, 'action_account_analytic_journal',wiz_data=data_dict, context=ctx, our_module='account') |
3197 | + test_reports.try_report_action(cr, uid, 'analytic.action_account_analytic_journal',wiz_data=data_dict, context=ctx, our_module='account') |
3198 | |
3199 | - |
3200 | Print the Inverted Analytic Balance Report through the wizard |
3201 | - |
3202 | !python {model: account.analytic.account}: | |
3203 | ctx={} |
3204 | - ctx.update({'model': 'account.analytic.account','active_ids': [ref('account.analytic_root')]}) |
3205 | + ctx.update({'model': 'account.analytic.account','active_ids': [ref('analytic.analytic_root')]}) |
3206 | data_dict = {} |
3207 | from openerp.tools import test_reports |
3208 | - test_reports.try_report_action(cr, uid, 'action_account_analytic_invert_balance',wiz_data=data_dict, context=ctx, our_module='account') |
3209 | + test_reports.try_report_action(cr, uid, 'analytic.action_account_analytic_invert_balance',wiz_data=data_dict, context=ctx, our_module='account') |
3210 | |
3211 | === modified file 'account_analytic_analysis/account_analytic_analysis_view.xml' |
3212 | --- account_analytic_analysis/account_analytic_analysis_view.xml 2014-04-01 12:36:57 +0000 |
3213 | +++ account_analytic_analysis/account_analytic_analysis_view.xml 2014-04-28 09:41:45 +0000 |
3214 | @@ -197,7 +197,7 @@ |
3215 | <record id="view_account_analytic_account_tree_c2c_3" model="ir.ui.view"> |
3216 | <field name="name">account.analytic.account.list.contract</field> |
3217 | <field name="model">account.analytic.account</field> |
3218 | - <field name="inherit_id" ref="account.view_account_analytic_account_list"/> |
3219 | + <field name="inherit_id" ref="analytic.view_account_analytic_account_list"/> |
3220 | <field name="arch" type="xml"> |
3221 | <field name="date_start" position="before"> |
3222 | <field name="last_invoice_date"/> |
3223 | @@ -280,7 +280,7 @@ |
3224 | <field name="view_mode">tree,form</field> |
3225 | <field name="domain">[('invoice_id','=',False)]</field> |
3226 | <field name="context">{'search_default_to_invoice': 1}</field> |
3227 | - <field name="search_view_id" ref="account.view_account_analytic_line_filter"/> |
3228 | + <field name="search_view_id" ref="analytic.view_account_analytic_line_filter"/> |
3229 | <field name="help" type="html"> |
3230 | <p> |
3231 | You will find here timesheets and purchases you did for |
3232 | @@ -338,6 +338,21 @@ |
3233 | </field> |
3234 | </record> |
3235 | <menuitem action="template_of_contract_action" id="menu_template_of_contract_action" parent="base.menu_base_config"/> |
3236 | + |
3237 | + <record id="account_analytic_analysis_form_form" model="ir.ui.view"> |
3238 | + <field name="name">account.analytic.account.invoice.form.inherit</field> |
3239 | + <field name="model">account.analytic.account</field> |
3240 | + <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/> |
3241 | + <field eval="20" name="priority"/> |
3242 | + <field name="arch" type="xml"> |
3243 | + <xpath expr='//div[@name="buttons"]' position='inside'> |
3244 | + <button string="Time & Materials to Invoice" |
3245 | + name="%(action_hr_tree_invoiced_all)d" |
3246 | + type="action" |
3247 | + context="{'search_default_account_id': [active_id], 'default_account_id': active_id}"/> |
3248 | + </xpath> |
3249 | + </field> |
3250 | + </record> |
3251 | |
3252 | </data> |
3253 | </openerp> |
3254 | |
3255 | === modified file 'account_analytic_analysis/analytic_account_demo.xml' |
3256 | --- account_analytic_analysis/analytic_account_demo.xml 2013-10-27 12:31:04 +0000 |
3257 | +++ account_analytic_analysis/analytic_account_demo.xml 2014-04-28 09:41:45 +0000 |
3258 | @@ -1,7 +1,7 @@ |
3259 | <?xml version="1.0" encoding="utf-8"?> |
3260 | <openerp> |
3261 | <data noupdate="1"> |
3262 | - <record id="account.analytic_consultancy" model="account.analytic.account"> |
3263 | + <record id="analytic.analytic_consultancy" model="account.analytic.account"> |
3264 | <field name="partner_id" ref="base.res_partner_15"/> |
3265 | <field name="invoice_on_timesheets">True</field> |
3266 | <field name="hours_qtt_est">1200</field> |
3267 | @@ -12,16 +12,16 @@ |
3268 | </record> |
3269 | |
3270 | <record id="sale.sale_order_4" model="sale.order"> |
3271 | - <field name="project_id" ref="account.analytic_consultancy"/> |
3272 | + <field name="project_id" ref="analytic.analytic_consultancy"/> |
3273 | </record> |
3274 | |
3275 | <record id="hr_timesheet.working_hours_maintenance" model="hr.analytic.timesheet"> |
3276 | - <field name="account_id" ref="account.analytic_consultancy"/> |
3277 | + <field name="account_id" ref="analytic.analytic_consultancy"/> |
3278 | <field name="to_invoice" ref="hr_timesheet_invoice.timesheet_invoice_factor1"/> |
3279 | <field name="unit_amount">100</field> |
3280 | </record> |
3281 | |
3282 | - <record id="account.analytic_super_product_trainings" model="account.analytic.account"> |
3283 | + <record id="analytic.analytic_super_product_trainings" model="account.analytic.account"> |
3284 | <field name="partner_id" ref="base.res_partner_18"/> |
3285 | <field name="invoice_on_timesheets">True</field> |
3286 | <field name="hours_qtt_est">500</field> |
3287 | @@ -32,11 +32,11 @@ |
3288 | </record> |
3289 | |
3290 | <record id="sale.sale_order_6" model="sale.order"> |
3291 | - <field name="project_id" ref="account.analytic_super_product_trainings"/> |
3292 | + <field name="project_id" ref="analytic.analytic_super_product_trainings"/> |
3293 | <field name="partner_id" ref="base.res_partner_1"/> |
3294 | </record> |
3295 | |
3296 | - <record id="account.analytic_support_internal" model="account.analytic.account"> |
3297 | + <record id="analytic.analytic_support_internal" model="account.analytic.account"> |
3298 | <field name="partner_id" ref="base.res_partner_1"/> |
3299 | <field name="use_timesheets">True</field> |
3300 | <field name="invoice_on_timesheets">True</field> |
3301 | |
3302 | === modified file 'account_analytic_plans/test/acount_analytic_plans_report.yml' |
3303 | --- account_analytic_plans/test/acount_analytic_plans_report.yml 2014-04-02 16:40:53 +0000 |
3304 | +++ account_analytic_plans/test/acount_analytic_plans_report.yml 2014-04-28 09:41:45 +0000 |
3305 | @@ -5,7 +5,8 @@ |
3306 | import os, time |
3307 | import openerp.report |
3308 | from openerp import tools |
3309 | - data_dict = {'model': 'account.analytic.account', 'form': {'date1':time.strftime("%Y-01-01"),'date2':time.strftime('%Y-%m-%d'),'journal_ids':[6,0,(ref('account.cose_journal_sale'))],'ref':ref('account.analytic_root'),'empty_line':True,'id':ref('account.analytic_root'),'context':{}}} |
3310 | - data, format = openerp.report.render_report(cr, uid, [ref('account.analytic_root')], 'account_analytic_plans.report_crossoveredanalyticplans', data_dict, {}) |
3311 | + data_dict = {'model': 'account.analytic.account', 'form': {'date1':time.strftime("%Y-01-01"),'date2':time.strftime('%Y-%m-%d'),'journal_ids':[6,0,(ref('analytic.cose_journal_sale'))],'ref':ref('analytic.analytic_root'),'empty_line':True,'id':ref('analytic.analytic_root'),'context':{}}} |
3312 | + data, format = openerp.report.render_report(cr, uid, [ref('analytic.analytic_root')], 'account_analytic_plans.report_crossoveredanalyticplans', data_dict, {}) |
3313 | if tools.config['test_report_directory']: |
3314 | file(os.path.join(tools.config['test_report_directory'], 'account_analytic_plans-crossovered_analyitic.'+format), 'wb+').write(data) |
3315 | + |
3316 | |
3317 | === modified file 'account_budget/account_budget_demo.xml' |
3318 | --- account_budget/account_budget_demo.xml 2011-11-01 11:28:40 +0000 |
3319 | +++ account_budget/account_budget_demo.xml 2014-04-28 09:41:45 +0000 |
3320 | @@ -42,7 +42,7 @@ |
3321 | <!-- Budget lines --> |
3322 | <data noupdate="1"> |
3323 | <record id="crossovered_budget_lines_0" model="crossovered.budget.lines"> |
3324 | - <field name="analytic_account_id" ref="account.analytic_consultancy"/> |
3325 | + <field name="analytic_account_id" ref="analytic.analytic_consultancy"/> |
3326 | <field name="general_budget_id" ref="account_budget_post_purchase0"/> |
3327 | <field eval="str(time.localtime(time.time())[0]+1)+'-01-01'" name="date_from"/> |
3328 | <field eval="-500.0" name="planned_amount"/> |
3329 | @@ -50,7 +50,7 @@ |
3330 | <field eval="str(time.localtime(time.time())[0]+1)+'-01-31'" name="date_to"/> |
3331 | </record> |
3332 | <record id="crossovered_budget_lines_1" model="crossovered.budget.lines"> |
3333 | - <field name="analytic_account_id" ref="account.analytic_consultancy"/> |
3334 | + <field name="analytic_account_id" ref="analytic.analytic_consultancy"/> |
3335 | <field name="general_budget_id" ref="account_budget_post_purchase0"/> |
3336 | <field eval="str(time.localtime(time.time())[0]+1)+'-02-01'" name="date_from"/> |
3337 | <field eval="-250.0" name="planned_amount"/> |
3338 | @@ -58,7 +58,7 @@ |
3339 | <field eval="str(time.localtime(time.time())[0]+1)+'-02-28'" name="date_to"/> |
3340 | </record> |
3341 | <record id="crossovered_budget_lines_2" model="crossovered.budget.lines"> |
3342 | - <field name="analytic_account_id" ref="account.analytic_consultancy"/> |
3343 | + <field name="analytic_account_id" ref="analytic.analytic_consultancy"/> |
3344 | <field name="general_budget_id" ref="account_budget_post_sales0"/> |
3345 | <field eval="str(time.localtime(time.time())[0]+1)+'-01-01'" name="date_from"/> |
3346 | <field eval="500.0" name="planned_amount"/> |
3347 | @@ -66,7 +66,7 @@ |
3348 | <field eval="str(time.localtime(time.time())[0]+1)+'-01-31'" name="date_to"/> |
3349 | </record> |
3350 | <record id="crossovered_budget_lines_3" model="crossovered.budget.lines"> |
3351 | - <field name="analytic_account_id" ref="account.analytic_consultancy"/> |
3352 | + <field name="analytic_account_id" ref="analytic.analytic_consultancy"/> |
3353 | <field name="general_budget_id" ref="account_budget_post_sales0"/> |
3354 | <field eval="str(time.localtime(time.time())[0]+1)+'-02-07'" name="date_from"/> |
3355 | <field eval="900.0" name="planned_amount"/> |
3356 | @@ -74,7 +74,7 @@ |
3357 | <field eval="str(time.localtime(time.time())[0]+1)+'-02-28'" name="date_to"/> |
3358 | </record> |
3359 | <record id="crossovered_budget_lines_4" model="crossovered.budget.lines"> |
3360 | - <field name="analytic_account_id" ref="account.analytic_consultancy"/> |
3361 | + <field name="analytic_account_id" ref="analytic.analytic_consultancy"/> |
3362 | <field name="general_budget_id" ref="account_budget_post_sales0"/> |
3363 | <field eval="str(time.localtime(time.time())[0]+1)+'-03-01'" name="date_from"/> |
3364 | <field eval="300.0" name="planned_amount"/> |
3365 | @@ -84,7 +84,7 @@ |
3366 | </data> |
3367 | <data noupdate="1"> |
3368 | <record id="crossovered_budget_lines_5" model="crossovered.budget.lines"> |
3369 | - <field name="analytic_account_id" ref="account.analytic_super_product_trainings"/> |
3370 | + <field name="analytic_account_id" ref="analytic.analytic_super_product_trainings"/> |
3371 | <field name="general_budget_id" ref="account_budget_post_sales0"/> |
3372 | <field eval="str(time.localtime(time.time())[0]+1)+'-03-16'" name="date_from"/> |
3373 | <field eval="375.0" name="planned_amount"/> |
3374 | @@ -93,7 +93,7 @@ |
3375 | <field eval="str(time.localtime(time.time())[0]+1)+'-03-31'" name="date_to"/> |
3376 | </record> |
3377 | <record id="crossovered_budget_lines_6" model="crossovered.budget.lines"> |
3378 | - <field name="analytic_account_id" ref="account.analytic_super_product_trainings"/> |
3379 | + <field name="analytic_account_id" ref="analytic.analytic_super_product_trainings"/> |
3380 | <field name="general_budget_id" ref="account_budget_post_purchase0"/> |
3381 | <field eval="str(time.localtime(time.time())[0]+1)+'-04-01'" name="date_from"/> |
3382 | <field eval="-150.0" name="planned_amount"/> |
3383 | @@ -101,7 +101,7 @@ |
3384 | <field eval="str(time.localtime(time.time())[0]+1)+'-04-30'" name="date_to"/> |
3385 | </record> |
3386 | <record id="crossovered_budget_lines_7" model="crossovered.budget.lines"> |
3387 | - <field name="analytic_account_id" ref="account.analytic_super_product_trainings"/> |
3388 | + <field name="analytic_account_id" ref="analytic.analytic_super_product_trainings"/> |
3389 | <field name="general_budget_id" ref="account_budget_post_sales0"/> |
3390 | <field eval="str(time.localtime(time.time())[0]+1)+'-05-01'" name="date_from"/> |
3391 | <field eval="375.0" name="planned_amount"/> |
3392 | @@ -112,7 +112,7 @@ |
3393 | </data> |
3394 | <data noupdate="1"> |
3395 | <record id="crossovered_budget_lines_8" model="crossovered.budget.lines"> |
3396 | - <field name="analytic_account_id" ref="account.analytic_seagate_p1"/> |
3397 | + <field name="analytic_account_id" ref="analytic.analytic_seagate_p1"/> |
3398 | <field name="general_budget_id" ref="account_budget_post_purchase0"/> |
3399 | <field eval="str(time.localtime(time.time())[0]+1)+'-06-01'" name="date_from"/> |
3400 | <field eval="-7500.0" name="planned_amount"/> |
3401 | @@ -120,7 +120,7 @@ |
3402 | <field eval="str(time.localtime(time.time())[0]+1)+'-06-15'" name="date_to"/> |
3403 | </record> |
3404 | <record id="crossovered_budget_lines_9" model="crossovered.budget.lines"> |
3405 | - <field name="analytic_account_id" ref="account.analytic_seagate_p1"/> |
3406 | + <field name="analytic_account_id" ref="analytic.analytic_seagate_p1"/> |
3407 | <field name="general_budget_id" ref="account_budget_post_purchase0"/> |
3408 | <field eval="str(time.localtime(time.time())[0]+1)+'-06-16'" name="date_from"/> |
3409 | <field eval="-5000.0" name="planned_amount"/> |
3410 | @@ -128,7 +128,7 @@ |
3411 | <field eval="str(time.localtime(time.time())[0]+1)+'-06-30'" name="date_to"/> |
3412 | </record> |
3413 | <record id="crossovered_budget_lines_10" model="crossovered.budget.lines"> |
3414 | - <field name="analytic_account_id" ref="account.analytic_seagate_p1"/> |
3415 | + <field name="analytic_account_id" ref="analytic.analytic_seagate_p1"/> |
3416 | <field name="general_budget_id" ref="account_budget_post_purchase0"/> |
3417 | <field eval="str(time.localtime(time.time())[0]+1)+'-07-01'" name="date_from"/> |
3418 | <field eval="-2000.0" name="planned_amount"/> |
3419 | @@ -136,7 +136,7 @@ |
3420 | <field eval="str(time.localtime(time.time())[0]+1)+'-07-15'" name="date_to"/> |
3421 | </record> |
3422 | <record id="crossovered_budget_lines_11" model="crossovered.budget.lines"> |
3423 | - <field name="analytic_account_id" ref="account.analytic_seagate_p1"/> |
3424 | + <field name="analytic_account_id" ref="analytic.analytic_seagate_p1"/> |
3425 | <field name="general_budget_id" ref="account_budget_post_sales0"/> |
3426 | <field eval="str(time.localtime(time.time())[0]+1)+'-07-16'" name="date_from"/> |
3427 | <field eval="20000.0" name="planned_amount"/> |
3428 | @@ -144,7 +144,7 @@ |
3429 | <field eval="str(time.localtime(time.time())[0]+1)+'-07-31'" name="date_to"/> |
3430 | </record> |
3431 | <record id="crossovered_budget_lines_12" model="crossovered.budget.lines"> |
3432 | - <field name="analytic_account_id" ref="account.analytic_seagate_p1"/> |
3433 | + <field name="analytic_account_id" ref="analytic.analytic_seagate_p1"/> |
3434 | <field name="general_budget_id" ref="account_budget_post_sales0"/> |
3435 | <field eval="str(time.localtime(time.time())[0]+1)+'-08-01'" name="date_from"/> |
3436 | <field eval="20000.0" name="planned_amount"/> |
3437 | @@ -154,7 +154,7 @@ |
3438 | </data> |
3439 | <data noupdate="1"> |
3440 | <record id="crossovered_budget_lines_13" model="crossovered.budget.lines"> |
3441 | - <field name="analytic_account_id" ref="account.analytic_seagate_p2"/> |
3442 | + <field name="analytic_account_id" ref="analytic.analytic_seagate_p2"/> |
3443 | <field name="general_budget_id" ref="account_budget_post_purchase0"/> |
3444 | <field eval="str(time.localtime(time.time())[0]+1)+'-08-16'" name="date_from"/> |
3445 | <field eval="-3000.0" name="planned_amount"/> |
3446 | @@ -162,7 +162,7 @@ |
3447 | <field eval="str(time.localtime(time.time())[0]+1)+'-08-31'" name="date_to"/> |
3448 | </record> |
3449 | <record id="crossovered_budget_lines_14" model="crossovered.budget.lines"> |
3450 | - <field name="analytic_account_id" ref="account.analytic_seagate_p2"/> |
3451 | + <field name="analytic_account_id" ref="analytic.analytic_seagate_p2"/> |
3452 | <field name="general_budget_id" ref="account_budget_post_purchase0"/> |
3453 | <field eval="str(time.localtime(time.time())[0]+1)+'-09-01'" name="date_from"/> |
3454 | <field eval="-1000.0" name="planned_amount"/> |
3455 | @@ -170,7 +170,7 @@ |
3456 | <field eval="str(time.localtime(time.time())[0]+1)+'-09-15'" name="date_to"/> |
3457 | </record> |
3458 | <record id="crossovered_budget_lines_15" model="crossovered.budget.lines"> |
3459 | - <field name="analytic_account_id" ref="account.analytic_seagate_p2"/> |
3460 | + <field name="analytic_account_id" ref="analytic.analytic_seagate_p2"/> |
3461 | <field name="general_budget_id" ref="account_budget_post_sales0"/> |
3462 | <field eval="str(time.localtime(time.time())[0]+1)+'-09-16'" name="date_from"/> |
3463 | <field eval="10000.0" name="planned_amount"/> |
3464 | @@ -178,7 +178,7 @@ |
3465 | <field eval="str(time.localtime(time.time())[0]+1)+'-09-30'" name="date_to"/> |
3466 | </record> |
3467 | <record id="crossovered_budget_lines_16" model="crossovered.budget.lines"> |
3468 | - <field name="analytic_account_id" ref="account.analytic_seagate_p2"/> |
3469 | + <field name="analytic_account_id" ref="analytic.analytic_seagate_p2"/> |
3470 | <field name="general_budget_id" ref="account_budget_post_sales0"/> |
3471 | <field eval="str(time.localtime(time.time())[0]+1)+'-10-01'" name="date_from"/> |
3472 | <field eval="10000.0" name="planned_amount"/> |
3473 | |
3474 | === modified file 'account_budget/test/account_budget.yml' |
3475 | --- account_budget/test/account_budget.yml 2011-01-14 00:11:01 +0000 |
3476 | +++ account_budget/test/account_budget.yml 2014-04-28 09:41:45 +0000 |
3477 | @@ -16,12 +16,12 @@ |
3478 | - |
3479 | !record {model: crossovered.budget, id: crossovered_budget_budget0}: |
3480 | crossovered_budget_line: |
3481 | - - analytic_account_id: account.analytic_consultancy |
3482 | + - analytic_account_id: analytic.analytic_consultancy |
3483 | date_from: !eval "'%s-01-01' %(datetime.now().year+1)" |
3484 | date_to: !eval "'%s-12-31' %(datetime.now().year+1)" |
3485 | general_budget_id: account_budget.account_budget_post_purchase0 |
3486 | planned_amount: 10000.0 |
3487 | - - analytic_account_id: account.analytic_super_product_trainings |
3488 | + - analytic_account_id: analytic.analytic_super_product_trainings |
3489 | date_from: !eval "'%s-09-01' %(datetime.now().year+1)" |
3490 | date_to: !eval "'%s-09-30' %(datetime.now().year+1)" |
3491 | general_budget_id: account_budget.account_budget_post_sales0 |
3492 | |
3493 | === modified file 'account_budget/test/account_budget_report.yml' |
3494 | --- account_budget/test/account_budget_report.yml 2014-04-02 16:40:53 +0000 |
3495 | +++ account_budget/test/account_budget_report.yml 2014-04-28 09:41:45 +0000 |
3496 | @@ -2,7 +2,7 @@ |
3497 | Print the Analytic Budget Report through wizard |
3498 | - |
3499 | !python {model: account.analytic.account}: | |
3500 | - ctx = {'model': 'account.analytic.account','active_ids': [ref('account.analytic_root')]} |
3501 | + ctx = {'model': 'account.analytic.account','active_ids': [ref('analytic.analytic_root')]} |
3502 | from openerp.tools import test_reports |
3503 | test_reports.try_report_action(cr, uid, 'action_account_budget_analytic',wiz_data={}, context=ctx, our_module='account_budget') |
3504 | |
3505 | |
3506 | === modified file 'account_voucher/test/case1_usd_usd.yml' |
3507 | --- account_voucher/test/case1_usd_usd.yml 2013-10-27 12:31:04 +0000 |
3508 | +++ account_voucher/test/case1_usd_usd.yml 2014-04-28 09:41:45 +0000 |
3509 | @@ -60,7 +60,7 @@ |
3510 | name: Bank Journal(USD) |
3511 | code: BUSD |
3512 | type: bank |
3513 | - analytic_journal_id: account.sit |
3514 | + analytic_journal_id: analytic.sit |
3515 | sequence_id: account.sequence_bank_journal |
3516 | default_debit_account_id: account_cash_usd_id |
3517 | default_credit_account_id: account_cash_usd_id |
3518 | |
3519 | === modified file 'account_voucher/test/case1_usd_usd_payment_rate.yml' |
3520 | --- account_voucher/test/case1_usd_usd_payment_rate.yml 2013-05-14 12:03:41 +0000 |
3521 | +++ account_voucher/test/case1_usd_usd_payment_rate.yml 2014-04-28 09:41:45 +0000 |
3522 | @@ -60,7 +60,7 @@ |
3523 | name: Bank Journal(USD) |
3524 | code: BUSD |
3525 | type: bank |
3526 | - analytic_journal_id: account.sit |
3527 | + analytic_journal_id: analytic.sit |
3528 | sequence_id: account.sequence_bank_journal |
3529 | default_debit_account_id: account_cash_usd_id |
3530 | default_credit_account_id: account_cash_usd_id |
3531 | |
3532 | === modified file 'account_voucher/test/case2_suppl_usd_eur.yml' |
3533 | --- account_voucher/test/case2_suppl_usd_eur.yml 2013-10-27 12:31:04 +0000 |
3534 | +++ account_voucher/test/case2_suppl_usd_eur.yml 2014-04-28 09:41:45 +0000 |
3535 | @@ -17,7 +17,7 @@ |
3536 | name: Bank Journal(EUR) |
3537 | code: BEUR |
3538 | type: bank |
3539 | - analytic_journal_id: account.sit |
3540 | + analytic_journal_id: analytic.sit |
3541 | sequence_id: account.sequence_bank_journal |
3542 | default_debit_account_id: account.cash |
3543 | default_credit_account_id: account.cash |
3544 | @@ -30,7 +30,7 @@ |
3545 | name: Bank Journal(USD) |
3546 | code: BUSD |
3547 | type: bank |
3548 | - analytic_journal_id: account.sit |
3549 | + analytic_journal_id: analytic.sit |
3550 | sequence_id: account.sequence_bank_journal |
3551 | default_debit_account_id: account.cash |
3552 | default_credit_account_id: account.cash |
3553 | |
3554 | === modified file 'account_voucher/test/case2_usd_eur_debtor_in_eur.yml' |
3555 | --- account_voucher/test/case2_usd_eur_debtor_in_eur.yml 2013-10-27 12:31:04 +0000 |
3556 | +++ account_voucher/test/case2_usd_eur_debtor_in_eur.yml 2014-04-28 09:41:45 +0000 |
3557 | @@ -54,7 +54,7 @@ |
3558 | name: Bank Journal(EUR) |
3559 | code: BEUR |
3560 | type: bank |
3561 | - analytic_journal_id: account.sit |
3562 | + analytic_journal_id: analytic.sit |
3563 | sequence_id: account.sequence_bank_journal |
3564 | default_debit_account_id: account.cash |
3565 | default_credit_account_id: account.cash |
3566 | @@ -66,7 +66,7 @@ |
3567 | name: Bank Journal(USD) |
3568 | code: BUSD |
3569 | type: bank |
3570 | - analytic_journal_id: account.sit |
3571 | + analytic_journal_id: analytic.sit |
3572 | sequence_id: account.sequence_bank_journal |
3573 | default_debit_account_id: account_cash_usd_id |
3574 | default_credit_account_id: account_cash_usd_id |
3575 | |
3576 | === modified file 'account_voucher/test/case2_usd_eur_debtor_in_usd.yml' |
3577 | --- account_voucher/test/case2_usd_eur_debtor_in_usd.yml 2013-10-27 12:31:04 +0000 |
3578 | +++ account_voucher/test/case2_usd_eur_debtor_in_usd.yml 2014-04-28 09:41:45 +0000 |
3579 | @@ -54,7 +54,7 @@ |
3580 | name: Bank Journal(EUR) |
3581 | code: BEUR |
3582 | type: bank |
3583 | - analytic_journal_id: account.sit |
3584 | + analytic_journal_id: analytic.sit |
3585 | sequence_id: account.sequence_bank_journal |
3586 | default_debit_account_id: account.cash |
3587 | default_credit_account_id: account.cash |
3588 | @@ -66,7 +66,7 @@ |
3589 | name: Bank Journal(USD) |
3590 | code: BUSD |
3591 | type: bank |
3592 | - analytic_journal_id: account.sit |
3593 | + analytic_journal_id: analytic.sit |
3594 | sequence_id: account.sequence_bank_journal |
3595 | default_debit_account_id: account_cash_usd_id |
3596 | default_credit_account_id: account_cash_usd_id |
3597 | |
3598 | === modified file 'account_voucher/test/case3_eur_eur.yml' |
3599 | --- account_voucher/test/case3_eur_eur.yml 2013-10-27 12:31:04 +0000 |
3600 | +++ account_voucher/test/case3_eur_eur.yml 2014-04-28 09:41:45 +0000 |
3601 | @@ -22,7 +22,7 @@ |
3602 | name: Bank Journal(EUR) |
3603 | code: BEUR |
3604 | type: bank |
3605 | - analytic_journal_id: account.sit |
3606 | + analytic_journal_id: analytic.sit |
3607 | sequence_id: account.sequence_bank_journal |
3608 | default_debit_account_id: account.cash |
3609 | default_credit_account_id: account.cash |
3610 | |
3611 | === modified file 'account_voucher/test/case4_cad_chf.yml' |
3612 | --- account_voucher/test/case4_cad_chf.yml 2013-10-27 12:31:04 +0000 |
3613 | +++ account_voucher/test/case4_cad_chf.yml 2014-04-28 09:41:45 +0000 |
3614 | @@ -55,7 +55,7 @@ |
3615 | name: Bank Journal(CHF) |
3616 | code: BCHF |
3617 | type: bank |
3618 | - analytic_journal_id: account.sit |
3619 | + analytic_journal_id: analytic.sit |
3620 | sequence_id: account.sequence_bank_journal |
3621 | default_debit_account_id: account_cash_chf_id |
3622 | default_credit_account_id: account_cash_chf_id |
3623 | |
3624 | === modified file 'account_voucher/test/case5_suppl_usd_usd.yml' |
3625 | --- account_voucher/test/case5_suppl_usd_usd.yml 2013-10-27 12:31:04 +0000 |
3626 | +++ account_voucher/test/case5_suppl_usd_usd.yml 2014-04-28 09:41:45 +0000 |
3627 | @@ -41,7 +41,7 @@ |
3628 | name: Bank Journal(EUR) |
3629 | code: BEUR |
3630 | type: bank |
3631 | - analytic_journal_id: account.sit |
3632 | + analytic_journal_id: analytic.sit |
3633 | sequence_id: account.sequence_bank_journal |
3634 | default_debit_account_id: account.cash |
3635 | default_credit_account_id: account.cash |
3636 | @@ -53,7 +53,7 @@ |
3637 | name: Bank Journal(USD) |
3638 | code: BUSD |
3639 | type: bank |
3640 | - analytic_journal_id: account.sit |
3641 | + analytic_journal_id: analytic.sit |
3642 | sequence_id: account.sequence_bank_journal |
3643 | default_debit_account_id: account_cash_usd_id2 |
3644 | default_credit_account_id: account_cash_usd_id2 |
3645 | |
3646 | === modified file 'account_voucher/test/case_eur_usd.yml' |
3647 | --- account_voucher/test/case_eur_usd.yml 2013-10-27 12:31:04 +0000 |
3648 | +++ account_voucher/test/case_eur_usd.yml 2014-04-28 09:41:45 +0000 |
3649 | @@ -39,7 +39,7 @@ |
3650 | name: Bank Journal Test(USD) |
3651 | code: BEUSD |
3652 | type: bank |
3653 | - analytic_journal_id: account.sit |
3654 | + analytic_journal_id: analytic.sit |
3655 | sequence_id: account.sequence_bank_journal |
3656 | default_debit_account_id: account_eur_usd_id |
3657 | default_credit_account_id: account_eur_usd_id |
3658 | |
3659 | === modified file 'analytic/__init__.py' |
3660 | --- analytic/__init__.py 2011-01-14 00:11:01 +0000 |
3661 | +++ analytic/__init__.py 2014-04-28 09:41:45 +0000 |
3662 | @@ -20,6 +20,7 @@ |
3663 | ############################################################################## |
3664 | |
3665 | import analytic |
3666 | - |
3667 | +import project |
3668 | +import report |
3669 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3670 | |
3671 | |
3672 | === modified file 'analytic/__openerp__.py' |
3673 | --- analytic/__openerp__.py 2012-12-19 17:32:15 +0000 |
3674 | +++ analytic/__openerp__.py 2014-04-28 09:41:45 +0000 |
3675 | @@ -40,8 +40,25 @@ |
3676 | 'analytic_sequence.xml', |
3677 | 'analytic_view.xml', |
3678 | 'analytic_data.xml', |
3679 | - ], |
3680 | - 'demo': [], |
3681 | + 'project/wizard/project_account_analytic_line_view.xml', |
3682 | + 'project/project_view.xml', |
3683 | + 'project/project_report.xml', |
3684 | + 'project/wizard/account_analytic_balance_report_view.xml', |
3685 | + 'project/wizard/account_analytic_cost_ledger_view.xml', |
3686 | + 'project/wizard/account_analytic_inverted_balance_report.xml', |
3687 | + 'project/wizard/account_analytic_journal_report_view.xml', |
3688 | + 'project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml', |
3689 | + 'project/wizard/account_analytic_chart_view.xml', |
3690 | + 'report/report_analyticbalance.xml', |
3691 | + 'report/report_analyticjournal.xml', |
3692 | + 'report/report_analyticcostledgerquantity.xml', |
3693 | + 'report/report_analyticcostledger.xml', |
3694 | + 'report/report_invertedanalyticbalance.xml', |
3695 | + ], |
3696 | + 'demo': [ |
3697 | + 'project/project_demo.xml', |
3698 | + 'project/analytic_account_demo.xml', |
3699 | + ], |
3700 | 'installable': True, |
3701 | 'auto_install': False, |
3702 | } |
3703 | |
3704 | === added directory 'analytic/project' |
3705 | === added file 'analytic/project/__init__.py' |
3706 | --- analytic/project/__init__.py 1970-01-01 00:00:00 +0000 |
3707 | +++ analytic/project/__init__.py 2014-04-28 09:41:45 +0000 |
3708 | @@ -0,0 +1,27 @@ |
3709 | +# -*- coding: utf-8 -*- |
3710 | +############################################################################## |
3711 | +# |
3712 | +# OpenERP, Open Source Management Solution |
3713 | +# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
3714 | +# |
3715 | +# This program is free software: you can redistribute it and/or modify |
3716 | +# it under the terms of the GNU Affero General Public License as |
3717 | +# published by the Free Software Foundation, either version 3 of the |
3718 | +# License, or (at your option) any later version. |
3719 | +# |
3720 | +# This program is distributed in the hope that it will be useful, |
3721 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
3722 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3723 | +# GNU Affero General Public License for more details. |
3724 | +# |
3725 | +# You should have received a copy of the GNU Affero General Public License |
3726 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
3727 | +# |
3728 | +############################################################################## |
3729 | + |
3730 | +import project |
3731 | +import wizard |
3732 | + |
3733 | + |
3734 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
3735 | + |
3736 | |
3737 | === added file 'analytic/project/analytic_account_demo.xml' |
3738 | --- analytic/project/analytic_account_demo.xml 1970-01-01 00:00:00 +0000 |
3739 | +++ analytic/project/analytic_account_demo.xml 2014-04-28 09:41:45 +0000 |
3740 | @@ -0,0 +1,235 @@ |
3741 | +<?xml version="1.0" encoding="utf-8"?> |
3742 | +<openerp> |
3743 | + <data noupdate="1"> |
3744 | + <record id="analytic_root" model="account.analytic.account"> |
3745 | + <field name="name" model="res.company" use="name" search="[]"/> |
3746 | + </record> |
3747 | + <record id="analytic_absences" model="account.analytic.account"> |
3748 | + <field name="name">Leaves</field> |
3749 | + <field name="type">view</field> |
3750 | + <field name="parent_id" ref="analytic_root"/> |
3751 | + </record> |
3752 | + <record id="analytic_internal" model="account.analytic.account"> |
3753 | + <field name="name">Internal</field> |
3754 | + <field name="type">view</field> |
3755 | + <field name="parent_id" ref="analytic_root"/> |
3756 | + </record> |
3757 | + <record id="analytic_our_super_product" model="account.analytic.account"> |
3758 | + <field name="name">Our Super Product</field> |
3759 | + <field name="state">open</field> |
3760 | + <field name="type">view</field> |
3761 | + <field name="parent_id" ref="analytic_root"/> |
3762 | + </record> |
3763 | + <record id="analytic_project_1" model="account.analytic.account"> |
3764 | + <field name="name">Project 1</field> |
3765 | + <field name="type">view</field> |
3766 | + <field name="parent_id" ref="analytic_root"/> |
3767 | + </record> |
3768 | + <record id="analytic_project_2" model="account.analytic.account"> |
3769 | + <field name="name">Project 2</field> |
3770 | + <field name="type">view</field> |
3771 | + <field name="parent_id" ref="analytic_root"/> |
3772 | + </record> |
3773 | + <record id="analytic_journal_trainings" model="account.analytic.account"> |
3774 | + <field name="name">Training</field> |
3775 | + <field name="type">view</field> |
3776 | + <field name="parent_id" ref="analytic_internal"/> |
3777 | + </record> |
3778 | + <record id="analytic_in_house" model="account.analytic.account"> |
3779 | + <field name="name">In House</field> |
3780 | + <field name="type">normal</field> |
3781 | + <field name="parent_id" ref="analytic_journal_trainings"/> |
3782 | + </record> |
3783 | + <record id="analytic_online" model="account.analytic.account"> |
3784 | + <field name="name">Online</field> |
3785 | + <field name="type">normal</field> |
3786 | + <field name="parent_id" ref="analytic_journal_trainings"/> |
3787 | + </record> |
3788 | + <record id="analytic_support" model="account.analytic.account"> |
3789 | + <field name="name">Support</field> |
3790 | + <field name="type">view</field> |
3791 | + <field name="parent_id" ref="analytic_our_super_product"/> |
3792 | + </record> |
3793 | + <record id="analytic_partners" model="account.analytic.account"> |
3794 | + <field name="name">Partners</field> |
3795 | + <field name="type">view</field> |
3796 | + <field name="parent_id" ref="analytic_support"/> |
3797 | + </record> |
3798 | + <record id="analytic_customers" model="account.analytic.account"> |
3799 | + <field name="name">Customers</field> |
3800 | + <field name="type">view</field> |
3801 | + <field name="parent_id" ref="analytic_support"/> |
3802 | + </record> |
3803 | + <record id="analytic_support_internal" model="account.analytic.account"> |
3804 | + <field name="name">Internal</field> |
3805 | + <field name="type">contract</field> |
3806 | + <field name="parent_id" ref="analytic_support"/> |
3807 | + </record> |
3808 | + <record id="analytic_integration" model="account.analytic.account"> |
3809 | + <field name="name">Integration</field> |
3810 | + <field name="type">view</field> |
3811 | + <field name="parent_id" ref="analytic_our_super_product"/> |
3812 | + </record> |
3813 | + <record id="analytic_consultancy" model="account.analytic.account"> |
3814 | + <field name="name">Consultancy</field> |
3815 | + <field name="type">contract</field> |
3816 | + <field name="parent_id" ref="analytic_our_super_product"/> |
3817 | + </record> |
3818 | + <record id="analytic_super_product_trainings" model="account.analytic.account"> |
3819 | + <field name="name">Training</field> |
3820 | + <field name="type">contract</field> |
3821 | + <field name="parent_id" ref="analytic_our_super_product"/> |
3822 | + </record> |
3823 | + <record id="analytic_seagate_p1" model="account.analytic.account"> |
3824 | + <field name="name">Seagate P1</field> |
3825 | + <field name="parent_id" ref="analytic_integration"/> |
3826 | + <field name="type">normal</field> |
3827 | + <field name="state">open</field> |
3828 | + <field name="partner_id" ref="base.res_partner_19"/> |
3829 | + </record> |
3830 | + <record id="analytic_seagate_p2" model="account.analytic.account"> |
3831 | + <field name="name">Seagate P2</field> |
3832 | + <field name="type">normal</field> |
3833 | + <field name="parent_id" ref="analytic_integration"/> |
3834 | + <field name="state">open</field> |
3835 | + <field name="partner_id" ref="base.res_partner_19"/> |
3836 | + </record> |
3837 | + <record id="analytic_millennium_industries" model="account.analytic.account"> |
3838 | + <field name="name">Millennium Industries</field> |
3839 | + <field name="parent_id" ref="analytic_integration"/> |
3840 | + <field name="type">normal</field> |
3841 | + <field name="partner_id" ref="base.res_partner_15"/> |
3842 | + </record> |
3843 | + <record id="analytic_integration_c2c" model="account.analytic.account"> |
3844 | + <field name="name">CampToCamp</field> |
3845 | + <field name="type">normal</field> |
3846 | + <field eval="str(time.localtime()[0] - 1) + '-08-07'" name="date_start"/> |
3847 | + <field eval="time.strftime('%Y-12-31')" name="date"/> |
3848 | + <field name="parent_id" ref="analytic_integration"/> |
3849 | + <field name="partner_id" ref="base.res_partner_12"/> |
3850 | + <field name="state">open</field> |
3851 | + </record> |
3852 | + <record id="analytic_agrolait" model="account.analytic.account"> |
3853 | + <field name="name">Agrolait</field> |
3854 | + <field name="parent_id" ref="analytic_customers"/> |
3855 | + <field name="type">normal</field> |
3856 | + <field name="partner_id" ref="base.res_partner_2"/> |
3857 | + </record> |
3858 | + <record id="analytic_asustek" model="account.analytic.account"> |
3859 | + <field name="name">Asustek</field> |
3860 | + <field name="type">normal</field> |
3861 | + <field name="parent_id" ref="analytic_customers"/> |
3862 | + <field name="partner_id" ref="base.res_partner_1"/> |
3863 | + </record> |
3864 | + <record id="analytic_deltapc" model="account.analytic.account"> |
3865 | + <field name="name">Delta PC</field> |
3866 | + <field name="parent_id" ref="analytic_customers"/> |
3867 | + <field name="type">normal</field> |
3868 | + <field name="partner_id" ref="base.res_partner_4"/> |
3869 | + </record> |
3870 | + <record id="analytic_spark" model="account.analytic.account"> |
3871 | + <field name="name">Spark Systems</field> |
3872 | + <field eval="str(time.localtime()[0] - 1) + '-05-09'" name="date_start"/> |
3873 | + <field eval="time.strftime('%Y-05-08')" name="date"/> |
3874 | + <field name="parent_id" ref="analytic_partners"/> |
3875 | + <field name="type">normal</field> |
3876 | + <field name="partner_id" ref="base.res_partner_16"/> |
3877 | + <field name="state">open</field> |
3878 | + </record> |
3879 | + <record id="analytic_nebula" model="account.analytic.account"> |
3880 | + <field name="name">Nebula</field> |
3881 | + <field eval="time.strftime('%Y-02-01')" name="date_start"/> |
3882 | + <field eval="time.strftime('%Y-07-01')" name="date"/> |
3883 | + <field name="type">normal</field> |
3884 | + <field name="parent_id" ref="analytic_partners"/> |
3885 | + <field name="partner_id" ref="base.res_partner_17"/> |
3886 | + <field name="state">open</field> |
3887 | + </record> |
3888 | + <record id="analytic_luminous_technologies" model="account.analytic.account"> |
3889 | + <field name="name">Luminous Technologies</field> |
3890 | + <field eval="time.strftime('%Y-04-24')" name="date_start"/> |
3891 | + <field eval="str(time.localtime()[0] + 1) + '-04-24'" name="date"/> |
3892 | + <field name="type">normal</field> |
3893 | + <field name="parent_id" ref="analytic_partners"/> |
3894 | + <field name="partner_id" ref="base.res_partner_11"/> |
3895 | + </record> |
3896 | + <record id="analytic_desertic_hispafuentes" model="account.analytic.account"> |
3897 | + <field name="name">Desertic - Hispafuentes</field> |
3898 | + <field eval="time.strftime('%Y-02-01')" name="date_start"/> |
3899 | + <field eval="str(time.localtime()[0] + 1) + '-02-01'" name="date"/> |
3900 | + <field name="type">normal</field> |
3901 | + <field name="parent_id" ref="analytic_partners"/> |
3902 | + <field name="partner_id" ref="base.res_partner_12"/> |
3903 | + </record> |
3904 | + <record id="analytic_think_big_systems" model="account.analytic.account"> |
3905 | + <field name="name">Think Big Systems</field> |
3906 | + <field name="type">normal</field> |
3907 | + <field name="parent_id" ref="analytic_partners"/> |
3908 | + <field name="partner_id" ref="base.res_partner_18"/> |
3909 | + </record> |
3910 | + <record id="analytic_partners_camp_to_camp" model="account.analytic.account"> |
3911 | + <field name="name">Camp to Camp</field> |
3912 | + <field eval="time.strftime('%Y-%m-%d', time.localtime(time.time() - 365 * 86400))" name="date_start"/> |
3913 | + <field eval="time.strftime('%Y-%m-%d')" name="date"/> |
3914 | + <field name="type">normal</field> |
3915 | + <field name="parent_id" ref="analytic_partners"/> |
3916 | + <field name="partner_id" ref="base.res_partner_12"/> |
3917 | + <field name="state">open</field> |
3918 | + </record> |
3919 | + <record id="analytic_project_2_support" model="account.analytic.account"> |
3920 | + <field name="name">Support</field> |
3921 | + <field name="type">normal</field> |
3922 | + <field name="parent_id" ref="analytic_project_2"/> |
3923 | + </record> |
3924 | + <record id="analytic_project_2_development" model="account.analytic.account"> |
3925 | + <field name="name">Development</field> |
3926 | + <field name="type">normal</field> |
3927 | + <field name="parent_id" ref="analytic_project_2"/> |
3928 | + </record> |
3929 | + <record id="analytic_project_1_trainings" model="account.analytic.account"> |
3930 | + <field name="name">Training</field> |
3931 | + <field name="type">normal</field> |
3932 | + <field name="parent_id" ref="analytic_project_1"/> |
3933 | + </record> |
3934 | + <record id="analytic_project_1_development" model="account.analytic.account"> |
3935 | + <field name="name">Development</field> |
3936 | + <field name="type">normal</field> |
3937 | + <field name="parent_id" ref="analytic_project_1"/> |
3938 | + </record> |
3939 | + <record id="analytic_administratif" model="account.analytic.account"> |
3940 | + <field name="name">Administrative</field> |
3941 | + <field name="type">normal</field> |
3942 | + <field name="parent_id" ref="analytic_internal"/> |
3943 | + </record> |
3944 | + <record id="analytic_commercial_marketing" model="account.analytic.account"> |
3945 | + <field name="name">Commercial & Marketing</field> |
3946 | + <field name="type">normal</field> |
3947 | + <field name="parent_id" ref="analytic_internal"/> |
3948 | + </record> |
3949 | + <record id="analytic_our_super_product_development" model="account.analytic.account"> |
3950 | + <field name="name">Our Super Product Development</field> |
3951 | + <field name="type">view</field> |
3952 | + <field name="parent_id" ref="analytic_internal"/> |
3953 | + </record> |
3954 | + <record id="analytic_stable" model="account.analytic.account"> |
3955 | + <field name="name">Stable</field> |
3956 | + <field name="type">normal</field> |
3957 | + <field name="parent_id" ref="analytic_our_super_product_development"/> |
3958 | + </record> |
3959 | + <record id="analytic_trunk" model="account.analytic.account"> |
3960 | + <field name="name">Trunk</field> |
3961 | + <field name="type">normal</field> |
3962 | + <field name="parent_id" ref="analytic_our_super_product_development"/> |
3963 | + </record> |
3964 | + <record id="analytic_paid" model="account.analytic.account"> |
3965 | + <field name="name">Paid</field> |
3966 | + <field name="type">normal</field> |
3967 | + <field name="parent_id" ref="analytic_absences"/> |
3968 | + </record> |
3969 | + <record id="analytic_unpaid" model="account.analytic.account"> |
3970 | + <field name="name">Unpaid</field> |
3971 | + <field name="type">normal</field> |
3972 | + <field name="parent_id" ref="analytic_absences"/> |
3973 | + </record> |
3974 | + </data> |
3975 | +</openerp> |
3976 | |
3977 | === added file 'analytic/project/project.py' |
3978 | --- analytic/project/project.py 1970-01-01 00:00:00 +0000 |
3979 | +++ analytic/project/project.py 2014-04-28 09:41:45 +0000 |
3980 | @@ -0,0 +1,41 @@ |
3981 | +# -*- coding: utf-8 -*- |
3982 | +############################################################################## |
3983 | +# |
3984 | +# OpenERP, Open Source Management Solution |
3985 | +# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). |
3986 | +# |
3987 | +# This program is free software: you can redistribute it and/or modify |
3988 | +# it under the terms of the GNU Affero General Public License as |
3989 | +# published by the Free Software Foundation, either version 3 of the |
3990 | +# License, or (at your option) any later version. |
3991 | +# |
3992 | +# This program is distributed in the hope that it will be useful, |
3993 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
3994 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
3995 | +# GNU Affero General Public License for more details. |
3996 | +# |
3997 | +# You should have received a copy of the GNU Affero General Public License |
3998 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
3999 | +# |
4000 | +############################################################################## |
4001 | + |
4002 | +from openerp.osv import fields, osv |
4003 | + |
4004 | +class account_analytic_journal(osv.osv): |
4005 | + _name = 'account.analytic.journal' |
4006 | + _description = 'Analytic Journal' |
4007 | + _columns = { |
4008 | + 'name': fields.char('Journal Name', size=64, required=True), |
4009 | + 'code': fields.char('Journal Code', size=8), |
4010 | + 'active': fields.boolean('Active', help="If the active field is set to False, it will allow you to hide the analytic journal without removing it."), |
4011 | + 'type': fields.selection([('sale','Sale'), ('purchase','Purchase'), ('cash','Cash'), ('general','General'), ('situation','Situation')], 'Type', size=32, required=True, help="Gives the type of the analytic journal. When it needs for a document (eg: an invoice) to create analytic entries, OpenERP will look for a matching journal of the same type."), |
4012 | + 'company_id': fields.many2one('res.company', 'Company', required=True), |
4013 | + } |
4014 | + _defaults = { |
4015 | + 'active': True, |
4016 | + 'type': 'general', |
4017 | + 'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id, |
4018 | + } |
4019 | + |
4020 | + |
4021 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4022 | |
4023 | === added file 'analytic/project/project_demo.xml' |
4024 | --- analytic/project/project_demo.xml 1970-01-01 00:00:00 +0000 |
4025 | +++ analytic/project/project_demo.xml 2014-04-28 09:41:45 +0000 |
4026 | @@ -0,0 +1,15 @@ |
4027 | +<?xml version="1.0" encoding="utf-8"?> |
4028 | +<openerp> |
4029 | + <data noupdate="1"> |
4030 | + <record id="cose_journal_sale" model="account.analytic.journal"> |
4031 | + <field name="code">SAL</field> |
4032 | + <field name="name">Sales</field> |
4033 | + <field name="type">sale</field> |
4034 | + </record> |
4035 | + <record id="sit" model="account.analytic.journal"> |
4036 | + <field name="code">START</field> |
4037 | + <field name="name">Miscellaneous Operation</field> |
4038 | + <field name="type">situation</field> |
4039 | + </record> |
4040 | + </data> |
4041 | +</openerp> |
4042 | |
4043 | === added file 'analytic/project/project_report.xml' |
4044 | --- analytic/project/project_report.xml 1970-01-01 00:00:00 +0000 |
4045 | +++ analytic/project/project_report.xml 2014-04-28 09:41:45 +0000 |
4046 | @@ -0,0 +1,55 @@ |
4047 | +<?xml version="1.0" encoding="utf-8"?> |
4048 | +<openerp> |
4049 | + <data> |
4050 | + <report |
4051 | + id="action_account_analytic_account_inverted_balance" |
4052 | + model="account.analytic.account" |
4053 | + string="Inverted Analytic Balance" |
4054 | + report_type="qweb-pdf" |
4055 | + name="account.report_invertedanalyticbalance" |
4056 | + file="account.report_invertedanalyticbalance" |
4057 | + menu="False" |
4058 | + /> |
4059 | + |
4060 | + <report |
4061 | + id="action_report_analytic_journal" |
4062 | + model="account.analytic.journal" |
4063 | + string="Analytic Journal" |
4064 | + report_type="qweb-pdf" |
4065 | + name="account.report_analyticjournal" |
4066 | + file="account.report_analyticjournal" |
4067 | + menu="False" |
4068 | + /> |
4069 | + |
4070 | + <report |
4071 | + id="action_report_analytic_balance" |
4072 | + model="account.analytic.account" |
4073 | + string="Analytic Balance" |
4074 | + report_type="qweb-pdf" |
4075 | + name="account.report_analyticbalance" |
4076 | + file="account.report_analyticbalance" |
4077 | + menu="False" |
4078 | + /> |
4079 | + |
4080 | + <report |
4081 | + id="action_report_cost_ledger" |
4082 | + model="account.analytic.account" |
4083 | + report_type="qweb-pdf" |
4084 | + string="Cost Ledger" |
4085 | + name="account.report_analyticcostledger" |
4086 | + file="account.report_analyticcostledger" |
4087 | + menu="False" |
4088 | + /> |
4089 | + |
4090 | + <report |
4091 | + id="action_report_cost_ledgerquantity" |
4092 | + model="account.analytic.account" |
4093 | + report_type="qweb-pdf" |
4094 | + string="Cost Ledger (Only quantities)" |
4095 | + name="account.report_analyticcostledgerquantity" |
4096 | + file="account.report_analyticcostledgerquantity" |
4097 | + menu="False" |
4098 | + /> |
4099 | + |
4100 | + </data> |
4101 | +</openerp> |
4102 | |
4103 | === added file 'analytic/project/project_view.xml' |
4104 | --- analytic/project/project_view.xml 1970-01-01 00:00:00 +0000 |
4105 | +++ analytic/project/project_view.xml 2014-04-28 09:41:45 +0000 |
4106 | @@ -0,0 +1,309 @@ |
4107 | +<?xml version="1.0" encoding="utf-8"?> |
4108 | +<openerp> |
4109 | + <data> |
4110 | + |
4111 | + <record id="view_account_analytic_account_list" model="ir.ui.view"> |
4112 | + <field name="name">account.analytic.account.list</field> |
4113 | + <field name="model">account.analytic.account</field> |
4114 | + <field eval="8" name="priority"/> |
4115 | + <field name="arch" type="xml"> |
4116 | + <tree toolbar="1" colors="red:state=='pending';grey:state in ('cancelled','close');blue:type=='view'" string="Analytic Accounts"> |
4117 | + <field name="complete_name"/> |
4118 | + <field name="partner_id"/> |
4119 | + <field name="code"/> |
4120 | + <field name="date_start"/> |
4121 | + <field name="date"/> |
4122 | + <field name="user_id" invisible="1"/> |
4123 | + <field name="manager_id"/> |
4124 | + <field name="parent_id" invisible="1"/> |
4125 | + <field name="state" invisible="1"/> |
4126 | + <field name="type" invisible="1"/> |
4127 | + <field name="template_id" invisible="1"/> |
4128 | + <field name="company_id" groups="base.group_multi_company"/> |
4129 | + </tree> |
4130 | + </field> |
4131 | + </record> |
4132 | + |
4133 | + <record id="view_account_analytic_account_search" model="ir.ui.view"> |
4134 | + <field name="name">account.analytic.account.search</field> |
4135 | + <field name="model">account.analytic.account</field> |
4136 | + <field name="arch" type="xml"> |
4137 | + <search string="Analytic Account"> |
4138 | + <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Analytic Account"/> |
4139 | + <field name="date"/> |
4140 | + <field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/> |
4141 | + <field name="manager_id"/> |
4142 | + <field name="parent_id"/> |
4143 | + <field name="user_id"/> |
4144 | + <filter string="Open" domain="[('state','=','open')]" help="Current Accounts"/> |
4145 | + <filter string="Pending" domain="[('state','=','pending')]" help="Pending Accounts"/> |
4146 | + <group expand="0" string="Group By..."> |
4147 | + <filter string="Associated Partner" domain="[]" context="{'group_by':'partner_id'}"/> |
4148 | + <filter string="Type" domain="[]" context="{'group_by':'type'}"/> |
4149 | + <filter string="Template" domain="[]" context="{'group_by':'template_id'}"/> |
4150 | + <filter string="Parent Account" domain="[]" context="{'group_by':'parent_id'}"/> |
4151 | + <filter string="Status" domain="[]" context="{'group_by':'state'}" groups="base.group_no_one"/> |
4152 | + </group> |
4153 | + </search> |
4154 | + </field> |
4155 | + </record> |
4156 | + |
4157 | + <record id="view_account_analytic_account_tree" model="ir.ui.view"> |
4158 | + <field name="name">account.analytic.account.tree</field> |
4159 | + <field name="model">account.analytic.account</field> |
4160 | + <field name="field_parent">child_complete_ids</field> |
4161 | + <field name="arch" type="xml"> |
4162 | + <tree colors="blue:state=='pending';grey:state in ('close','cancelled');blue:type=='view'" string="Analytic account" toolbar="1"> |
4163 | + <field name="name" invisible="1"/> |
4164 | + <field name="complete_name"/> |
4165 | + <field name="code"/> |
4166 | + <field name="debit"/> |
4167 | + <field name="credit"/> |
4168 | + <field name="balance"/> |
4169 | + <field name="state" invisible="1"/> |
4170 | + <field name="currency_id" groups="base.group_multi_currency"/> |
4171 | + <field name="date" invisible="1"/> |
4172 | + <field name="user_id" invisible="1"/> |
4173 | + <field name="partner_id" invisible="1"/> |
4174 | + <field name="parent_id" invisible="1"/> |
4175 | + <field name="type"/> |
4176 | + <field name="company_id" groups="base.group_multi_company"/> |
4177 | + <field name="template_id" invisible="1"/> |
4178 | + </tree> |
4179 | + </field> |
4180 | + </record> |
4181 | + |
4182 | + |
4183 | + <record id="action_account_analytic_account_form" model="ir.actions.act_window"> |
4184 | + <field name="name">Analytic Accounts</field> |
4185 | + <field name="type">ir.actions.act_window</field> |
4186 | + <field name="res_model">account.analytic.account</field> |
4187 | + <field name="context">{}</field> <!-- repair invalid context by setting empty one --> |
4188 | + <field name="view_type">form</field> |
4189 | + <field name="view_mode">tree,form</field> |
4190 | + <field name="view_id" ref="view_account_analytic_account_tree"/> |
4191 | + <field name="search_view_id" ref="view_account_analytic_account_search"/> |
4192 | + </record> |
4193 | + |
4194 | + <record id="act_account_renew_view" model="ir.actions.act_window"> |
4195 | + <field name="name">Accounts to Renew</field> |
4196 | + <field name="type">ir.actions.act_window</field> |
4197 | + <field name="res_model">account.analytic.account</field> |
4198 | + <field name="view_type">form</field> |
4199 | + <field name="view_mode">tree,form</field> |
4200 | + <field name="domain">[('date','<',time.strftime('%Y-%m-%d %H:%M:%S'))]</field> |
4201 | + <field name="filter" eval="True"/> |
4202 | + </record> |
4203 | + |
4204 | + <record id="action_account_analytic_account_tree2" model="ir.actions.act_window"> |
4205 | + <field name="name">Chart of Analytic Accounts</field> |
4206 | + <field name="res_model">account.analytic.account</field> |
4207 | + <field name="view_type">tree</field> |
4208 | + <field name="view_id" ref="view_account_analytic_account_tree"/> |
4209 | + <field name="domain">[('parent_id','=',False)]</field> |
4210 | + <field name="help" type="html"> |
4211 | + <p> |
4212 | + Click to add a new analytic account. |
4213 | + </p><p> |
4214 | + The normal chart of accounts has a structure defined by the |
4215 | + legal requirement of the country. The analytic chart of |
4216 | + accounts structure should reflect your own business needs in |
4217 | + term of costs/revenues reporting. |
4218 | + </p><p> |
4219 | + They are usually structured by contracts, projects, products or |
4220 | + departements. Most of the OpenERP operations (invoices, |
4221 | + timesheets, expenses, etc) generate analytic entries on the |
4222 | + related account. |
4223 | + </p> |
4224 | + </field> |
4225 | + </record> |
4226 | + |
4227 | + |
4228 | + <record id="view_account_analytic_line_form" model="ir.ui.view"> |
4229 | + <field name="name">account.analytic.line.form</field> |
4230 | + <field name="model">account.analytic.line</field> |
4231 | + <field name="priority">1</field> |
4232 | + <field name="arch" type="xml"> |
4233 | + <form string="Analytic Entry" version="7.0"> |
4234 | + <group> |
4235 | + <group> |
4236 | + <field name="name"/> |
4237 | + <field name="account_id"/> |
4238 | + <field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'account.group_account_invoice']}"/> |
4239 | + </group> |
4240 | + <group> |
4241 | + <field name="date"/> |
4242 | + <field name="company_id" groups="base.group_multi_company"/> |
4243 | + </group> |
4244 | + <group string="Amount"> |
4245 | + <field name="amount"/> |
4246 | + </group> |
4247 | + <group string="Product Information"> |
4248 | + <label for="unit_amount"/> |
4249 | + <div> |
4250 | + <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/> |
4251 | + </div> |
4252 | + </group> |
4253 | + </group> |
4254 | + </form> |
4255 | + </field> |
4256 | + </record> |
4257 | + <record id="view_account_analytic_line_tree" model="ir.ui.view"> |
4258 | + <field name="name">account.analytic.line.tree</field> |
4259 | + <field name="model">account.analytic.line</field> |
4260 | + <field name="arch" type="xml"> |
4261 | + <tree string="Analytic Entries"> |
4262 | + <field name="date"/> |
4263 | + <field name="name"/> |
4264 | + <field name="user_id"/> |
4265 | + <field name="amount" sum="Total" invisible="context.get('to_invoice', False)"/> |
4266 | + <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" sum="Total Quantity"/> |
4267 | + <field domain="[('type','=','normal')]" name="account_id"/> |
4268 | + <field name="company_id" groups="base.group_multi_company"/> |
4269 | + </tree> |
4270 | + </field> |
4271 | + </record> |
4272 | + <record id="view_account_analytic_line_filter" model="ir.ui.view"> |
4273 | + <field name="name">account.analytic.line.select</field> |
4274 | + <field name="model">account.analytic.line</field> |
4275 | + <field name="arch" type="xml"> |
4276 | + <search string="Search Analytic Lines"> |
4277 | + <field name="name" string="Description"/> |
4278 | + <field name="date"/> |
4279 | + <separator/> |
4280 | + <filter string="My Entries" domain="[('user_id','=',uid)]"/> |
4281 | + <field name="account_id" filter_domain="[('account_id','child_of',self)]"/> |
4282 | + <field name="user_id"/> |
4283 | + <group string="Group By..." expand="0"> |
4284 | + <filter string="Analytic Account" context="{'group_by':'account_id'}"/> |
4285 | + <separator/> |
4286 | + <filter string="User" context="{'group_by':'user_id'}"/> |
4287 | + <separator/> |
4288 | + <filter string="Tasks Month" context="{'group_by':'date'}" name="group_date" help="Invoice Tasks by Month"/> |
4289 | + </group> |
4290 | + </search> |
4291 | + </field> |
4292 | + </record> |
4293 | + <record id="action_account_analytic_line_form" model="ir.actions.act_window"> |
4294 | + <field name="name">Analytic Entries</field> |
4295 | + <field name="type">ir.actions.act_window</field> |
4296 | + <field name="res_model">account.analytic.line</field> |
4297 | + <field name="view_type">form</field> |
4298 | + <field name="context">{"search_default_user_id":uid}</field> |
4299 | + <field name="view_id" ref="view_account_analytic_line_tree"/> |
4300 | + </record> |
4301 | + <!-- Entries by Line --> |
4302 | + |
4303 | + <record id="action_account_tree1" model="ir.actions.act_window"> |
4304 | + <field name="name">Analytic Items</field> |
4305 | + <field name="res_model">account.analytic.line</field> |
4306 | + <field name="view_type">form</field> |
4307 | + <field name="view_mode">tree,form</field> |
4308 | + <field name="domain">[('account_id','child_of',[active_id])]</field> |
4309 | + <field name="context">{'account_id':active_id}</field> |
4310 | + <field name="search_view_id" ref="view_account_analytic_line_filter"/> |
4311 | + </record> |
4312 | + <record id="ir_open_account_analytic_account" model="ir.values"> |
4313 | + <field eval="'tree_but_open'" name="key2"/> |
4314 | + <field eval="'account.analytic.account'" name="model"/> |
4315 | + <field name="name">Open Account Tree</field> |
4316 | + <field eval="'ir.actions.act_window,%d'%action_account_tree1" name="value"/> |
4317 | + </record> |
4318 | + |
4319 | + <record id="account_analytic_line_extended_form" model="ir.ui.view"> |
4320 | + <field name="name">account.analytic.line.extended_form</field> |
4321 | + <field name="model">account.analytic.line</field> |
4322 | + <field name="arch" type="xml"> |
4323 | + <form string="Project line" version="7.0"> |
4324 | + <group> |
4325 | + <group> |
4326 | + <field name="name"/> |
4327 | + <field name="account_id"/> |
4328 | + </group> |
4329 | + <group> |
4330 | + <field name="date" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/> |
4331 | + <field name="company_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/> |
4332 | + </group> |
4333 | + <group string="Amount"> |
4334 | + <field name="amount"/> |
4335 | + </group> |
4336 | + <group string="Product Information"> |
4337 | + <label for="unit_amount"/> |
4338 | + <div> |
4339 | + <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/> |
4340 | + </div> |
4341 | + </group> |
4342 | + </group> |
4343 | + </form> |
4344 | + </field> |
4345 | + </record> |
4346 | + <record id="action_account_analytic_account_line_extended_form" model="ir.actions.act_window"> |
4347 | + <field name="name">account.analytic.line.extended</field> |
4348 | + <field name="type">ir.actions.act_window</field> |
4349 | + <field name="res_model">account.analytic.line</field> |
4350 | + <field name="view_type">form</field> |
4351 | + <field name="view_id" ref="account_analytic_line_extended_form"/> |
4352 | + </record> |
4353 | + |
4354 | + # |
4355 | + # Analytic Journal |
4356 | + # |
4357 | + |
4358 | + <record id="view_account_analytic_journal_tree" model="ir.ui.view"> |
4359 | + <field name="name">account.analytic.journal.tree</field> |
4360 | + <field name="model">account.analytic.journal</field> |
4361 | + <field name="arch" type="xml"> |
4362 | + <tree string="Analytic Journal"> |
4363 | + <field name="code"/> |
4364 | + <field name="name"/> |
4365 | + <field name="type"/> |
4366 | + </tree> |
4367 | + </field> |
4368 | + </record> |
4369 | + |
4370 | + <record id="view_analytic_journal_search" model="ir.ui.view"> |
4371 | + <field name="name">account.analytic.journal.search</field> |
4372 | + <field name="model">account.analytic.journal</field> |
4373 | + <field name="arch" type="xml"> |
4374 | + <search string="Analytic Journals"> |
4375 | + <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Analytic Journal"/> |
4376 | + <field name="type"/> |
4377 | + <group expand="0" string="Group By..."> |
4378 | + <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/> |
4379 | + </group> |
4380 | + </search> |
4381 | + </field> |
4382 | + </record> |
4383 | + |
4384 | + <record id="view_account_analytic_journal_form" model="ir.ui.view"> |
4385 | + <field name="name">account.analytic.journal.form</field> |
4386 | + <field name="model">account.analytic.journal</field> |
4387 | + <field name="arch" type="xml"> |
4388 | + <form string="Analytic Journal" version="7.0"> |
4389 | + <group col="4"> |
4390 | + <field name="name"/> |
4391 | + <field name="code"/> |
4392 | + <field name="type"/> |
4393 | + <field name="active"/> |
4394 | + <field name="company_id" groups="base.group_multi_company"/> |
4395 | + </group> |
4396 | + </form> |
4397 | + </field> |
4398 | + </record> |
4399 | + <record id="action_account_analytic_journal_form" model="ir.actions.act_window"> |
4400 | + <field name="name">Analytic Journals</field> |
4401 | + <field name="res_model">account.analytic.journal</field> |
4402 | + <field name="view_type">form</field> |
4403 | + <field name="view_mode">tree,form</field> |
4404 | + <field name="search_view_id" ref="view_analytic_journal_search" /> |
4405 | + </record> |
4406 | + |
4407 | + <record id="action_account_analytic_journal_open_form" model="ir.actions.act_window"> |
4408 | + <field name="name">Analytic Journal Items</field> |
4409 | + <field name="res_model">account.analytic.line</field> |
4410 | + <field name="view_type">form</field> |
4411 | + <field name="view_mode">tree,form</field> |
4412 | + </record> |
4413 | + |
4414 | + </data> |
4415 | +</openerp> |
4416 | |
4417 | === added directory 'analytic/project/wizard' |
4418 | === added file 'analytic/project/wizard/__init__.py' |
4419 | --- analytic/project/wizard/__init__.py 1970-01-01 00:00:00 +0000 |
4420 | +++ analytic/project/wizard/__init__.py 2014-04-28 09:41:45 +0000 |
4421 | @@ -0,0 +1,30 @@ |
4422 | +# -*- coding: utf-8 -*- |
4423 | +############################################################################## |
4424 | +# |
4425 | +# OpenERP, Open Source Management Solution |
4426 | +# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
4427 | +# |
4428 | +# This program is free software: you can redistribute it and/or modify |
4429 | +# it under the terms of the GNU Affero General Public License as |
4430 | +# published by the Free Software Foundation, either version 3 of the |
4431 | +# License, or (at your option) any later version. |
4432 | +# |
4433 | +# This program is distributed in the hope that it will be useful, |
4434 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
4435 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4436 | +# GNU Affero General Public License for more details. |
4437 | +# |
4438 | +# You should have received a copy of the GNU Affero General Public License |
4439 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
4440 | +# |
4441 | +############################################################################## |
4442 | + |
4443 | +import account_analytic_journal_report |
4444 | +import account_analytic_balance_report |
4445 | +import account_analytic_inverted_balance_report |
4446 | +import account_analytic_cost_ledger_report |
4447 | +import account_analytic_cost_ledger_for_journal_report |
4448 | +import project_account_analytic_line |
4449 | +import account_analytic_chart |
4450 | + |
4451 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4452 | |
4453 | === added file 'analytic/project/wizard/account_analytic_balance_report.py' |
4454 | --- analytic/project/wizard/account_analytic_balance_report.py 1970-01-01 00:00:00 +0000 |
4455 | +++ analytic/project/wizard/account_analytic_balance_report.py 2014-04-28 09:41:45 +0000 |
4456 | @@ -0,0 +1,57 @@ |
4457 | +# -*- coding: utf-8 -*- |
4458 | +############################################################################## |
4459 | +# |
4460 | +# OpenERP, Open Source Management Solution |
4461 | +# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
4462 | +# |
4463 | +# This program is free software: you can redistribute it and/or modify |
4464 | +# it under the terms of the GNU Affero General Public License as |
4465 | +# published by the Free Software Foundation, either version 3 of the |
4466 | +# License, or (at your option) any later version. |
4467 | +# |
4468 | +# This program is distributed in the hope that it will be useful, |
4469 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
4470 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4471 | +# GNU Affero General Public License for more details. |
4472 | +# |
4473 | +# You should have received a copy of the GNU Affero General Public License |
4474 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
4475 | +# |
4476 | +############################################################################## |
4477 | + |
4478 | +import time |
4479 | +from openerp.osv import fields, osv |
4480 | + |
4481 | + |
4482 | +class account_analytic_balance(osv.osv_memory): |
4483 | + _name = 'account.analytic.balance' |
4484 | + _description = 'Account Analytic Balance' |
4485 | + |
4486 | + _columns = { |
4487 | + 'date1': fields.date('Start of period', required=True), |
4488 | + 'date2': fields.date('End of period', required=True), |
4489 | + 'empty_acc': fields.boolean('Empty Accounts ? ', help='Check if you want to display Accounts with 0 balance too.'), |
4490 | + } |
4491 | + |
4492 | + _defaults = { |
4493 | + 'date1': lambda *a: time.strftime('%Y-01-01'), |
4494 | + 'date2': lambda *a: time.strftime('%Y-%m-%d') |
4495 | + } |
4496 | + |
4497 | + def check_report(self, cr, uid, ids, context=None): |
4498 | + if context is None: |
4499 | + context = {} |
4500 | + data = self.read(cr, uid, ids)[0] |
4501 | + datas = { |
4502 | + 'ids': context.get('active_ids', []), |
4503 | + 'model': 'account.analytic.account', |
4504 | + 'form': data |
4505 | + } |
4506 | + |
4507 | + datas['form']['active_ids'] = context.get('active_ids', False) |
4508 | + |
4509 | + return self.pool['report'].get_action(cr, uid, ids, 'account.report_analyticbalance', data=datas, context=context) |
4510 | + |
4511 | + |
4512 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4513 | + |
4514 | |
4515 | === added file 'analytic/project/wizard/account_analytic_balance_report_view.xml' |
4516 | --- analytic/project/wizard/account_analytic_balance_report_view.xml 1970-01-01 00:00:00 +0000 |
4517 | +++ analytic/project/wizard/account_analytic_balance_report_view.xml 2014-04-28 09:41:45 +0000 |
4518 | @@ -0,0 +1,46 @@ |
4519 | +<?xml version="1.0" encoding="utf-8"?> |
4520 | +<openerp> |
4521 | + <data> |
4522 | + |
4523 | + <record id="account_analytic_balance_view" model="ir.ui.view"> |
4524 | + <field name="name">Account Analytic Balance</field> |
4525 | + <field name="model">account.analytic.balance</field> |
4526 | + <field name="arch" type="xml"> |
4527 | + <form string="Select Period" version="7.0"> |
4528 | + <header> |
4529 | + <button name="check_report" string="Print" type="object" class="oe_highlight"/> |
4530 | + or |
4531 | + <button string="Cancel" class="oe_link" special="cancel"/> |
4532 | + </header> |
4533 | + <group col="4"> |
4534 | + <field name="date1"/> |
4535 | + <field name="date2"/> |
4536 | + <newline/> |
4537 | + <field name="empty_acc"/> |
4538 | + </group> |
4539 | + </form> |
4540 | + </field> |
4541 | + </record> |
4542 | + |
4543 | + <record id="action_account_analytic_balance" model="ir.actions.act_window"> |
4544 | + <field name="name">Analytic Balance</field> |
4545 | + <field name="type">ir.actions.act_window</field> |
4546 | + <field name="res_model">account.analytic.balance</field> |
4547 | + <field name="view_type">form</field> |
4548 | + <field name="view_mode">form</field> |
4549 | + <field name="view_id" ref="account_analytic_balance_view"/> |
4550 | + <field name="target">new</field> |
4551 | + </record> |
4552 | + |
4553 | + <record model="ir.values" id="account_analytic_balance_values"> |
4554 | + <field name="model_id" ref="analytic.model_account_analytic_account" /> |
4555 | + <field name="name">Account Analytic Balance</field> |
4556 | + <field name="key2">client_print_multi</field> |
4557 | + <field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_analytic_balance'))" /> |
4558 | + <field name="key">action</field> |
4559 | + <field name="model">account.analytic.account</field> |
4560 | + </record> |
4561 | + |
4562 | + </data> |
4563 | +</openerp> |
4564 | + |
4565 | |
4566 | === added file 'analytic/project/wizard/account_analytic_chart.py' |
4567 | --- analytic/project/wizard/account_analytic_chart.py 1970-01-01 00:00:00 +0000 |
4568 | +++ analytic/project/wizard/account_analytic_chart.py 2014-04-28 09:41:45 +0000 |
4569 | @@ -0,0 +1,49 @@ |
4570 | +# -*- coding: utf-8 -*- |
4571 | +############################################################################## |
4572 | +# |
4573 | +# OpenERP, Open Source Management Solution |
4574 | +# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
4575 | +# |
4576 | +# This program is free software: you can redistribute it and/or modify |
4577 | +# it under the terms of the GNU Affero General Public License as |
4578 | +# published by the Free Software Foundation, either version 3 of the |
4579 | +# License, or (at your option) any later version. |
4580 | +# |
4581 | +# This program is distributed in the hope that it will be useful, |
4582 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
4583 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4584 | +# GNU Affero General Public License for more details. |
4585 | +# |
4586 | +# You should have received a copy of the GNU Affero General Public License |
4587 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
4588 | +# |
4589 | +############################################################################## |
4590 | +from openerp.osv import fields, osv |
4591 | + |
4592 | +class account_analytic_chart(osv.osv_memory): |
4593 | + _name = 'account.analytic.chart' |
4594 | + _description = 'Account Analytic Chart' |
4595 | + |
4596 | + _columns = { |
4597 | + 'from_date': fields.date('From'), |
4598 | + 'to_date': fields.date('To'), |
4599 | + } |
4600 | + |
4601 | + def analytic_account_chart_open_window(self, cr, uid, ids, context=None): |
4602 | + mod_obj = self.pool.get('ir.model.data') |
4603 | + act_obj = self.pool.get('ir.actions.act_window') |
4604 | + result_context = {} |
4605 | + if context is None: |
4606 | + context = {} |
4607 | + result = mod_obj.get_object_reference(cr, uid, 'analytic', 'action_account_analytic_account_tree2') |
4608 | + id = result and result[1] or False |
4609 | + result = act_obj.read(cr, uid, [id], context=context)[0] |
4610 | + data = self.read(cr, uid, ids, [])[0] |
4611 | + if data['from_date']: |
4612 | + result_context.update({'from_date': data['from_date']}) |
4613 | + if data['to_date']: |
4614 | + result_context.update({'to_date': data['to_date']}) |
4615 | + result['context'] = str(result_context) |
4616 | + return result |
4617 | + |
4618 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4619 | |
4620 | === added file 'analytic/project/wizard/account_analytic_chart_view.xml' |
4621 | --- analytic/project/wizard/account_analytic_chart_view.xml 1970-01-01 00:00:00 +0000 |
4622 | +++ analytic/project/wizard/account_analytic_chart_view.xml 2014-04-28 09:41:45 +0000 |
4623 | @@ -0,0 +1,35 @@ |
4624 | +<?xml version="1.0" encoding="utf-8"?> |
4625 | +<openerp> |
4626 | + <data> |
4627 | + |
4628 | + <record id="account_analytic_chart_view" model="ir.ui.view"> |
4629 | + <field name="name">Chart of Analytic Accounts</field> |
4630 | + <field name="model">account.analytic.chart</field> |
4631 | + <field name="arch" type="xml"> |
4632 | + <form string="Analytic Account Charts" version="7.0"> |
4633 | + <group string="Select the Period for Analysis" col="4"> |
4634 | + <field name="from_date"/> |
4635 | + <field name="to_date"/> |
4636 | + <label string="(Keep empty to open the current situation)" colspan="4"/> |
4637 | + </group> |
4638 | + <footer> |
4639 | + <button name="analytic_account_chart_open_window" string="Open Charts" type="object" class="oe_highlight"/> |
4640 | + or |
4641 | + <button string="Cancel" class="oe_link" special="cancel"/> |
4642 | + </footer> |
4643 | + </form> |
4644 | + </field> |
4645 | + </record> |
4646 | + |
4647 | + <record id="action_account_analytic_chart" model="ir.actions.act_window"> |
4648 | + <field name="name">Chart of Analytic Accounts</field> |
4649 | + <field name="type">ir.actions.act_window</field> |
4650 | + <field name="res_model">account.analytic.chart</field> |
4651 | + <field name="view_type">form</field> |
4652 | + <field name="view_mode">form</field> |
4653 | + <field name="view_id" ref="account_analytic_chart_view"/> |
4654 | + <field name="target">new</field> |
4655 | + </record> |
4656 | + |
4657 | + </data> |
4658 | +</openerp> |
4659 | |
4660 | === added file 'analytic/project/wizard/account_analytic_cost_ledger_for_journal_report.py' |
4661 | --- analytic/project/wizard/account_analytic_cost_ledger_for_journal_report.py 1970-01-01 00:00:00 +0000 |
4662 | +++ analytic/project/wizard/account_analytic_cost_ledger_for_journal_report.py 2014-04-28 09:41:45 +0000 |
4663 | @@ -0,0 +1,54 @@ |
4664 | +# -*- coding: utf-8 -*- |
4665 | +############################################################################## |
4666 | +# |
4667 | +# OpenERP, Open Source Management Solution |
4668 | +# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
4669 | +# |
4670 | +# This program is free software: you can redistribute it and/or modify |
4671 | +# it under the terms of the GNU Affero General Public License as |
4672 | +# published by the Free Software Foundation, either version 3 of the |
4673 | +# License, or (at your option) any later version. |
4674 | +# |
4675 | +# This program is distributed in the hope that it will be useful, |
4676 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
4677 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4678 | +# GNU Affero General Public License for more details. |
4679 | +# |
4680 | +# You should have received a copy of the GNU Affero General Public License |
4681 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
4682 | +# |
4683 | +############################################################################## |
4684 | + |
4685 | +import time |
4686 | +from openerp.osv import fields, osv |
4687 | + |
4688 | + |
4689 | +class account_analytic_cost_ledger_journal_report(osv.osv_memory): |
4690 | + _name = 'account.analytic.cost.ledger.journal.report' |
4691 | + _description = 'Account Analytic Cost Ledger For Journal Report' |
4692 | + |
4693 | + _columns = { |
4694 | + 'date1': fields.date('Start of period', required=True), |
4695 | + 'date2': fields.date('End of period', required=True), |
4696 | + 'journal': fields.many2many('account.analytic.journal', 'ledger_journal_rel', 'ledger_id', 'journal_id', 'Journals'), |
4697 | + } |
4698 | + |
4699 | + _defaults = { |
4700 | + 'date1': lambda *a: time.strftime('%Y-01-01'), |
4701 | + 'date2': lambda *a: time.strftime('%Y-%m-%d') |
4702 | + } |
4703 | + |
4704 | + def check_report(self, cr, uid, ids, context=None): |
4705 | + if context is None: |
4706 | + context = {} |
4707 | + data = self.read(cr, uid, ids)[0] |
4708 | + datas = { |
4709 | + 'ids': context.get('active_ids', []), |
4710 | + 'model': 'account.analytic.account', |
4711 | + 'form': data |
4712 | + } |
4713 | + |
4714 | + datas['form']['active_ids'] = context.get('active_ids', False) |
4715 | + return self.pool['report'].get_action(cr, uid, ids, 'account.report_analyticcostledgerquantity', data=datas, context=context) |
4716 | + |
4717 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4718 | |
4719 | === added file 'analytic/project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml' |
4720 | --- analytic/project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml 1970-01-01 00:00:00 +0000 |
4721 | +++ analytic/project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml 2014-04-28 09:41:45 +0000 |
4722 | @@ -0,0 +1,44 @@ |
4723 | +<?xml version="1.0" encoding="utf-8"?> |
4724 | +<openerp> |
4725 | + <data> |
4726 | + |
4727 | + <record id="account_analytic_cost_ledger_journal_view" model="ir.ui.view"> |
4728 | + <field name="name">Account Analytic Cost Ledger Journal</field> |
4729 | + <field name="model">account.analytic.cost.ledger.journal.report</field> |
4730 | + <field name="arch" type="xml"> |
4731 | + <form string="Select period" version="7.0"> |
4732 | + <header> |
4733 | + <button name="check_report" string="Print" type="object" class="oe_highlight"/> |
4734 | + or |
4735 | + <button string="Cancel" class="oe_link" special="cancel"/> |
4736 | + </header> |
4737 | + <group string="Cost Ledger for Period" col="4"> |
4738 | + <field name="date1"/> |
4739 | + <field name="date2"/> |
4740 | + <field name="journal" colspan="4"/> |
4741 | + </group> |
4742 | + </form> |
4743 | + </field> |
4744 | + </record> |
4745 | + |
4746 | + <record id="action_account_analytic_cost_ledger_journal" model="ir.actions.act_window"> |
4747 | + <field name="name">Cost Ledger (Only quantities)</field> |
4748 | + <field name="type">ir.actions.act_window</field> |
4749 | + <field name="res_model">account.analytic.cost.ledger.journal.report</field> |
4750 | + <field name="view_type">form</field> |
4751 | + <field name="view_mode">form</field> |
4752 | + <field name="view_id" ref="account_analytic_cost_ledger_journal_view"/> |
4753 | + <field name="target">new</field> |
4754 | + </record> |
4755 | + |
4756 | + <record model="ir.values" id="account_analytic_cost_ledger_journal_values"> |
4757 | + <field name="model_id" ref="analytic.model_account_analytic_account" /> |
4758 | + <field name="name">Account Analytic Cost Ledger Journal</field> |
4759 | + <field name="key2">client_print_multi</field> |
4760 | + <field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_analytic_cost_ledger_journal'))" /> |
4761 | + <field name="key">action</field> |
4762 | + <field name="model">account.analytic.account</field> |
4763 | + </record> |
4764 | + |
4765 | + </data> |
4766 | +</openerp> |
4767 | |
4768 | === added file 'analytic/project/wizard/account_analytic_cost_ledger_report.py' |
4769 | --- analytic/project/wizard/account_analytic_cost_ledger_report.py 1970-01-01 00:00:00 +0000 |
4770 | +++ analytic/project/wizard/account_analytic_cost_ledger_report.py 2014-04-28 09:41:45 +0000 |
4771 | @@ -0,0 +1,54 @@ |
4772 | +# -*- coding: utf-8 -*- |
4773 | +############################################################################## |
4774 | +# |
4775 | +# OpenERP, Open Source Management Solution |
4776 | +# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
4777 | +# |
4778 | +# This program is free software: you can redistribute it and/or modify |
4779 | +# it under the terms of the GNU Affero General Public License as |
4780 | +# published by the Free Software Foundation, either version 3 of the |
4781 | +# License, or (at your option) any later version. |
4782 | +# |
4783 | +# This program is distributed in the hope that it will be useful, |
4784 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
4785 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4786 | +# GNU Affero General Public License for more details. |
4787 | +# |
4788 | +# You should have received a copy of the GNU Affero General Public License |
4789 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
4790 | +# |
4791 | +############################################################################## |
4792 | + |
4793 | +import time |
4794 | +from openerp.osv import osv, fields |
4795 | + |
4796 | + |
4797 | +class account_analytic_cost_ledger(osv.osv_memory): |
4798 | + _name = 'account.analytic.cost.ledger' |
4799 | + _description = 'Account Analytic Cost Ledger' |
4800 | + |
4801 | + _columns = { |
4802 | + 'date1': fields.date('Start of period', required=True), |
4803 | + 'date2': fields.date('End of period', required=True), |
4804 | + } |
4805 | + |
4806 | + _defaults = { |
4807 | + 'date1': lambda *a: time.strftime('%Y-01-01'), |
4808 | + 'date2': lambda *a: time.strftime('%Y-%m-%d') |
4809 | + } |
4810 | + |
4811 | + def check_report(self, cr, uid, ids, context=None): |
4812 | + if context is None: |
4813 | + context = {} |
4814 | + data = self.read(cr, uid, ids)[0] |
4815 | + datas = { |
4816 | + 'ids': context.get('active_ids',[]), |
4817 | + 'model': 'account.analytic.account', |
4818 | + 'form': data |
4819 | + } |
4820 | + |
4821 | + datas['form']['active_ids'] = context.get('active_ids', False) |
4822 | + |
4823 | + return self.pool['report'].get_action(cr, uid, ids, 'account.report_analyticcostledger', data=datas, context=context) |
4824 | + |
4825 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4826 | |
4827 | === added file 'analytic/project/wizard/account_analytic_cost_ledger_view.xml' |
4828 | --- analytic/project/wizard/account_analytic_cost_ledger_view.xml 1970-01-01 00:00:00 +0000 |
4829 | +++ analytic/project/wizard/account_analytic_cost_ledger_view.xml 2014-04-28 09:41:45 +0000 |
4830 | @@ -0,0 +1,43 @@ |
4831 | +<?xml version="1.0" encoding="utf-8"?> |
4832 | +<openerp> |
4833 | + <data> |
4834 | + |
4835 | + <record id="account_analytic_cost_view" model="ir.ui.view"> |
4836 | + <field name="name">Account Analytic Check</field> |
4837 | + <field name="model">account.analytic.cost.ledger</field> |
4838 | + <field name="arch" type="xml"> |
4839 | + <form string="Select Period" version="7.0"> |
4840 | + <header> |
4841 | + <button name="check_report" string="Print" type="object" class="oe_highlight"/> |
4842 | + or |
4843 | + <button string="Cancel" class="oe_link" special="cancel"/> |
4844 | + </header> |
4845 | + <group col="4"> |
4846 | + <field name="date1"/> |
4847 | + <field name="date2"/> |
4848 | + </group> |
4849 | + </form> |
4850 | + </field> |
4851 | + </record> |
4852 | + |
4853 | + <record id="action_account_analytic_cost" model="ir.actions.act_window"> |
4854 | + <field name="name">Cost Ledger</field> |
4855 | + <field name="type">ir.actions.act_window</field> |
4856 | + <field name="res_model">account.analytic.cost.ledger</field> |
4857 | + <field name="view_type">form</field> |
4858 | + <field name="view_mode">form</field> |
4859 | + <field name="view_id" ref="account_analytic_cost_view"/> |
4860 | + <field name="target">new</field> |
4861 | + </record> |
4862 | + |
4863 | + <record model="ir.values" id="account_analytic_cost_values"> |
4864 | + <field name="model_id" ref="analytic.model_account_analytic_account" /> |
4865 | + <field name="name">Account Analytic Cost</field> |
4866 | + <field name="key2">client_print_multi</field> |
4867 | + <field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_analytic_cost'))" /> |
4868 | + <field name="key">action</field> |
4869 | + <field name="model">account.analytic.account</field> |
4870 | + </record> |
4871 | + |
4872 | + </data> |
4873 | +</openerp> |
4874 | |
4875 | === added file 'analytic/project/wizard/account_analytic_inverted_balance_report.py' |
4876 | --- analytic/project/wizard/account_analytic_inverted_balance_report.py 1970-01-01 00:00:00 +0000 |
4877 | +++ analytic/project/wizard/account_analytic_inverted_balance_report.py 2014-04-28 09:41:45 +0000 |
4878 | @@ -0,0 +1,52 @@ |
4879 | +# -*- coding: utf-8 -*- |
4880 | +############################################################################## |
4881 | +# |
4882 | +# OpenERP, Open Source Management Solution |
4883 | +# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
4884 | +# |
4885 | +# This program is free software: you can redistribute it and/or modify |
4886 | +# it under the terms of the GNU Affero General Public License as |
4887 | +# published by the Free Software Foundation, either version 3 of the |
4888 | +# License, or (at your option) any later version. |
4889 | +# |
4890 | +# This program is distributed in the hope that it will be useful, |
4891 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
4892 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4893 | +# GNU Affero General Public License for more details. |
4894 | +# |
4895 | +# You should have received a copy of the GNU Affero General Public License |
4896 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
4897 | +# |
4898 | +############################################################################## |
4899 | + |
4900 | +import time |
4901 | +from openerp.osv import fields, osv |
4902 | + |
4903 | + |
4904 | +class account_analytic_inverted_balance(osv.osv_memory): |
4905 | + _name = 'account.analytic.inverted.balance' |
4906 | + _description = 'Account Analytic Inverted Balance' |
4907 | + |
4908 | + _columns = { |
4909 | + 'date1': fields.date('Start of period', required=True), |
4910 | + 'date2': fields.date('End of period', required=True), |
4911 | + } |
4912 | + |
4913 | + _defaults = { |
4914 | + 'date1': lambda *a: time.strftime('%Y-01-01'), |
4915 | + 'date2': lambda *a: time.strftime('%Y-%m-%d') |
4916 | + } |
4917 | + |
4918 | + def check_report(self, cr, uid, ids, context=None): |
4919 | + if context is None: |
4920 | + context = {} |
4921 | + data = self.read(cr, uid, ids)[0] |
4922 | + datas = { |
4923 | + 'ids': context.get('active_ids', []), |
4924 | + 'model': 'account.analytic.account', |
4925 | + 'form': data |
4926 | + } |
4927 | + datas['form']['active_ids'] = context.get('active_ids', False) |
4928 | + return self.pool['report'].get_action(cr, uid, ids, 'account.report_invertedanalyticbalance', data=datas, context=context) |
4929 | + |
4930 | +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: |
4931 | |
4932 | === added file 'analytic/project/wizard/account_analytic_inverted_balance_report.xml' |
4933 | --- analytic/project/wizard/account_analytic_inverted_balance_report.xml 1970-01-01 00:00:00 +0000 |
4934 | +++ analytic/project/wizard/account_analytic_inverted_balance_report.xml 2014-04-28 09:41:45 +0000 |
4935 | @@ -0,0 +1,43 @@ |
4936 | +<?xml version="1.0" encoding="utf-8"?> |
4937 | +<openerp> |
4938 | + <data> |
4939 | + |
4940 | + <record id="account_analytic_invert_balance_view" model="ir.ui.view"> |
4941 | + <field name="name">Account Analytic Inverted Balance</field> |
4942 | + <field name="model">account.analytic.inverted.balance</field> |
4943 | + <field name="arch" type="xml"> |
4944 | + <form string="Select Period" version="7.0"> |
4945 | + <header> |
4946 | + <button name="check_report" string="Print" type="object" class="oe_highlight"/> |
4947 | + or |
4948 | + <button string="Cancel" class="oe_link" special="cancel"/> |
4949 | + </header> |
4950 | + <group col="4"> |
4951 | + <field name="date1"/> |
4952 | + <field name="date2"/> |
4953 | + </group> |
4954 | + </form> |
4955 | + </field> |
4956 | + </record> |
4957 | + |
4958 | + <record id="action_account_analytic_invert_balance" model="ir.actions.act_window"> |
4959 | + <field name="name">Inverted Analytic Balance</field> |
4960 | + <field name="type">ir.actions.act_window</field> |
4961 | + <field name="res_model">account.analytic.inverted.balance</field> |
4962 | + <field name="view_type">form</field> |
4963 | + <field name="view_mode">form</field> |
4964 | + <field name="view_id" ref="account_analytic_invert_balance_view"/> |
4965 | + <field name="target">new</field> |
4966 | + </record> |
4967 | + |
4968 | + <record model="ir.values" id="account_analytic_invert_balance_values"> |
4969 | + <field name="model_id" ref="analytic.model_account_analytic_account" /> |
4970 | + <field name="name">Account Analytic Inverted Balance</field> |
4971 | + <field name="key2">client_print_multi</field> |
4972 | + <field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_analytic_invert_balance'))" /> |
4973 | + <field name="key">action</field> |
4974 | + <field name="model">account.analytic.account</field> |
4975 | + </record> |
4976 | + |
4977 | + </data> |
4978 | +</openerp> |
4979 | |
4980 | === added file 'analytic/project/wizard/account_analytic_journal_report.py' |
4981 | --- analytic/project/wizard/account_analytic_journal_report.py 1970-01-01 00:00:00 +0000 |
4982 | +++ analytic/project/wizard/account_analytic_journal_report.py 2014-04-28 09:41:45 +0000 |
4983 | @@ -0,0 +1,75 @@ |
4984 | +# -*- coding: utf-8 -*- |
4985 | +############################################################################## |
4986 | +# |
4987 | +# OpenERP, Open Source Management Solution |
4988 | +# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). |
4989 | +# |
4990 | +# This program is free software: you can redistribute it and/or modify |
4991 | +# it under the terms of the GNU Affero General Public License as |
4992 | +# published by the Free Software Foundation, either version 3 of the |
4993 | +# License, or (at your option) any later version. |
4994 | +# |
4995 | +# This program is distributed in the hope that it will be useful, |
4996 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
4997 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
4998 | +# GNU Affero General Public License for more details. |
4999 | +# |
5000 | +# You should have received a copy of the GNU Affero General Public License |
Hello,
Please use commit messages that explain why you do a change; improved code is not a usefull commit message and won't help developers to undersatnd your code. Thanks !
Thibault.