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