Merge lp:~openerp-dev/openobject-addons/trunk-account-project-move-cod into lp:openobject-addons

Proposed by Thibault Delavallée (OpenERP)
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
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+214206@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Thibault Delavallée (OpenERP) (tde-openerp) wrote :

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.

9289. By Chirag Dodiya(OpenERP)

[IMP]Improved code

Revision history for this message
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

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account/__init__.py'
--- account/__init__.py 2012-11-29 22:26:45 +0000
+++ account/__init__.py 2014-04-28 09:41:45 +0000
@@ -22,7 +22,6 @@
22import partner22import partner
23import account23import account
24import installer24import installer
25import project
26import account_invoice25import account_invoice
27import account_bank_statement26import account_bank_statement
28import account_bank27import account_bank
@@ -38,5 +37,6 @@
38import res_currency37import res_currency
39import edi38import edi
40import res_config39import res_config
40import account_analytic
4141
42# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:42# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
4343
=== modified file 'account/__openerp__.py'
--- account/__openerp__.py 2014-04-03 09:18:18 +0000
+++ account/__openerp__.py 2014-04-28 09:41:45 +0000
@@ -96,24 +96,16 @@
96 'wizard/account_automatic_reconcile_view.xml',96 'wizard/account_automatic_reconcile_view.xml',
97 'wizard/account_financial_report_view.xml',97 'wizard/account_financial_report_view.xml',
98 'wizard/pos_box.xml',98 'wizard/pos_box.xml',
99 'project/wizard/project_account_analytic_line_view.xml',
100 'account_end_fy.xml',99 'account_end_fy.xml',
101 'account_invoice_view.xml',100 'account_invoice_view.xml',
102 'data/account_data.xml',101 'data/account_data.xml',
103 'data/data_account_type.xml',102 'data/data_account_type.xml',
104 'data/configurable_account_chart.xml',103 'data/configurable_account_chart.xml',
105 'account_invoice_workflow.xml',104 'account_invoice_workflow.xml',
106 'project/project_view.xml',
107 'project/project_report.xml',
108 'project/wizard/account_analytic_balance_report_view.xml',
109 'project/wizard/account_analytic_cost_ledger_view.xml',
110 'project/wizard/account_analytic_inverted_balance_report.xml',
111 'project/wizard/account_analytic_journal_report_view.xml',
112 'project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml',
113 'project/wizard/account_analytic_chart_view.xml',
114 'partner_view.xml',105 'partner_view.xml',
115 'product_view.xml',106 'product_view.xml',
116 'account_assert_test.xml',107 'account_assert_test.xml',
108 'account_analytic_view.xml',
117 'process/statement_process.xml',109 'process/statement_process.xml',
118 'process/customer_invoice_process.xml',110 'process/customer_invoice_process.xml',
119 'process/supplier_invoice_process.xml',111 'process/supplier_invoice_process.xml',
@@ -124,7 +116,6 @@
124 'account_bank_view.xml',116 'account_bank_view.xml',
125 'res_config_view.xml',117 'res_config_view.xml',
126 'account_pre_install.yml',118 'account_pre_install.yml',
127
128 'views/report_vat.xml',119 'views/report_vat.xml',
129 'views/report_invoice.xml',120 'views/report_invoice.xml',
130 'views/report_trialbalance.xml',121 'views/report_trialbalance.xml',
@@ -139,11 +130,6 @@
139 'views/report_partnerledgerother.xml',130 'views/report_partnerledgerother.xml',
140 'views/report_financial.xml',131 'views/report_financial.xml',
141 'views/report_generalledger.xml',132 'views/report_generalledger.xml',
142 'project/views/report_analyticbalance.xml',
143 'project/views/report_analyticjournal.xml',
144 'project/views/report_analyticcostledgerquantity.xml',
145 'project/views/report_analyticcostledger.xml',
146 'project/views/report_invertedanalyticbalance.xml',
147 ],133 ],
148 'js': [134 'js': [
149 'static/src/js/account_move_reconciliation.js',135 'static/src/js/account_move_reconciliation.js',
@@ -160,8 +146,6 @@
160 ],146 ],
161 'demo': [147 'demo': [
162 'demo/account_demo.xml',148 'demo/account_demo.xml',
163 'project/project_demo.xml',
164 'project/analytic_account_demo.xml',
165 'demo/account_minimal.xml',149 'demo/account_minimal.xml',
166 'demo/account_invoice_demo.xml',150 'demo/account_invoice_demo.xml',
167 'account_unit_test.xml',151 'account_unit_test.xml',
168152
=== added file 'account/account_analytic.py'
--- account/account_analytic.py 1970-01-01 00:00:00 +0000
+++ account/account_analytic.py 2014-04-28 09:41:45 +0000
@@ -0,0 +1,37 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22from openerp.osv import fields, osv
23
24
25class account_journal(osv.osv):
26 _inherit="account.journal"
27
28 _columns = {
29 'analytic_journal_id':fields.many2one('account.analytic.journal','Analytic Journal', help="Journal for analytic entries"),
30 }
31
32class account_analytic_journal(osv.osv):
33 _inherit="account.analytic.journal"
34
35 _columns = {
36 'line_ids': fields.one2many('account.analytic.line', 'journal_id', 'Lines'),
37 }
038
=== modified file 'account/account_analytic_line.py'
--- account/account_analytic_line.py 2013-10-27 12:31:04 +0000
+++ account/account_analytic_line.py 2014-04-28 09:41:45 +0000
@@ -29,13 +29,14 @@
29 _columns = {29 _columns = {
30 'product_uom_id': fields.many2one('product.uom', 'Unit of Measure'),30 'product_uom_id': fields.many2one('product.uom', 'Unit of Measure'),
31 'product_id': fields.many2one('product.product', 'Product'),31 'product_id': fields.many2one('product.product', 'Product'),
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'),
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),
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),
35 'code': fields.char('Code', size=8),35 'code': fields.char('Code', size=8),
36 'ref': fields.char('Ref.', size=64),36 'ref': fields.char('Ref.', size=64),
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),
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),
39 'partner_id': fields.related('account_id', 'partner_id', type='many2one', relation='res.partner', string='Partner', store=True),
39 }40 }
4041
41 _defaults = {42 _defaults = {
4243
=== added file 'account/account_analytic_view.xml'
--- account/account_analytic_view.xml 1970-01-01 00:00:00 +0000
+++ account/account_analytic_view.xml 2014-04-28 09:41:45 +0000
@@ -0,0 +1,159 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4 <record id="view_account_analytic_line_form_1" model="ir.ui.view">
5 <field name="name">account.analytic.line.form.1</field>
6 <field name="model">account.analytic.line</field>
7 <field name="inherit_id" ref="analytic.view_account_analytic_line_form"/>
8 <field name="arch" type="xml">
9 <xpath expr="//field[@name='account_id']" position="after">
10 <field name="journal_id"/>
11 </xpath>
12 <xpath expr="//field[@name='date']" position="after">
13 <field name="product_id" string="Product"/>
14 <field name="ref"/>
15 </xpath>
16 <xpath expr="//field[@name='company_id']" position="after">
17 <field name="partner_id"/>
18 </xpath>
19 <xpath expr="//field[@name='amount']" position="after">
20 <label for="amount_currency" groups="base.group_multi_currency"/>
21 <div groups="base.group_multi_currency">
22 <field name="amount_currency" class="oe_inline"/>
23 <field name="currency_id" class="oe_inline"/>
24 </div>
25 </xpath>
26 <xpath expr="//group[@string='Product Information']" position="replace">
27 <group string="Product Information">
28 <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
29 <label for="unit_amount"/>
30 <div>
31 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
32 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
33 </div>
34 </group>
35 </xpath>
36 <xpath expr="//group[@string='Product Information']" position="after">
37 <group string="General Accounting">
38 <field name="general_account_id"/>
39 <field name="move_id" readonly="1"/>
40 </group>
41 </xpath>
42 </field>
43 </record>
44 <record id="view_account_analytic_line_tree_1" model="ir.ui.view">
45 <field name="name">account.analytic.line.tree.1</field>
46 <field name="model">account.analytic.line</field>
47 <field name="inherit_id" ref="analytic.view_account_analytic_line_tree"/>
48 <field name="arch" type="xml">
49 <xpath expr="//field[@name='date']" position="after">
50 <field name="ref" invisible="context.get('to_invoice', False)"/>
51 </xpath>
52 <xpath expr="//field[@name='user_id']" position="after">
53 <field name="partner_id"/>
54 <field name="journal_id" invisible="context.get('to_invoice', False)"/>
55 </xpath>
56 <xpath expr="//field[@name='amount']" position="after">
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)"/>
58 </xpath>
59 <xpath expr="//field[@name='unit_amount']" position="after">
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)"/>
61 </xpath>
62 <xpath expr="//field[@name='account_id']" position="after">
63 <field name="general_account_id" invisible="context.get('to_invoice', False)"/>
64 </xpath>
65 </field>
66 </record>
67 <record id="view_account_analytic_line_filter_1" model="ir.ui.view">
68 <field name="name">account.analytic.line.select.1</field>
69 <field name="model">account.analytic.line</field>
70 <field name="inherit_id" ref="analytic.view_account_analytic_line_filter"/>
71 <field name="arch" type="xml">
72 <xpath expr="//field[@name='date']" position="after">
73 <field name="product_id"/>
74 <filter name="sales" string="Sales" domain="[('journal_id.type','=','sale')]" help="Analytic Journal Items related to a sale journal."/>
75 <filter name="purchases" string="Purchases" domain="[('journal_id.type','=','purchase')]" help="Analytic Journal Items related to a purchase journal."/>
76 <filter name="others" string="Others" domain="[('journal_id.type','in',('cash','general','situation'))]"/>
77 </xpath>
78 <xpath expr="//field[@name='account_id']" position="after">
79 <field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
80 </xpath>
81 <xpath expr="//filter[@string='Analytic Account']" position="after">
82 <filter string="Financial Account" context="{'group_by':'general_account_id'}"/>
83 <filter string="Journal" context="{'group_by':'journal_id'}" name="group_journal"/>
84 </xpath>
85 <xpath expr="//filter[@string='User']" position="before">
86 <filter string="Product" context="{'group_by':'product_id'}"/>
87 <filter string="Partner" context="{'group_by':'partner_id'}"/>
88 </xpath>
89 </field>
90 </record>
91 <record id="account_analytic_line_extended_form_1" model="ir.ui.view">
92 <field name="name">account.analytic.line.extended_form.1</field>
93 <field name="model">account.analytic.line</field>
94 <field name="inherit_id" ref="analytic.account_analytic_line_extended_form"/>
95 <field name="arch" type="xml">
96 <xpath expr="//field[@name='account_id']" position="after">
97 <field name="journal_id"/>
98 </xpath>
99 <xpath expr="//field[@name='amount']" position="after">
100 <label for="amount_currency" groups="base.group_multi_currency"/>
101 <div groups="base.group_multi_currency">
102 <field name="amount_currency" class="oe_inline"/>
103 <field name="currency_id" class="oe_inline"/>
104 </div>
105 <field invisible="1" name="general_account_id"/>
106 </xpath>
107 <xpath expr="//group[@string='Product Information']" position="after">
108 <group string="General Accounting">
109 <field name="general_account_id"/>
110 <field name="move_id" readonly="1"/>
111 </group>
112 </xpath>
113 </field>
114 </record>
115
116 <menuitem groups="analytic.group_analytic_accounting"
117 action="analytic.action_account_analytic_journal_open_form"
118 id="account_analytic_journal_entries"
119 parent="menu_finance_entries"/>
120
121 <record id="view_account_journal_1" model="ir.ui.view">
122 <field name="name">account.journal.form.1</field>
123 <field name="model">account.journal</field>
124 <field name="inherit_id" ref="account.view_account_journal_form"/>
125 <field name="arch" type="xml">
126 <field name="type" position="after">
127 <field name="analytic_journal_id" groups="analytic.group_analytic_accounting"/>
128 </field>
129 </field>
130 </record>
131
132 <record model="ir.values" id="account_analytic_journal_values">
133 <field name="model_id" ref="account.model_account_analytic_journal" />
134 <field name="name">Account Analytic Journal</field>
135 <field name="key2">client_print_multi</field>
136 <field name="value" eval="'ir.actions.act_window,' + str(ref('analytic.action_account_analytic_journal'))" />
137 <field name="key">action</field>
138 <field name="model">account.analytic.journal</field>
139 </record>
140 <menuitem groups="analytic.group_analytic_accounting" id="next_id_40"
141 name="Analytic" parent="account.menu_finance_generic_reporting"
142 sequence="4"/>
143 <menuitem groups="analytic.group_analytic_accounting"
144 action="analytic.action_account_analytic_journal"
145 id="account_analytic_journal_print" parent="account.next_id_40"/>
146 <menuitem
147 name="Chart of Analytic Accounts"
148 parent="account.menu_finance_charts"
149 action="analytic.action_account_analytic_chart"
150 id="menu_action_analytic_account_tree2"
151 icon="STOCK_INDENT"
152 groups="analytic.group_analytic_accounting"/>
153 <menuitem action="analytic.action_account_analytic_account_form" id="account_analytic_def_account"
154 parent="menu_analytic_accounting"
155 groups="analytic.group_analytic_accounting"/>
156
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"/>
158 </data>
159</openerp>
0160
=== modified file 'account/demo/account_minimal.xml'
--- account/demo/account_minimal.xml 2013-10-27 12:31:04 +0000
+++ account/demo/account_minimal.xml 2014-04-28 09:41:45 +0000
@@ -315,7 +315,7 @@
315 <field name="sequence_id" ref="sequence_sale_journal"/>315 <field name="sequence_id" ref="sequence_sale_journal"/>
316 <field name="default_credit_account_id" ref="a_sale"/>316 <field name="default_credit_account_id" ref="a_sale"/>
317 <field name="default_debit_account_id" ref="a_sale"/>317 <field name="default_debit_account_id" ref="a_sale"/>
318 <field name="analytic_journal_id" ref="cose_journal_sale"/>318 <field name="analytic_journal_id" ref="analytic.cose_journal_sale"/>
319 <field name="user_id" ref="base.user_root"/>319 <field name="user_id" ref="base.user_root"/>
320 </record>320 </record>
321 <record id="refund_sales_journal" model="account.journal">321 <record id="refund_sales_journal" model="account.journal">
@@ -325,7 +325,7 @@
325 <field name="sequence_id" ref="sequence_refund_sales_journal"/>325 <field name="sequence_id" ref="sequence_refund_sales_journal"/>
326 <field name="default_credit_account_id" ref="a_sale"/>326 <field name="default_credit_account_id" ref="a_sale"/>
327 <field name="default_debit_account_id" ref="a_sale"/>327 <field name="default_debit_account_id" ref="a_sale"/>
328 <field name="analytic_journal_id" ref="cose_journal_sale"/>328 <field name="analytic_journal_id" ref="analytic.cose_journal_sale"/>
329 <field name="user_id" ref="base.user_root"/>329 <field name="user_id" ref="base.user_root"/>
330 </record>330 </record>
331331
@@ -357,7 +357,7 @@
357 <field name="sequence_id" ref="sequence_bank_journal"/>357 <field name="sequence_id" ref="sequence_bank_journal"/>
358 <field name="default_debit_account_id" ref="bnk"/>358 <field name="default_debit_account_id" ref="bnk"/>
359 <field name="default_credit_account_id" ref="bnk"/>359 <field name="default_credit_account_id" ref="bnk"/>
360 <field name="analytic_journal_id" ref="sit"/>360 <field name="analytic_journal_id" ref="analytic.sit"/>
361 <field name="user_id" ref="base.user_root"/>361 <field name="user_id" ref="base.user_root"/>
362 </record>362 </record>
363 <record id="check_journal" model="account.journal">363 <record id="check_journal" model="account.journal">
@@ -367,7 +367,7 @@
367 <field name="sequence_id" ref="sequence_check_journal"/>367 <field name="sequence_id" ref="sequence_check_journal"/>
368 <field name="default_debit_account_id" ref="cash"/>368 <field name="default_debit_account_id" ref="cash"/>
369 <field name="default_credit_account_id" ref="cash"/>369 <field name="default_credit_account_id" ref="cash"/>
370 <field name="analytic_journal_id" ref="sit"/>370 <field name="analytic_journal_id" ref="analytic.sit"/>
371 <field name="user_id" ref="base.user_root"/>371 <field name="user_id" ref="base.user_root"/>
372 </record>372 </record>
373 <record id="cash_journal" model="account.journal">373 <record id="cash_journal" model="account.journal">
@@ -387,7 +387,7 @@
387 <field name="sequence_id" ref="sequence_cash_journal"/>387 <field name="sequence_id" ref="sequence_cash_journal"/>
388 <field name="default_debit_account_id" ref="cash"/>388 <field name="default_debit_account_id" ref="cash"/>
389 <field name="default_credit_account_id" ref="cash"/>389 <field name="default_credit_account_id" ref="cash"/>
390 <field name="analytic_journal_id" ref="sit"/>390 <field name="analytic_journal_id" ref="analytic.sit"/>
391 <field name="user_id" ref="base.user_root"/>391 <field name="user_id" ref="base.user_root"/>
392 </record>392 </record>
393 <record id="miscellaneous_journal" model="account.journal">393 <record id="miscellaneous_journal" model="account.journal">
@@ -395,7 +395,7 @@
395 <field name="code">TMIS</field>395 <field name="code">TMIS</field>
396 <field name="type">general</field>396 <field name="type">general</field>
397 <field name="sequence_id" ref="sequence_miscellaneous_journal"/>397 <field name="sequence_id" ref="sequence_miscellaneous_journal"/>
398 <field name="analytic_journal_id" ref="sit"/>398 <field name="analytic_journal_id" ref="analytic.sit"/>
399 <field name="user_id" ref="base.user_root"/>399 <field name="user_id" ref="base.user_root"/>
400 </record>400 </record>
401 <record id="opening_journal" model="account.journal">401 <record id="opening_journal" model="account.journal">
402402
=== modified file 'account/partner_view.xml'
--- account/partner_view.xml 2013-10-27 12:31:04 +0000
+++ account/partner_view.xml 2014-04-28 09:41:45 +0000
@@ -54,8 +54,8 @@
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>
55 <field name="name">Contracts/Analytic Accounts</field>55 <field name="name">Contracts/Analytic Accounts</field>
56 <field name="res_model">account.analytic.account</field>56 <field name="res_model">account.analytic.account</field>
57 <field name="view_id" ref="view_account_analytic_account_tree"/>57 <field name="view_id" ref="analytic.view_account_analytic_account_tree"/>
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"/>
59 </record>59 </record>
60 <record model="ir.ui.view" id="partner_view_buttons">60 <record model="ir.ui.view" id="partner_view_buttons">
61 <field name="name">partner.view.buttons</field>61 <field name="name">partner.view.buttons</field>
6262
=== removed directory 'account/project'
=== removed file 'account/project/__init__.py'
--- account/project/__init__.py 2011-01-14 00:11:01 +0000
+++ account/project/__init__.py 1970-01-01 00:00:00 +0000
@@ -1,28 +0,0 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import project
23import report
24import wizard
25
26
27# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
28
290
=== removed file 'account/project/analytic_account_demo.xml'
--- account/project/analytic_account_demo.xml 2012-12-21 16:48:08 +0000
+++ account/project/analytic_account_demo.xml 1970-01-01 00:00:00 +0000
@@ -1,235 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data noupdate="1">
4 <record id="analytic_root" model="account.analytic.account">
5 <field name="name" model="res.company" use="name" search="[]"/>
6 </record>
7 <record id="analytic_absences" model="account.analytic.account">
8 <field name="name">Leaves</field>
9 <field name="type">view</field>
10 <field name="parent_id" ref="analytic_root"/>
11 </record>
12 <record id="analytic_internal" model="account.analytic.account">
13 <field name="name">Internal</field>
14 <field name="type">view</field>
15 <field name="parent_id" ref="analytic_root"/>
16 </record>
17 <record id="analytic_our_super_product" model="account.analytic.account">
18 <field name="name">Our Super Product</field>
19 <field name="state">open</field>
20 <field name="type">view</field>
21 <field name="parent_id" ref="analytic_root"/>
22 </record>
23 <record id="analytic_project_1" model="account.analytic.account">
24 <field name="name">Project 1</field>
25 <field name="type">view</field>
26 <field name="parent_id" ref="analytic_root"/>
27 </record>
28 <record id="analytic_project_2" model="account.analytic.account">
29 <field name="name">Project 2</field>
30 <field name="type">view</field>
31 <field name="parent_id" ref="analytic_root"/>
32 </record>
33 <record id="analytic_journal_trainings" model="account.analytic.account">
34 <field name="name">Training</field>
35 <field name="type">view</field>
36 <field name="parent_id" ref="analytic_internal"/>
37 </record>
38 <record id="analytic_in_house" model="account.analytic.account">
39 <field name="name">In House</field>
40 <field name="type">normal</field>
41 <field name="parent_id" ref="analytic_journal_trainings"/>
42 </record>
43 <record id="analytic_online" model="account.analytic.account">
44 <field name="name">Online</field>
45 <field name="type">normal</field>
46 <field name="parent_id" ref="analytic_journal_trainings"/>
47 </record>
48 <record id="analytic_support" model="account.analytic.account">
49 <field name="name">Support</field>
50 <field name="type">view</field>
51 <field name="parent_id" ref="analytic_our_super_product"/>
52 </record>
53 <record id="analytic_partners" model="account.analytic.account">
54 <field name="name">Partners</field>
55 <field name="type">view</field>
56 <field name="parent_id" ref="analytic_support"/>
57 </record>
58 <record id="analytic_customers" model="account.analytic.account">
59 <field name="name">Customers</field>
60 <field name="type">view</field>
61 <field name="parent_id" ref="analytic_support"/>
62 </record>
63 <record id="analytic_support_internal" model="account.analytic.account">
64 <field name="name">Internal</field>
65 <field name="type">contract</field>
66 <field name="parent_id" ref="analytic_support"/>
67 </record>
68 <record id="analytic_integration" model="account.analytic.account">
69 <field name="name">Integration</field>
70 <field name="type">view</field>
71 <field name="parent_id" ref="analytic_our_super_product"/>
72 </record>
73 <record id="analytic_consultancy" model="account.analytic.account">
74 <field name="name">Consultancy</field>
75 <field name="type">contract</field>
76 <field name="parent_id" ref="analytic_our_super_product"/>
77 </record>
78 <record id="analytic_super_product_trainings" model="account.analytic.account">
79 <field name="name">Training</field>
80 <field name="type">contract</field>
81 <field name="parent_id" ref="analytic_our_super_product"/>
82 </record>
83 <record id="analytic_seagate_p1" model="account.analytic.account">
84 <field name="name">Seagate P1</field>
85 <field name="parent_id" ref="analytic_integration"/>
86 <field name="type">normal</field>
87 <field name="state">open</field>
88 <field name="partner_id" ref="base.res_partner_19"/>
89 </record>
90 <record id="analytic_seagate_p2" model="account.analytic.account">
91 <field name="name">Seagate P2</field>
92 <field name="type">normal</field>
93 <field name="parent_id" ref="analytic_integration"/>
94 <field name="state">open</field>
95 <field name="partner_id" ref="base.res_partner_19"/>
96 </record>
97 <record id="analytic_millennium_industries" model="account.analytic.account">
98 <field name="name">Millennium Industries</field>
99 <field name="parent_id" ref="analytic_integration"/>
100 <field name="type">normal</field>
101 <field name="partner_id" ref="base.res_partner_15"/>
102 </record>
103 <record id="analytic_integration_c2c" model="account.analytic.account">
104 <field name="name">CampToCamp</field>
105 <field name="type">normal</field>
106 <field eval="str(time.localtime()[0] - 1) + '-08-07'" name="date_start"/>
107 <field eval="time.strftime('%Y-12-31')" name="date"/>
108 <field name="parent_id" ref="analytic_integration"/>
109 <field name="partner_id" ref="base.res_partner_12"/>
110 <field name="state">open</field>
111 </record>
112 <record id="analytic_agrolait" model="account.analytic.account">
113 <field name="name">Agrolait</field>
114 <field name="parent_id" ref="analytic_customers"/>
115 <field name="type">normal</field>
116 <field name="partner_id" ref="base.res_partner_2"/>
117 </record>
118 <record id="analytic_asustek" model="account.analytic.account">
119 <field name="name">Asustek</field>
120 <field name="type">normal</field>
121 <field name="parent_id" ref="analytic_customers"/>
122 <field name="partner_id" ref="base.res_partner_1"/>
123 </record>
124 <record id="analytic_deltapc" model="account.analytic.account">
125 <field name="name">Delta PC</field>
126 <field name="parent_id" ref="analytic_customers"/>
127 <field name="type">normal</field>
128 <field name="partner_id" ref="base.res_partner_4"/>
129 </record>
130 <record id="analytic_spark" model="account.analytic.account">
131 <field name="name">Spark Systems</field>
132 <field eval="str(time.localtime()[0] - 1) + '-05-09'" name="date_start"/>
133 <field eval="time.strftime('%Y-05-08')" name="date"/>
134 <field name="parent_id" ref="analytic_partners"/>
135 <field name="type">normal</field>
136 <field name="partner_id" ref="base.res_partner_16"/>
137 <field name="state">open</field>
138 </record>
139 <record id="analytic_nebula" model="account.analytic.account">
140 <field name="name">Nebula</field>
141 <field eval="time.strftime('%Y-02-01')" name="date_start"/>
142 <field eval="time.strftime('%Y-07-01')" name="date"/>
143 <field name="type">normal</field>
144 <field name="parent_id" ref="analytic_partners"/>
145 <field name="partner_id" ref="base.res_partner_17"/>
146 <field name="state">open</field>
147 </record>
148 <record id="analytic_luminous_technologies" model="account.analytic.account">
149 <field name="name">Luminous Technologies</field>
150 <field eval="time.strftime('%Y-04-24')" name="date_start"/>
151 <field eval="str(time.localtime()[0] + 1) + '-04-24'" name="date"/>
152 <field name="type">normal</field>
153 <field name="parent_id" ref="analytic_partners"/>
154 <field name="partner_id" ref="base.res_partner_11"/>
155 </record>
156 <record id="analytic_desertic_hispafuentes" model="account.analytic.account">
157 <field name="name">Desertic - Hispafuentes</field>
158 <field eval="time.strftime('%Y-02-01')" name="date_start"/>
159 <field eval="str(time.localtime()[0] + 1) + '-02-01'" name="date"/>
160 <field name="type">normal</field>
161 <field name="parent_id" ref="analytic_partners"/>
162 <field name="partner_id" ref="base.res_partner_12"/>
163 </record>
164 <record id="analytic_think_big_systems" model="account.analytic.account">
165 <field name="name">Think Big Systems</field>
166 <field name="type">normal</field>
167 <field name="parent_id" ref="analytic_partners"/>
168 <field name="partner_id" ref="base.res_partner_18"/>
169 </record>
170 <record id="analytic_partners_camp_to_camp" model="account.analytic.account">
171 <field name="name">Camp to Camp</field>
172 <field eval="time.strftime('%Y-%m-%d', time.localtime(time.time() - 365 * 86400))" name="date_start"/>
173 <field eval="time.strftime('%Y-%m-%d')" name="date"/>
174 <field name="type">normal</field>
175 <field name="parent_id" ref="analytic_partners"/>
176 <field name="partner_id" ref="base.res_partner_12"/>
177 <field name="state">open</field>
178 </record>
179 <record id="analytic_project_2_support" model="account.analytic.account">
180 <field name="name">Support</field>
181 <field name="type">normal</field>
182 <field name="parent_id" ref="analytic_project_2"/>
183 </record>
184 <record id="analytic_project_2_development" model="account.analytic.account">
185 <field name="name">Development</field>
186 <field name="type">normal</field>
187 <field name="parent_id" ref="analytic_project_2"/>
188 </record>
189 <record id="analytic_project_1_trainings" model="account.analytic.account">
190 <field name="name">Training</field>
191 <field name="type">normal</field>
192 <field name="parent_id" ref="analytic_project_1"/>
193 </record>
194 <record id="analytic_project_1_development" model="account.analytic.account">
195 <field name="name">Development</field>
196 <field name="type">normal</field>
197 <field name="parent_id" ref="analytic_project_1"/>
198 </record>
199 <record id="analytic_administratif" model="account.analytic.account">
200 <field name="name">Administrative</field>
201 <field name="type">normal</field>
202 <field name="parent_id" ref="analytic_internal"/>
203 </record>
204 <record id="analytic_commercial_marketing" model="account.analytic.account">
205 <field name="name">Commercial &amp; Marketing</field>
206 <field name="type">normal</field>
207 <field name="parent_id" ref="analytic_internal"/>
208 </record>
209 <record id="analytic_our_super_product_development" model="account.analytic.account">
210 <field name="name">Our Super Product Development</field>
211 <field name="type">view</field>
212 <field name="parent_id" ref="analytic_internal"/>
213 </record>
214 <record id="analytic_stable" model="account.analytic.account">
215 <field name="name">Stable</field>
216 <field name="type">normal</field>
217 <field name="parent_id" ref="analytic_our_super_product_development"/>
218 </record>
219 <record id="analytic_trunk" model="account.analytic.account">
220 <field name="name">Trunk</field>
221 <field name="type">normal</field>
222 <field name="parent_id" ref="analytic_our_super_product_development"/>
223 </record>
224 <record id="analytic_paid" model="account.analytic.account">
225 <field name="name">Paid</field>
226 <field name="type">normal</field>
227 <field name="parent_id" ref="analytic_absences"/>
228 </record>
229 <record id="analytic_unpaid" model="account.analytic.account">
230 <field name="name">Unpaid</field>
231 <field name="type">normal</field>
232 <field name="parent_id" ref="analytic_absences"/>
233 </record>
234 </data>
235</openerp>
2360
=== removed file 'account/project/project.py'
--- account/project/project.py 2013-10-27 12:31:04 +0000
+++ account/project/project.py 1970-01-01 00:00:00 +0000
@@ -1,50 +0,0 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22from openerp.osv import fields, osv
23
24class account_analytic_journal(osv.osv):
25 _name = 'account.analytic.journal'
26 _description = 'Analytic Journal'
27 _columns = {
28 'name': fields.char('Journal Name', size=64, required=True),
29 'code': fields.char('Journal Code', size=8),
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."),
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."),
32 'line_ids': fields.one2many('account.analytic.line', 'journal_id', 'Lines'),
33 'company_id': fields.many2one('res.company', 'Company', required=True),
34 }
35 _defaults = {
36 'active': True,
37 'type': 'general',
38 'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
39 }
40
41
42class account_journal(osv.osv):
43 _inherit="account.journal"
44
45 _columns = {
46 'analytic_journal_id':fields.many2one('account.analytic.journal','Analytic Journal', help="Journal for analytic entries"),
47 }
48
49
50# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
510
=== removed file 'account/project/project_demo.xml'
--- account/project/project_demo.xml 2013-12-10 15:29:57 +0000
+++ account/project/project_demo.xml 1970-01-01 00:00:00 +0000
@@ -1,15 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data noupdate="1">
4 <record id="cose_journal_sale" model="account.analytic.journal">
5 <field name="code">SAL</field>
6 <field name="name">Sales</field>
7 <field name="type">sale</field>
8 </record>
9 <record id="sit" model="account.analytic.journal">
10 <field name="code">START</field>
11 <field name="name">Miscellaneous Operation</field>
12 <field name="type">situation</field>
13 </record>
14 </data>
15</openerp>
160
=== removed file 'account/project/project_report.xml'
--- account/project/project_report.xml 2014-03-27 18:25:20 +0000
+++ account/project/project_report.xml 1970-01-01 00:00:00 +0000
@@ -1,54 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4 <report
5 id="action_account_analytic_account_inverted_balance"
6 model="account.analytic.account"
7 string="Inverted Analytic Balance"
8 report_type="qweb-pdf"
9 name="account.report_invertedanalyticbalance"
10 file="account.report_invertedanalyticbalance"
11 menu="False"
12 />
13
14 <report
15 id="action_report_analytic_journal"
16 model="account.analytic.journal"
17 string="Analytic Journal"
18 report_type="qweb-pdf"
19 name="account.report_analyticjournal"
20 file="account.report_analyticjournal"
21 menu="False"
22 />
23
24 <report
25 id="action_report_analytic_balance"
26 model="account.analytic.account"
27 string="Analytic Balance"
28 report_type="qweb-pdf"
29 name="account.report_analyticbalance"
30 file="account.report_analyticbalance"
31 menu="False"
32 />
33
34 <report
35 id="action_report_cost_ledger"
36 model="account.analytic.account"
37 report_type="qweb-pdf"
38 string="Cost Ledger"
39 name="account.report_analyticcostledger"
40 file="account.report_analyticcostledger"
41 menu="False"
42 />
43
44 <report
45 id="action_report_cost_ledgerquantity"
46 model="account.analytic.account"
47 report_type="qweb-pdf"
48 string="Cost Ledger (Only quantities)"
49 name="account.report_analyticcostledgerquantity"
50 file="account.report_analyticcostledgerquantity"
51 menu="False"
52 />
53 </data>
54</openerp>
550
=== removed file 'account/project/project_view.xml'
--- account/project/project_view.xml 2013-10-27 12:31:04 +0000
+++ account/project/project_view.xml 1970-01-01 00:00:00 +0000
@@ -1,372 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5 <record id="view_account_analytic_account_list" model="ir.ui.view">
6 <field name="name">account.analytic.account.list</field>
7 <field name="model">account.analytic.account</field>
8 <field eval="8" name="priority"/>
9 <field name="arch" type="xml">
10 <tree toolbar="1" colors="red:state=='pending';grey:state in ('cancelled','close');blue:type=='view'" string="Analytic Accounts">
11 <field name="complete_name"/>
12 <field name="partner_id"/>
13 <field name="code"/>
14 <field name="date_start"/>
15 <field name="date"/>
16 <field name="user_id" invisible="1"/>
17 <field name="manager_id"/>
18 <field name="parent_id" invisible="1"/>
19 <field name="state" invisible="1"/>
20 <field name="type" invisible="1"/>
21 <field name="template_id" invisible="1"/>
22 <field name="company_id" groups="base.group_multi_company"/>
23 </tree>
24 </field>
25 </record>
26
27 <record id="view_account_analytic_account_search" model="ir.ui.view">
28 <field name="name">account.analytic.account.search</field>
29 <field name="model">account.analytic.account</field>
30 <field name="arch" type="xml">
31 <search string="Analytic Account">
32 <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Analytic Account"/>
33 <field name="date"/>
34 <field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
35 <field name="manager_id"/>
36 <field name="parent_id"/>
37 <field name="user_id"/>
38 <filter string="Open" domain="[('state','=','open')]" help="Current Accounts"/>
39 <filter string="Pending" domain="[('state','=','pending')]" help="Pending Accounts"/>
40 <group expand="0" string="Group By...">
41 <filter string="Associated Partner" domain="[]" context="{'group_by':'partner_id'}"/>
42 <filter string="Type" domain="[]" context="{'group_by':'type'}"/>
43 <filter string="Template" domain="[]" context="{'group_by':'template_id'}"/>
44 <filter string="Parent Account" domain="[]" context="{'group_by':'parent_id'}"/>
45 <filter string="Status" domain="[]" context="{'group_by':'state'}" groups="base.group_no_one"/>
46 </group>
47 </search>
48 </field>
49 </record>
50
51 <record id="view_account_analytic_account_tree" model="ir.ui.view">
52 <field name="name">account.analytic.account.tree</field>
53 <field name="model">account.analytic.account</field>
54 <field name="field_parent">child_complete_ids</field>
55 <field name="arch" type="xml">
56 <tree colors="blue:state=='pending';grey:state in ('close','cancelled');blue:type=='view'" string="Analytic account" toolbar="1">
57 <field name="name" invisible="1"/>
58 <field name="complete_name"/>
59 <field name="code"/>
60 <field name="debit"/>
61 <field name="credit"/>
62 <field name="balance"/>
63 <field name="state" invisible="1"/>
64 <field name="currency_id" groups="base.group_multi_currency"/>
65 <field name="date" invisible="1"/>
66 <field name="user_id" invisible="1"/>
67 <field name="partner_id" invisible="1"/>
68 <field name="parent_id" invisible="1"/>
69 <field name="type"/>
70 <field name="company_id" groups="base.group_multi_company"/>
71 <field name="template_id" invisible="1"/>
72 </tree>
73 </field>
74 </record>
75
76
77 <record id="action_account_analytic_account_form" model="ir.actions.act_window">
78 <field name="name">Analytic Accounts</field>
79 <field name="type">ir.actions.act_window</field>
80 <field name="res_model">account.analytic.account</field>
81 <field name="context">{}</field> <!-- repair invalid context by setting empty one -->
82 <field name="view_type">form</field>
83 <field name="view_mode">tree,form</field>
84 <field name="view_id" ref="view_account_analytic_account_tree"/>
85 <field name="search_view_id" ref="account.view_account_analytic_account_search"/>
86 </record>
87 <menuitem action="action_account_analytic_account_form" id="account_analytic_def_account"
88 parent="menu_analytic_accounting"
89 groups="analytic.group_analytic_accounting"/>
90
91 <record id="act_account_renew_view" model="ir.actions.act_window">
92 <field name="name">Accounts to Renew</field>
93 <field name="type">ir.actions.act_window</field>
94 <field name="res_model">account.analytic.account</field>
95 <field name="view_type">form</field>
96 <field name="view_mode">tree,form</field>
97 <field name="domain">[('date','&lt;',time.strftime('%Y-%m-%d %H:%M:%S'))]</field>
98 <field name="filter" eval="True"/>
99 </record>
100
101 <record id="action_account_analytic_account_tree2" model="ir.actions.act_window">
102 <field name="name">Chart of Analytic Accounts</field>
103 <field name="res_model">account.analytic.account</field>
104 <field name="view_type">tree</field>
105 <field name="view_id" ref="view_account_analytic_account_tree"/>
106 <field name="domain">[('parent_id','=',False)]</field>
107 <field name="help" type="html">
108 <p>
109 Click to add a new analytic account.
110 </p><p>
111 The normal chart of accounts has a structure defined by the
112 legal requirement of the country. The analytic chart of
113 accounts structure should reflect your own business needs in
114 term of costs/revenues reporting.
115 </p><p>
116 They are usually structured by contracts, projects, products or
117 departements. Most of the OpenERP operations (invoices,
118 timesheets, expenses, etc) generate analytic entries on the
119 related account.
120 </p>
121 </field>
122 </record>
123
124
125 <record id="view_account_analytic_line_form" model="ir.ui.view">
126 <field name="name">account.analytic.line.form</field>
127 <field name="model">account.analytic.line</field>
128 <field name="priority">1</field>
129 <field name="arch" type="xml">
130 <form string="Analytic Entry" version="7.0">
131 <group>
132 <group>
133 <field name="name"/>
134 <field name="account_id"/>
135 <field name="journal_id"/>
136 <field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'account.group_account_invoice']}"/>
137 </group>
138 <group>
139 <field name="date"/>
140 <field name="ref"/>
141 <field name="company_id" groups="base.group_multi_company"/>
142 </group>
143 <group string="Amount">
144 <field name="amount"/>
145 <label for="amount_currency" groups="base.group_multi_currency"/>
146 <div groups="base.group_multi_currency">
147 <field name="amount_currency" class="oe_inline"/>
148 <field name="currency_id" class="oe_inline"/>
149 </div>
150 </group>
151 <group string="Product Information">
152 <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
153 <label for="unit_amount"/>
154 <div>
155 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
156 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
157 </div>
158 </group>
159 <group string="General Accounting">
160 <field name="general_account_id"/>
161 <field name="move_id" readonly="1"/>
162 </group>
163 </group>
164 </form>
165 </field>
166 </record>
167 <record id="view_account_analytic_line_tree" model="ir.ui.view">
168 <field name="name">account.analytic.line.tree</field>
169 <field name="model">account.analytic.line</field>
170 <field name="arch" type="xml">
171 <tree string="Analytic Entries">
172 <field name="date"/>
173 <field name="ref" invisible="context.get('to_invoice', False)"/>
174 <field name="name"/>
175 <field name="user_id"/>
176 <field name="journal_id" invisible="context.get('to_invoice', False)"/>
177 <field name="amount" sum="Total" invisible="context.get('to_invoice', False)"/>
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)"/>
179 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" sum="Total Quantity"/>
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)"/>
181 <field domain="[('type','=','normal')]" name="account_id"/>
182 <field name="general_account_id" invisible="context.get('to_invoice', False)"/>
183 <field name="company_id" groups="base.group_multi_company"/>
184 </tree>
185 </field>
186 </record>
187 <record id="view_account_analytic_line_filter" model="ir.ui.view">
188 <field name="name">account.analytic.line.select</field>
189 <field name="model">account.analytic.line</field>
190 <field name="arch" type="xml">
191 <search string="Search Analytic Lines">
192 <field name="name" string="Analytic Line"/>
193 <field name="date"/>
194 <filter name="sales" string="Sales" domain="[('journal_id.type','=','sale')]" help="Analytic Journal Items related to a sale journal."/>
195 <filter name="purchases" string="Purchases" domain="[('journal_id.type','=','purchase')]" help="Analytic Journal Items related to a purchase journal."/>
196 <filter name="others" string="Others" domain="[('journal_id.type','in',('cash','general','situation'))]"/>
197 <separator/>
198 <filter string="My Entries" domain="[('user_id','=',uid)]"/>
199 <field name="account_id"/>
200 <field name="user_id"/>
201 <group string="Group By..." expand="0">
202 <filter string="Analytic Account" context="{'group_by':'account_id'}"/>
203 <filter string="Fin. Account" context="{'group_by':'general_account_id'}"/>
204 <filter string="Journal" context="{'group_by':'journal_id'}" name="group_journal"/>
205 <separator/>
206 <filter string="Product" context="{'group_by':'product_id'}"/>
207 <filter string="User" context="{'group_by':'user_id'}"/>
208 <separator/>
209 <filter string="Tasks Month" context="{'group_by':'date'}" name="group_date" help="Invoice Tasks by Month"/>
210
211 </group>
212 </search>
213 </field>
214 </record>
215 <record id="action_account_analytic_line_form" model="ir.actions.act_window">
216 <field name="name">Analytic Entries</field>
217 <field name="type">ir.actions.act_window</field>
218 <field name="res_model">account.analytic.line</field>
219 <field name="view_type">form</field>
220 <field name="context">{"search_default_user_id":uid}</field>
221 <field name="view_id" ref="view_account_analytic_line_tree"/>
222 </record>
223
224 <!-- Entries by Line -->
225
226 <record id="action_account_tree1" model="ir.actions.act_window">
227 <field name="name">Analytic Items</field>
228 <field name="res_model">account.analytic.line</field>
229 <field name="view_type">form</field>
230 <field name="view_mode">tree,form</field>
231 <field name="domain">[('account_id','child_of',[active_id])]</field>
232 <field name="context">{'account_id':active_id}</field>
233 <field name="search_view_id" ref="view_account_analytic_line_filter"/>
234 </record>
235 <record id="ir_open_account_analytic_account" model="ir.values">
236 <field eval="'tree_but_open'" name="key2"/>
237 <field eval="'account.analytic.account'" name="model"/>
238 <field name="name">Open Account Tree</field>
239 <field eval="'ir.actions.act_window,%d'%action_account_tree1" name="value"/>
240 </record>
241
242 <record id="account_analytic_line_extended_form" model="ir.ui.view">
243 <field name="name">account.analytic.line.extended_form</field>
244 <field name="model">account.analytic.line</field>
245 <field name="arch" type="xml">
246 <form string="Project line" version="7.0">
247 <group>
248 <group>
249 <field name="name"/>
250 <field name="account_id"/>
251 <field name="journal_id"/>
252 </group>
253 <group>
254 <field name="date" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
255 <field name="company_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
256 </group>
257 <group string="Amount">
258 <field name="amount"/>
259 <label for="amount_currency" groups="base.group_multi_currency"/>
260 <div groups="base.group_multi_currency">
261 <field name="amount_currency" class="oe_inline"/>
262 <field name="currency_id" class="oe_inline"/>
263 </div>
264 <field invisible="1" name="general_account_id"/>
265 </group>
266 <group string="Product Information">
267 <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
268 <label for="unit_amount"/>
269 <div>
270 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
271 <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
272 </div>
273 </group>
274 </group>
275 </form>
276 </field>
277 </record>
278 <record id="action_account_analytic_account_line_extended_form" model="ir.actions.act_window">
279 <field name="name">account.analytic.line.extended</field>
280 <field name="type">ir.actions.act_window</field>
281 <field name="res_model">account.analytic.line</field>
282 <field name="view_type">form</field>
283 <field name="view_id" ref="account_analytic_line_extended_form"/>
284 </record>
285
286 #
287 # Analytic Journal
288 #
289
290 <record id="view_account_analytic_journal_tree" model="ir.ui.view">
291 <field name="name">account.analytic.journal.tree</field>
292 <field name="model">account.analytic.journal</field>
293 <field name="arch" type="xml">
294 <tree string="Analytic Journal">
295 <field name="code"/>
296 <field name="name"/>
297 <field name="type"/>
298 </tree>
299 </field>
300 </record>
301
302 <record id="view_analytic_journal_search" model="ir.ui.view">
303 <field name="name">account.analytic.journal.search</field>
304 <field name="model">account.analytic.journal</field>
305 <field name="arch" type="xml">
306 <search string="Analytic Journals">
307 <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Analytic Journal"/>
308 <field name="type"/>
309 <group expand="0" string="Group By...">
310 <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
311 </group>
312 </search>
313 </field>
314 </record>
315
316 <record id="view_account_analytic_journal_form" model="ir.ui.view">
317 <field name="name">account.analytic.journal.form</field>
318 <field name="model">account.analytic.journal</field>
319 <field name="arch" type="xml">
320 <form string="Analytic Journal" version="7.0">
321 <group col="4">
322 <field name="name"/>
323 <field name="code"/>
324 <field name="type"/>
325 <field name="active"/>
326 <field name="company_id" groups="base.group_multi_company"/>
327 </group>
328 </form>
329 </field>
330 </record>
331 <record id="action_account_analytic_journal_form" model="ir.actions.act_window">
332 <field name="name">Analytic Journals</field>
333 <field name="res_model">account.analytic.journal</field>
334 <field name="view_type">form</field>
335 <field name="view_mode">tree,form</field>
336 <field name="search_view_id" ref="view_analytic_journal_search" />
337 </record>
338 <menuitem groups="analytic.group_analytic_accounting" action="action_account_analytic_journal_form" id="account_def_analytic_journal" parent="menu_analytic_accounting" sequence="5"/>
339
340 #
341 # Open journal entries
342 #
343
344 <record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
345 <field name="name">Analytic Journal Items</field>
346 <field name="res_model">account.analytic.line</field>
347 <field name="view_type">form</field>
348 <field name="view_mode">tree,form</field>
349 </record>
350 <menuitem groups="analytic.group_analytic_accounting"
351 action="action_account_analytic_journal_open_form"
352 id="account_analytic_journal_entries"
353 parent="menu_finance_entries"/>
354
355 #
356 # Reporting
357 #
358
359
360 <record id="view_account_journal_1" model="ir.ui.view">
361 <field name="name">account.journal.form.1</field>
362 <field name="model">account.journal</field>
363 <field name="inherit_id" ref="account.view_account_journal_form"/>
364 <field name="arch" type="xml">
365 <field name="type" position="after">
366 <field name="analytic_journal_id" groups="analytic.group_analytic_accounting"/>
367 </field>
368 </field>
369 </record>
370
371 </data>
372</openerp>
3730
=== removed directory 'account/project/report'
=== removed file 'account/project/report/__init__.py'
--- account/project/report/__init__.py 2011-01-14 00:11:01 +0000
+++ account/project/report/__init__.py 1970-01-01 00:00:00 +0000
@@ -1,29 +0,0 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import analytic_journal
23import analytic_balance
24import inverted_analytic_balance
25import cost_ledger
26import quantity_cost_ledger
27
28# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
29
300
=== removed file 'account/project/report/analytic_balance.py'
--- account/project/report/analytic_balance.py 2014-04-02 16:40:53 +0000
+++ account/project/report/analytic_balance.py 1970-01-01 00:00:00 +0000
@@ -1,157 +0,0 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import time
23from openerp.osv import osv
24from openerp.report import report_sxw
25
26
27class account_analytic_balance(report_sxw.rml_parse):
28 def __init__(self, cr, uid, name, context):
29 super(account_analytic_balance, self).__init__(cr, uid, name, context=context)
30 self.localcontext.update( {
31 'time': time,
32 'get_objects': self._get_objects,
33 'lines_g': self._lines_g,
34 'move_sum': self._move_sum,
35 'sum_all': self._sum_all,
36 'sum_balance': self._sum_balance,
37 'move_sum_balance': self._move_sum_balance,
38 })
39 self.acc_ids = []
40 self.read_data = []
41 self.empty_acc = False
42 self.acc_data_dict = {}# maintains a relation with an account with its successors.
43 self.acc_sum_list = []# maintains a list of all ids
44
45 def get_children(self, ids):
46 read_data = self.pool.get('account.analytic.account').read(self.cr, self.uid, ids,['child_ids','code','complete_name','balance'])
47 for data in read_data:
48 if (data['id'] not in self.acc_ids):
49 inculde_empty = True
50 if (not self.empty_acc) and data['balance'] == 0.00:
51 inculde_empty = False
52 if inculde_empty:
53 self.acc_ids.append(data['id'])
54 self.read_data.append(data)
55 if data['child_ids']:
56 self.get_children(data['child_ids'])
57 return True
58
59 def _get_objects(self, empty_acc):
60 if self.read_data:
61 return self.read_data
62 self.empty_acc = empty_acc
63 self.read_data = []
64 self.get_children(self.ids)
65 return self.read_data
66
67 def _lines_g(self, account_id, date1, date2):
68 account_analytic_obj = self.pool.get('account.analytic.account')
69 ids = account_analytic_obj.search(self.cr, self.uid,
70 [('parent_id', 'child_of', [account_id])])
71 self.cr.execute("SELECT aa.name AS name, aa.code AS code, \
72 sum(aal.amount) AS balance, sum(aal.unit_amount) AS quantity \
73 FROM account_analytic_line AS aal, account_account AS aa \
74 WHERE (aal.general_account_id=aa.id) \
75 AND (aal.account_id IN %s)\
76 AND (date>=%s) AND (date<=%s) AND aa.active \
77 GROUP BY aal.general_account_id, aa.name, aa.code, aal.code \
78 ORDER BY aal.code", (tuple(ids), date1, date2))
79 res = self.cr.dictfetchall()
80
81 for r in res:
82 if r['balance'] > 0:
83 r['debit'] = r['balance']
84 r['credit'] = 0.0
85 elif r['balance'] < 0:
86 r['debit'] = 0.0
87 r['credit'] = -r['balance']
88 else:
89 r['balance'] == 0
90 r['debit'] = 0.0
91 r['credit'] = 0.0
92 return res
93
94 def _move_sum(self, account_id, date1, date2, option):
95 if account_id not in self.acc_data_dict:
96 account_analytic_obj = self.pool.get('account.analytic.account')
97 ids = account_analytic_obj.search(self.cr, self.uid,[('parent_id', 'child_of', [account_id])])
98 self.acc_data_dict[account_id] = ids
99 else:
100 ids = self.acc_data_dict[account_id]
101
102 query_params = (tuple(ids), date1, date2)
103 if option == "credit":
104 self.cr.execute("SELECT COALESCE(-sum(amount),0.0) FROM account_analytic_line \
105 WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0",query_params)
106 elif option == "debit":
107 self.cr.execute("SELECT COALESCE(sum(amount),0.0) FROM account_analytic_line \
108 WHERE account_id IN %s\
109 AND date>=%s AND date<=%s AND amount>0",query_params)
110 elif option == "quantity":
111 self.cr.execute("SELECT COALESCE(sum(unit_amount),0.0) FROM account_analytic_line \
112 WHERE account_id IN %s\
113 AND date>=%s AND date<=%s",query_params)
114 return self.cr.fetchone()[0] or 0.0
115
116 def _move_sum_balance(self, account_id, date1, date2):
117 debit = self._move_sum(account_id, date1, date2, 'debit')
118 credit = self._move_sum(account_id, date1, date2, 'credit')
119 return (debit-credit)
120
121 def _sum_all(self, accounts, date1, date2, option):
122 account_analytic_obj = self.pool.get('account.analytic.account')
123 ids = map(lambda x: x['id'], accounts)
124 if not ids:
125 return 0.0
126
127 if not self.acc_sum_list:
128 ids2 = account_analytic_obj.search(self.cr, self.uid,[('parent_id', 'child_of', ids)])
129 self.acc_sum_list = ids2
130 else:
131 ids2 = self.acc_sum_list
132
133 query_params = (tuple(ids2), date1, date2)
134 if option == "debit":
135 self.cr.execute("SELECT COALESCE(sum(amount),0.0) FROM account_analytic_line \
136 WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0",query_params)
137 elif option == "credit":
138 self.cr.execute("SELECT COALESCE(-sum(amount),0.0) FROM account_analytic_line \
139 WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0",query_params)
140 elif option == "quantity":
141 self.cr.execute("SELECT COALESCE(sum(unit_amount),0.0) FROM account_analytic_line \
142 WHERE account_id IN %s AND date>=%s AND date<=%s",query_params)
143 return self.cr.fetchone()[0] or 0.0
144
145 def _sum_balance(self, accounts, date1, date2):
146 debit = self._sum_all(accounts, date1, date2, 'debit') or 0.0
147 credit = self._sum_all(accounts, date1, date2, 'credit') or 0.0
148 return (debit-credit)
149
150
151class report_analyticbalance(osv.AbstractModel):
152 _name = 'report.account.report_analyticbalance'
153 _inherit = 'report.abstract_report'
154 _template = 'account.report_analyticbalance'
155 _wrapped_report_class = account_analytic_balance
156
157# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1580
=== removed file 'account/project/report/analytic_journal.py'
--- account/project/report/analytic_journal.py 2014-04-02 16:40:53 +0000
+++ account/project/report/analytic_journal.py 1970-01-01 00:00:00 +0000
@@ -1,68 +0,0 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import time
23from openerp.osv import osv
24from openerp.report import report_sxw
25
26
27#
28# Use period and Journal for selection or resources
29#
30class account_analytic_journal(report_sxw.rml_parse):
31 def __init__(self, cr, uid, name, context):
32 super(account_analytic_journal, self).__init__(cr, uid, name, context=context)
33 self.localcontext.update( {
34 'time': time,
35 'lines': self._lines,
36 'lines_a': self._lines_a,
37 'sum_general': self._sum_general,
38 'sum_analytic': self._sum_analytic,
39 })
40
41 def _lines(self, journal_id, date1, date2):
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,))
43 ids = map(lambda x: x[0], self.cr.fetchall())
44 return self.pool.get('account.move.line').browse(self.cr, self.uid, ids)
45
46 def _lines_a(self, move_id, journal_id, date1, date2):
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)])
48 if not ids:
49 return []
50 return self.pool.get('account.analytic.line').browse(self.cr, self.uid, ids)
51
52 def _sum_general(self, journal_id, date1, date2):
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,))
54 return self.cr.fetchall()[0][0] or 0
55
56 def _sum_analytic(self, journal_id, date1, date2):
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))
58 res = self.cr.dictfetchone()
59 return res['sum'] or 0
60
61
62class report_analyticjournal(osv.AbstractModel):
63 _name = 'report.account.report_analyticjournal'
64 _inherit = 'report.abstract_report'
65 _template = 'account.report_analyticjournal'
66 _wrapped_report_class = account_analytic_journal
67
68# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
690
=== removed file 'account/project/report/cost_ledger.py'
--- account/project/report/cost_ledger.py 2014-04-02 16:40:53 +0000
+++ account/project/report/cost_ledger.py 1970-01-01 00:00:00 +0000
@@ -1,111 +0,0 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import time
23from openerp.osv import osv
24from openerp.report import report_sxw
25
26
27class account_analytic_cost_ledger(report_sxw.rml_parse):
28 def __init__(self, cr, uid, name, context):
29 super(account_analytic_cost_ledger, self).__init__(cr, uid, name, context=context)
30 self.localcontext.update( {
31 'time': time,
32 'lines_g': self._lines_g,
33 'lines_a': self._lines_a,
34 'account_sum_debit': self._account_sum_debit,
35 'account_sum_credit': self._account_sum_credit,
36 'account_sum_balance': self._account_sum_balance,
37 'sum_debit': self._sum_debit,
38 'sum_credit': self._sum_credit,
39 'sum_balance': self._sum_balance,
40 })
41 self.children = {} # a memo for the method _get_children
42
43 def _get_children(self, accounts):
44 """ return all children accounts of the given accounts
45 :param accounts: list of browse records of 'account.analytic.account'
46 :return: tuple of account ids
47 """
48 analytic_obj = self.pool.get('account.analytic.account')
49 res = set()
50 for account in accounts:
51 if account.id not in self.children:
52 self.children[account.id] = analytic_obj.search(self.cr, self.uid, [('parent_id', 'child_of', [account.id])])
53 res.update(self.children[account.id])
54 return tuple(res)
55
56 def _lines_g(self, account, date1, date2):
57 self.cr.execute("SELECT sum(aal.amount) AS balance, aa.code AS code, aa.name AS name, aa.id AS id \
58 FROM account_account AS aa, account_analytic_line AS aal \
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 \
60 GROUP BY aa.code, aa.name, aa.id ORDER BY aa.code", (self._get_children([account]), date1, date2))
61 res = self.cr.dictfetchall()
62 for r in res:
63 r['debit'] = r['balance'] if r['balance'] > 0 else 0.0
64 r['credit'] = -r['balance'] if r['balance'] < 0 else 0.0
65 return res
66
67 def _lines_a(self, general_account, account, date1, date2):
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 \
69 WHERE (aal.general_account_id=%s) AND (aal.account_id IN %s) AND (aal.date>=%s) AND (aal.date<=%s) \
70 AND (aal.journal_id=aaj.id) \
71 ORDER BY aal.date, aaj.code, aal.code", (general_account['id'], self._get_children([account]), date1, date2))
72 res = self.cr.dictfetchall()
73 for r in res:
74 r['debit'] = r['balance'] if r['balance'] > 0 else 0.0
75 r['credit'] = -r['balance'] if r['balance'] < 0 else 0.0
76 return res
77
78 def _account_sum_debit(self, account, date1, date2):
79 return self._sum_debit([account], date1, date2)
80
81 def _account_sum_credit(self, account, date1, date2):
82 return self._sum_credit([account], date1, date2)
83
84 def _account_sum_balance(self, account, date1, date2):
85 debit = self._account_sum_debit(account, date1, date2)
86 credit = self._account_sum_credit(account, date1, date2)
87 return (debit-credit)
88
89 def _sum_debit(self, accounts, date1, date2):
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",
91 (self._get_children(accounts), date1, date2,))
92 return self.cr.fetchone()[0] or 0.0
93
94 def _sum_credit(self, accounts, date1, date2):
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",
96 (self._get_children(accounts), date1, date2,))
97 return self.cr.fetchone()[0] or 0.0
98
99 def _sum_balance(self, accounts, date1, date2):
100 debit = self._sum_debit(accounts, date1, date2)
101 credit = self._sum_credit(accounts, date1, date2)
102 return (debit-credit)
103
104
105class report_analyticcostledger(osv.AbstractModel):
106 _name = 'report.account.report_analyticcostledger'
107 _inherit = 'report.abstract_report'
108 _template = 'account.report_analyticcostledger'
109 _wrapped_report_class = account_analytic_cost_ledger
110
111# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1120
=== removed file 'account/project/report/inverted_analytic_balance.py'
--- account/project/report/inverted_analytic_balance.py 2014-04-02 16:40:53 +0000
+++ account/project/report/inverted_analytic_balance.py 1970-01-01 00:00:00 +0000
@@ -1,130 +0,0 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import time
23from openerp.osv import osv
24from openerp.report import report_sxw
25
26class account_inverted_analytic_balance(report_sxw.rml_parse):
27 def __init__(self, cr, uid, name, context):
28 super(account_inverted_analytic_balance, self).__init__(cr, uid, name, context=context)
29 self.localcontext.update( {
30 'time': time,
31 'lines_g': self._lines_g,
32 'lines_a': self._lines_a,
33 'sum_debit': self._sum_debit,
34 'sum_credit': self._sum_credit,
35 'sum_balance': self._sum_balance,
36 'sum_quantity': self._sum_quantity,
37 })
38
39 def _lines_g(self, accounts, date1, date2):
40 ids = map(lambda x: x.id, accounts)
41 self.cr.execute("SELECT aa.name AS name, aa.code AS code, "
42 "sum(aal.amount) AS balance, "
43 "sum(aal.unit_amount) AS quantity, aa.id AS id \
44 FROM account_analytic_line AS aal, account_account AS aa \
45 WHERE (aal.general_account_id=aa.id) "
46 "AND (aal.account_id IN %s) "
47 "AND (date>=%s) AND (date<=%s) AND aa.active \
48 GROUP BY aal.general_account_id, aa.name, aa.code, aal.code, aa.id "
49 "ORDER BY aal.code",
50 (tuple(ids), date1, date2))
51 res = self.cr.dictfetchall()
52 for r in res:
53 if r['balance'] > 0:
54 r['debit'] = r['balance']
55 r['credit'] = 0.0
56 elif r['balance'] < 0:
57 r['debit'] = 0.0
58 r['credit'] = -r['balance']
59 else:
60 r['debit'] = 0.0
61 r['credit'] = 0.0
62 return res
63
64 def _lines_a(self, accounts, general_account_id, date1, date2):
65 ids = map(lambda x: x.id, accounts)
66 self.cr.execute("SELECT sum(aal.amount) AS balance, "
67 "sum(aal.unit_amount) AS quantity, "
68 "aaa.code AS code, aaa.name AS name, account_id \
69 FROM account_analytic_line AS aal, "
70 "account_analytic_account AS aaa \
71 WHERE aal.account_id=aaa.id AND aal.account_id IN %s "
72 "AND aal.general_account_id=%s AND aal.date>=%s "
73 "AND aal.date<=%s \
74 GROUP BY aal.account_id, general_account_id, aaa.code, aaa.name "
75 "ORDER BY aal.account_id",
76 (tuple(ids), general_account_id, date1, date2))
77 res = self.cr.dictfetchall()
78
79 aaa_obj = self.pool.get('account.analytic.account')
80 res2 = aaa_obj.read(self.cr, self.uid, ids, ['complete_name'])
81 complete_name = {}
82 for r in res2:
83 complete_name[r['id']] = r['complete_name']
84 for r in res:
85 r['complete_name'] = complete_name[r['account_id']]
86 if r['balance'] > 0:
87 r['debit'] = r['balance']
88 r['credit'] = 0.0
89 elif r['balance'] < 0:
90 r['debit'] = 0.0
91 r['credit'] = -r['balance']
92 else:
93 r['debit'] = 0.0
94 r['credit'] = 0.0
95 return res
96
97 def _sum_debit(self, accounts, date1, date2):
98 ids = map(lambda x: x.id, accounts)
99 self.cr.execute("SELECT sum(amount) \
100 FROM account_analytic_line \
101 WHERE account_id IN %s AND date>=%s AND date<=%s AND amount>0", (tuple(ids),date1, date2,))
102 return self.cr.fetchone()[0] or 0.0
103
104 def _sum_credit(self, accounts, date1, date2):
105 ids = map(lambda x: x.id, accounts)
106 self.cr.execute("SELECT -sum(amount) \
107 FROM account_analytic_line \
108 WHERE account_id IN %s AND date>=%s AND date<=%s AND amount<0", (tuple(ids),date1, date2,))
109 return self.cr.fetchone()[0] or 0.0
110
111 def _sum_balance(self, accounts, date1, date2):
112 debit = self._sum_debit(accounts, date1, date2)
113 credit = self._sum_credit(accounts, date1, date2)
114 return (debit-credit)
115
116 def _sum_quantity(self, accounts, date1, date2):
117 ids = map(lambda x: x.id, accounts)
118 self.cr.execute("SELECT sum(unit_amount) \
119 FROM account_analytic_line \
120 WHERE account_id IN %s AND date>=%s AND date<=%s", (tuple(ids),date1, date2,))
121 return self.cr.fetchone()[0] or 0.0
122
123
124class report_invertedanalyticbalance(osv.AbstractModel):
125 _name = 'report.account.report_invertedanalyticbalance'
126 _inherit = 'report.abstract_report'
127 _template = 'account.report_invertedanalyticbalance'
128 _wrapped_report_class = account_inverted_analytic_balance
129
130# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1310
=== removed file 'account/project/report/quantity_cost_ledger.py'
--- account/project/report/quantity_cost_ledger.py 2014-04-02 16:40:53 +0000
+++ account/project/report/quantity_cost_ledger.py 1970-01-01 00:00:00 +0000
@@ -1,127 +0,0 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21import time
22from openerp.osv import osv
23from openerp.report import report_sxw
24
25
26class account_analytic_quantity_cost_ledger(report_sxw.rml_parse):
27 def __init__(self, cr, uid, name, context):
28 super(account_analytic_quantity_cost_ledger, self).__init__(cr, uid, name, context=context)
29 self.localcontext.update( {
30 'time': time,
31 'lines_g': self._lines_g,
32 'lines_a': self._lines_a,
33 'sum_quantity': self._sum_quantity,
34 'account_sum_quantity': self._account_sum_quantity,
35 })
36
37 def _lines_g(self, account_id, date1, date2, journals):
38 if not journals:
39 self.cr.execute("SELECT sum(aal.unit_amount) AS quantity, \
40 aa.code AS code, aa.name AS name, aa.id AS id \
41 FROM account_account AS aa, account_analytic_line AS aal \
42 WHERE (aal.account_id=%s) AND (aal.date>=%s) \
43 AND (aal.date<=%s) AND (aal.general_account_id=aa.id) \
44 AND aa.active \
45 GROUP BY aa.code, aa.name, aa.id ORDER BY aa.code",
46 (account_id, date1, date2))
47 else:
48 journal_ids = journals
49 self.cr.execute("SELECT sum(aal.unit_amount) AS quantity, \
50 aa.code AS code, aa.name AS name, aa.id AS id \
51 FROM account_account AS aa, account_analytic_line AS aal \
52 WHERE (aal.account_id=%s) AND (aal.date>=%s) \
53 AND (aal.date<=%s) AND (aal.general_account_id=aa.id) \
54 AND aa.active \
55 AND (aal.journal_id IN %s ) \
56 GROUP BY aa.code, aa.name, aa.id ORDER BY aa.code",
57 (account_id, date1, date2, tuple(journal_ids)))
58 res = self.cr.dictfetchall()
59 return res
60
61 def _lines_a(self, general_account_id, account_id, date1, date2, journals):
62 if not journals:
63 self.cr.execute("SELECT aal.name AS name, aal.code AS code, \
64 aal.unit_amount AS quantity, aal.date AS date, \
65 aaj.code AS cj \
66 FROM account_analytic_line AS aal, \
67 account_analytic_journal AS aaj \
68 WHERE (aal.general_account_id=%s) AND (aal.account_id=%s) \
69 AND (aal.date>=%s) AND (aal.date<=%s) \
70 AND (aal.journal_id=aaj.id) \
71 ORDER BY aal.date, aaj.code, aal.code",
72 (general_account_id, account_id, date1, date2))
73 else:
74 journal_ids = journals
75 self.cr.execute("SELECT aal.name AS name, aal.code AS code, \
76 aal.unit_amount AS quantity, aal.date AS date, \
77 aaj.code AS cj \
78 FROM account_analytic_line AS aal, \
79 account_analytic_journal AS aaj \
80 WHERE (aal.general_account_id=%s) AND (aal.account_id=%s) \
81 AND (aal.date>=%s) AND (aal.date<=%s) \
82 AND (aal.journal_id=aaj.id) AND (aaj.id IN %s) \
83 ORDER BY aal.date, aaj.code, aal.code",
84 (general_account_id, account_id, date1, date2,tuple(journal_ids)))
85 res = self.cr.dictfetchall()
86 return res
87
88 def _account_sum_quantity(self, account_id, date1, date2, journals):
89 if not journals:
90 self.cr.execute("SELECT sum(unit_amount) \
91 FROM account_analytic_line \
92 WHERE account_id=%s AND date>=%s AND date<=%s",
93 (account_id, date1, date2))
94 else:
95 journal_ids = journals
96 self.cr.execute("SELECT sum(unit_amount) \
97 FROM account_analytic_line \
98 WHERE account_id = %s AND date >= %s AND date <= %s \
99 AND journal_id IN %s",
100 (account_id, date1, date2, tuple(journal_ids),))
101 return self.cr.fetchone()[0] or 0.0
102
103 def _sum_quantity(self, accounts, date1, date2, journals):
104 ids = map(lambda x: x.id, accounts)
105 if not ids:
106 return 0.0
107 if not journals:
108 self.cr.execute("SELECT sum(unit_amount) \
109 FROM account_analytic_line \
110 WHERE account_id IN %s AND date>=%s AND date<=%s",
111 (tuple(ids), date1, date2,))
112 else:
113 journal_ids = journals
114 self.cr.execute("SELECT sum(unit_amount) \
115 FROM account_analytic_line \
116 WHERE account_id IN %s AND date >= %s AND date <= %s \
117 AND journal_id IN %s",(tuple(ids), date1, date2, tuple(journal_ids)))
118 return self.cr.fetchone()[0] or 0.0
119
120
121class report_analyticcostledgerquantity(osv.AbstractModel):
122 _name = 'report.account.report_analyticcostledgerquantity'
123 _inherit = 'report.abstract_report'
124 _template = 'account.report_analyticcostledgerquantity'
125 _wrapped_report_class = account_analytic_quantity_cost_ledger
126
127# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1280
=== removed directory 'account/project/views'
=== removed file 'account/project/views/report_analyticbalance.xml'
--- account/project/views/report_analyticbalance.xml 2014-04-02 16:40:53 +0000
+++ account/project/views/report_analyticbalance.xml 1970-01-01 00:00:00 +0000
@@ -1,62 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3<data>
4<template id="report_analyticbalance">
5 <t t-call="report.html_container">
6 <t t-call="report.internal_layout">
7 <div class="page">
8 <h2>Analytic Balance - <span t-esc="res_company.currency_id.name"/></h2>
9
10 <table class="table table-condensed">
11 <thead>
12 <tr>
13 <th>Code</th>
14 <th>Account Name</th>
15 <th>Debit</th>
16 <th>Credit</th>
17 <th>Balance</th>
18 <th>Quantity</th>
19 </tr>
20 </thead>
21 <tbody>
22 <tr>
23 <td colspan="2">Total</td>
24 <td>
25 <span t-esc="formatLang(sum_all(get_objects(data['form']['empty_acc']), data['form']['date1'], data['form']['date2'], 'debit'))"/>
26 </td>
27 <td>
28 <span t-esc="formatLang(sum_all(get_objects(data['form']['empty_acc']), data['form']['date1'], data['form']['date2'], 'credit'))"/>
29 </td>
30 <td>
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)"/>
32 </td>
33 <td>
34 <span t-esc="formatLang(sum_all(get_objects(data['form']['empty_acc']), data['form']['date1'], data['form']['date2'], 'quantity'))"/>
35 </td>
36 </tr>
37 <t t-foreach="get_objects(data['form']['empty_acc'])" t-as="o">
38 <tr>
39 <td><span t-esc="o['code']"/></td>
40 <td><span t-esc="o['complete_name']"/></td>
41 <td><span t-esc="formatLang(move_sum(o['id'], data['form']['date1'], data['form']['date2'], 'debit'))"/></td>
42 <td><span t-esc="formatLang(move_sum(o['id'], data['form']['date1'], data['form']['date2'], 'credit'))"/></td>
43 <td><span t-esc="formatLang(move_sum_balance(o['id'], data['form']['date1'], data['form']['date2']), currency_obj=res_company.currency_id)"/></td>
44 <td><span t-esc="formatLang(move_sum(o['id'], data['form']['date1'], data['form']['date2'], 'quantity'))"/></td>
45 </tr>
46 <tr t-foreach="lines_g(o['id'], data['form']['date1'], data['form']['date2'])" t-as="move_g">
47 <td><span t-esc="move_g['code']"/></td>
48 <td><span t-esc="move_g['name']"/></td>
49 <td><span t-esc="formatLang(move_g['debit'])"/></td>
50 <td><span t-esc="formatLang(move_g['credit'])"/></td>
51 <td><span t-esc="formatLang(move_g['balance'], currency_obj=res_company.currency_id)"/></td>
52 <td><span t-esc="formatLang(move_g['quantity'])"/></td>
53 </tr>
54 </t>
55 </tbody>
56 </table>
57 </div>
58 </t>
59 </t>
60</template>
61</data>
62</openerp>
630
=== removed file 'account/project/views/report_analyticcostledger.xml'
--- account/project/views/report_analyticcostledger.xml 2014-04-02 16:40:53 +0000
+++ account/project/views/report_analyticcostledger.xml 1970-01-01 00:00:00 +0000
@@ -1,90 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3<data>
4<template id="report_analyticcostledger">
5 <t t-call="report.html_container">
6 <t t-call="report.internal_layout">
7 <div class="page">
8 <h2>Cost Ledger</h2>
9
10 <div class="row mt32 mb32">
11 <div class="col-xs-3">
12 <strong>Period From:</strong>
13 <p t-esc="formatLang(data['form']['date1'], date=True)"/>
14 </div>
15 <div class="col-xs-3">
16 <strong>Period To:</strong>
17 <p t-esc="formatLang(data['form']['date2'], date=True)"/>
18 </div>
19 <div class="col-xs-3">
20 <strong>Printing Date:</strong>
21 <p t-esc="formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time=True)" />
22 </div>
23 </div>
24
25 <table class="table table-condensed">
26 <thead>
27 <tr>
28 <th>Date/Code</th>
29 <th>J.C. /Move</th>
30 <th>Name</th>
31 <th>Debit</th>
32 <th>Credit</th>
33 <th>Balance</th>
34 </tr>
35 </thead>
36 <tbody>
37 <tr style="font-weight: bold;">
38 <td>Total:</td>
39 <td></td>
40 <td></td>
41 <td><span t-esc="formatLang(sum_debit(docs, data['form']['date1'], data['form']['date2']))"/></td>
42 <td><span t-esc="formatLang(sum_credit(docs,data['form']['date1'],data['form']['date2']))"/></td>
43 <td>
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)"/>
45 </td>
46 </tr>
47
48 <t t-foreach="docs" t-as="account">
49 <tr style="font-weight: bold;">
50 <td><span t-esc="account.code"/></td>
51 <td></td>
52 <td><span t-esc="account.complete_name"/></td>
53 <td><span t-esc="formatLang(sum_debit([account], data['form']['date1'], data['form']['date2']))"/></td>
54 <td><span t-esc="formatLang(sum_credit([account], data['form']['date1'], data['form']['date2']))"/></td>
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>
56 </tr>
57
58 <t t-foreach="lines_g(account, data['form']['date1'], data['form']['date2'])" t-as="move_g">
59 <tr>
60 <td><span t-esc="move_g['code']"/></td>
61 <td></td>
62 <td><span t-esc="move_g['name']"/></td>
63 <td><span t-esc="move_g['debit']"/></td>
64 <td><span t-esc="move_g['credit']"/></td>
65 <td>
66 <span t-esc="formatLang(move_g['balance'], currency_obj=res_company.currency_id)"/>
67 </td>
68 </tr>
69 <tr t-foreach="lines_a(move_g, account, data['form']['date1'], data['form']['date2'])" t-as="move_a">
70 <td>
71 <t t-esc="formatLang(move_a['date'], date=True)"></t>
72 </td>
73 <td><span t-esc="move_a['cj']"/></td>
74 <td><span t-esc="move_a['name']"/></td>
75 <td><span t-esc="move_a['debit']"/></td>
76 <td><span t-esc="move_a['credit']"/></td>
77 <td>
78 <span t-esc="formatLang(move_a['balance'], currency_obj=res_company.currency_id)"/>
79 </td>
80 </tr>
81 </t>
82 </t>
83 </tbody>
84 </table>
85 </div>
86 </t>
87 </t>
88</template>
89</data>
90</openerp>
91\ No newline at end of file0\ No newline at end of file
921
=== removed file 'account/project/views/report_analyticcostledgerquantity.xml'
--- account/project/views/report_analyticcostledgerquantity.xml 2014-04-02 16:40:53 +0000
+++ account/project/views/report_analyticcostledgerquantity.xml 1970-01-01 00:00:00 +0000
@@ -1,87 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3<data>
4<template id="report_analyticcostledgerquantity">
5 <t t-call="report.html_container">
6 <t t-call="report.internal_layout">
7 <div class="page">
8 <h2>Cost Ledger</h2>
9
10 <div class="row mt32 mb32">
11 <div class="col-xs-3">
12 <strong>Period From:</strong>
13 <p t-esc="formatLang(data['form']['date1'], date=True)"/>
14 </div>
15 <div class="col-xs-3">
16 <strong>Period To:</strong>
17 <p t-esc="formatLang(data['form']['date2'], date=True)"/>
18 </div>
19 <div class="col-xs-3">
20 <strong>Printing Date:</strong>
21 <p t-esc="formatLang(time.strftime('%Y-%m-%d %H:%M:%S'), date_time=True)" />
22 </div>
23 </div>
24
25 <table class="table table-condensed">
26 <thead>
27 <tr>
28 <th>Date/Code</th>
29 <th>J.C./Move</th>
30 <th>Name</th>
31 <th>Quantity</th>
32 <th>Total</th>
33 </tr>
34 </thead>
35 <tbody>
36 <tr style="font-weight:bold;">
37 <td>Total:</td>
38 <td></td>
39 <td></td>
40 <td></td>
41 <td>
42 <span t-esc="sum_quantity(docs, data['form']['date1'], data['form']['date2'], data['form']['journal'])"/>
43 </td>
44 </tr>
45
46 <t t-foreach="docs" t-as="account">
47 <tr style="font-weight:bold;">
48 <td><span t-esc="account.code"/></td>
49 <td><span t-esc="account.complete_name"/></td>
50 <td></td>
51 <td>
52 <p t-if="account.quantity_max">
53 Max quantity : <span t-esc="formatLang(account.quantity_max)"/>
54 </p>
55 </td>
56 <td>
57 <span t-esc="account_sum_quantity(account.id, data['form']['date1'], data['form']['date2'], data['form']['journal'])"/>
58 </td>
59 </tr>
60
61 <t t-foreach="lines_g(account.id, data['form']['date1'], data['form']['date2'], data['form']['journal'])" t-as="move_g">
62 <tr style="font-weight:bold;">
63 <td><span t-esc="move_g['code']"/></td>
64 <td colspan="2"><span t-esc="move_g['name']"/></td>
65 <td></td>
66 <td class="text-right"><span t-esc="move_g['quantity']"/></td>
67 </tr>
68
69 <t t-foreach="lines_a(move_g['id'], account.id, data['form']['date1'], data['form']['date2'], data['form']['journal'])" t-as="move_a">
70 <tr style="font-weight:normal;">
71 <td><span t-esc="formatLang(move_a['date'], date=True)"/></td>
72 <td><span t-esc="move_a['cj']"/></td>
73 <td><span t-esc="move_a['name']"/></td>
74 <td></td>
75 <td class="text-right"><span t-esc="move_a['quantity']"/></td>
76 </tr>
77 </t>
78 </t>
79 </t>
80 </tbody>
81 </table>
82 </div>
83 </t>
84 </t>
85</template>
86</data>
87</openerp>
88\ No newline at end of file0\ No newline at end of file
891
=== removed file 'account/project/views/report_analyticjournal.xml'
--- account/project/views/report_analyticjournal.xml 2014-04-02 16:40:53 +0000
+++ account/project/views/report_analyticjournal.xml 1970-01-01 00:00:00 +0000
@@ -1,90 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3<data>
4<template id="report_analyticjournal">
5 <t t-call="report.html_container">
6 <t t-foreach="docs" t-as="o">
7 <t t-call="report.internal_layout">
8 <div class="page">
9 <h2>Analytic Journal</h2>
10
11 <div class="row mt32 mb32">
12 <div class="col-xs-3">
13 <strong>Period From:</strong>
14 <p t-esc="formatLang(data['form']['date1'], date=True)"/>
15 </div>
16 <div class="col-xs-3">
17 <strong>Period To:</strong>
18 <p t-esc="formatLang(data['form']['date2'], date=True)"/>
19 </div>
20 <div class="col-xs-3">
21 <strong>Currency:</strong>
22 <p t-field="res_company.currency_id" />
23 </div>
24 </div>
25
26 <table class="table table-condensed">
27 <thead>
28 <tr>
29 <th>Date</th>
30 <th>Code</th>
31 <th>Move Name</th>
32 <th>Account n°</th>
33 <th>General</th>
34 <th>Analytic</th>
35 </tr>
36 <tr>
37 <th colspan="4"><t t-if="o.code"><span t-esc="o.code"/></t> - <span t-esc="o.name"/></th>
38 <th><span t-esc="formatLang(sum_general(o.id, data['form']['date1'], data['form']['date2']))"/></th>
39 <th><span t-esc="formatLang(sum_analytic(o.id, data['form']['date1'], data['form']['date2']))"/></th>
40 </tr>
41 </thead>
42 <tbody>
43 <t t-foreach="lines(o.id, data['form']['date1'], data['form']['date2'])" t-as="move">
44 <tr>
45 <td></td>
46 <td></td>
47 <td>
48 <span t-esc="move.name"/>
49 </td>
50 <td>
51 <span t-esc="move.account_id.code"/>
52 <span t-esc="move.account_id.name"/>
53 </td>
54 <td>
55 <span t-esc="formatLang(move.debit-move.credit)"/>
56 </td>
57 <td></td>
58 </tr>
59 <tr t-foreach="lines_a(move.id, o.id, data['form']['date1'], data['form']['date2'])" t-as="move_a">
60 <td>
61 <span t-esc="formatLang(move_a.date,date = True)"/>
62 </td>
63 <td>
64 <p t-if="move_a.code"><span t-esc="move_a.code"/></p>
65 </td>
66 <td>
67 <span t-esc="move_a.name"/>
68 </td>
69 <td><span t-esc="move_a.account_id.code"/> - <span t-esc="move_a.account_id.name"/></td>
70 <td></td>
71 <td><span t-esc="formatLang(move_a.amount)"/></td>
72 </tr>
73 </t>
74 <tr t-foreach="lines_a(False, o.id, data['form']['date1'], data['form']['date2'])" t-as="move_a">
75 <td><span t-esc="formatLang(move_a.date,date = True)"/></td>
76 <td><p t-if="move_a.code"><span t-esc="move_a.code"/></p></td>
77 <td><span t-esc="move_a.name"/></td>
78 <td><span t-esc="move_a.account_id.code"/> - <span t-esc="move_a.account_id.name"/></td>
79 <td></td>
80 <td><span t-esc="formatLang(move_a.amount)"/></td>
81 </tr>
82 </tbody>
83 </table>
84 </div>
85 </t>
86 </t>
87 </t>
88</template>
89</data>
90</openerp>
910
=== removed file 'account/project/views/report_invertedanalyticbalance.xml'
--- account/project/views/report_invertedanalyticbalance.xml 2014-04-02 16:40:53 +0000
+++ account/project/views/report_invertedanalyticbalance.xml 1970-01-01 00:00:00 +0000
@@ -1,91 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3<data>
4<template id="report_invertedanalyticbalance">
5 <t t-call="report.html_container">
6 <t t-call="report.internal_layout">
7 <div class="page">
8 <h2>Inverted Analytic Balance - <span t-esc="res_company.currency_id.name"/></h2>
9
10 <table class="table table-condensed">
11 <thead>
12 <tr>
13 <th>Code</th>
14 <th>Account Name</th>
15 <th>Debit</th>
16 <th>Credit</th>
17 <th>Balance</th>
18 <th>Quantity</th>
19 </tr>
20 </thead>
21 <tbody>
22 <tr>
23 <td><strong>Total</strong></td>
24 <td></td>
25 <td><strong t-esc="formatLang(sum_debit(docs, data['form']['date1'], data['form']['date2']))"/></td>
26 <td><strong t-esc="formatLang(sum_credit(docs, data['form']['date1'], data['form']['date2']))"/></td>
27 <td>
28 <strong t-esc="formatLang(sum_balance(docs, data['form']['date1'], data['form']['date2']), currency_obj=res_company.currency_id)"/>
29 </td>
30 <td><strong><span t-esc="formatLang(sum_quantity(docs, data['form']['date1'], data['form']['date2']))"/></strong></td>
31 </tr>
32 <t t-foreach="lines_g(docs, data['form']['date1'], data['form']['date2'])" t-as="move_g">
33 <tr>
34 <td>
35 <strong t-esc="move_g['code']"/>
36 </td>
37 <td>
38 <strong t-esc="move_g['name']"/>
39 </td>
40 <td class="text-right">
41 <strong>
42 <span t-esc="formatLang(move_g['debit'])"/>
43 </strong>
44 </td>
45 <td class="text-right">
46 <strong>
47 <span t-esc="formatLang(move_g['credit'])"/>
48 </strong>
49 </td>
50 <td class="text-right">
51 <strong>
52 <span t-esc="formatLang(move_g['balance'], currency_obj = res_company.currency_id)"/>
53 </strong>
54 </td>
55 <td class="text-right">
56 <strong>
57 <span t-esc="formatLang(move_g['quantity'])"/>
58 </strong>
59 </td>
60 </tr>
61 <t t-foreach="lines_a(docs, move_g['id'], data['form']['date1'], data['form']['date2'])" t-as="move_a">
62 <tr>
63 <td>
64 <span t-esc="move_a['code']"/>
65 </td>
66 <td>
67 <span t-esc="move_a['complete_name']"/>
68 </td>
69 <td class="text-right">
70 <span t-esc="formatLang(move_a['debit'])"/>
71 </td>
72 <td class="text-right">
73 <span t-esc="formatLang(move_a['credit'])"/>
74 </td>
75 <td class="text-right">
76 <span t-esc="formatLang(move_a['balance'], currency_obj = res_company.currency_id)"/>
77 </td>
78 <td class="text-right">
79 <span t-esc="formatLang(move_a['quantity'])"/>
80 </td>
81 </tr>
82 </t>
83 </t>
84 </tbody>
85 </table>
86 </div>
87 </t>
88 </t>
89</template>
90</data>
91</openerp>
920
=== removed directory 'account/project/wizard'
=== removed file 'account/project/wizard/__init__.py'
--- account/project/wizard/__init__.py 2011-01-14 00:11:01 +0000
+++ account/project/wizard/__init__.py 1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import account_analytic_journal_report
23import account_analytic_balance_report
24import account_analytic_inverted_balance_report
25import account_analytic_cost_ledger_report
26import account_analytic_cost_ledger_for_journal_report
27import project_account_analytic_line
28import account_analytic_chart
29
30# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
310
=== removed file 'account/project/wizard/account_analytic_balance_report.py'
--- account/project/wizard/account_analytic_balance_report.py 2014-03-27 18:25:20 +0000
+++ account/project/wizard/account_analytic_balance_report.py 1970-01-01 00:00:00 +0000
@@ -1,55 +0,0 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import time
23from openerp.osv import fields, osv
24
25
26class account_analytic_balance(osv.osv_memory):
27 _name = 'account.analytic.balance'
28 _description = 'Account Analytic Balance'
29
30 _columns = {
31 'date1': fields.date('Start of period', required=True),
32 'date2': fields.date('End of period', required=True),
33 'empty_acc': fields.boolean('Empty Accounts ? ', help='Check if you want to display Accounts with 0 balance too.'),
34 }
35
36 _defaults = {
37 'date1': lambda *a: time.strftime('%Y-01-01'),
38 'date2': lambda *a: time.strftime('%Y-%m-%d')
39 }
40
41 def check_report(self, cr, uid, ids, context=None):
42 if context is None:
43 context = {}
44 data = self.read(cr, uid, ids)[0]
45 datas = {
46 'ids': context.get('active_ids', []),
47 'model': 'account.analytic.account',
48 'form': data
49 }
50
51 datas['form']['active_ids'] = context.get('active_ids', False)
52
53 return self.pool['report'].get_action(cr, uid, ids, 'account.report_analyticbalance', data=datas, context=context)
54
55# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
560
=== removed file 'account/project/wizard/account_analytic_balance_report_view.xml'
--- account/project/wizard/account_analytic_balance_report_view.xml 2012-11-29 22:26:45 +0000
+++ account/project/wizard/account_analytic_balance_report_view.xml 1970-01-01 00:00:00 +0000
@@ -1,46 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5 <record id="account_analytic_balance_view" model="ir.ui.view">
6 <field name="name">Account Analytic Balance</field>
7 <field name="model">account.analytic.balance</field>
8 <field name="arch" type="xml">
9 <form string="Select Period" version="7.0">
10 <header>
11 <button name="check_report" string="Print" type="object" class="oe_highlight"/>
12 or
13 <button string="Cancel" class="oe_link" special="cancel"/>
14 </header>
15 <group col="4">
16 <field name="date1"/>
17 <field name="date2"/>
18 <newline/>
19 <field name="empty_acc"/>
20 </group>
21 </form>
22 </field>
23 </record>
24
25 <record id="action_account_analytic_balance" model="ir.actions.act_window">
26 <field name="name">Analytic Balance</field>
27 <field name="type">ir.actions.act_window</field>
28 <field name="res_model">account.analytic.balance</field>
29 <field name="view_type">form</field>
30 <field name="view_mode">form</field>
31 <field name="view_id" ref="account_analytic_balance_view"/>
32 <field name="target">new</field>
33 </record>
34
35 <record model="ir.values" id="account_analytic_balance_values">
36 <field name="model_id" ref="analytic.model_account_analytic_account" />
37 <field name="name">Account Analytic Balance</field>
38 <field name="key2">client_print_multi</field>
39 <field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_analytic_balance'))" />
40 <field name="key">action</field>
41 <field name="model">account.analytic.account</field>
42 </record>
43
44 </data>
45</openerp>
46
470
=== removed file 'account/project/wizard/account_analytic_chart.py'
--- account/project/wizard/account_analytic_chart.py 2013-10-27 12:31:04 +0000
+++ account/project/wizard/account_analytic_chart.py 1970-01-01 00:00:00 +0000
@@ -1,49 +0,0 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21from openerp.osv import fields, osv
22
23class account_analytic_chart(osv.osv_memory):
24 _name = 'account.analytic.chart'
25 _description = 'Account Analytic Chart'
26
27 _columns = {
28 'from_date': fields.date('From'),
29 'to_date': fields.date('To'),
30 }
31
32 def analytic_account_chart_open_window(self, cr, uid, ids, context=None):
33 mod_obj = self.pool.get('ir.model.data')
34 act_obj = self.pool.get('ir.actions.act_window')
35 result_context = {}
36 if context is None:
37 context = {}
38 result = mod_obj.get_object_reference(cr, uid, 'account', 'action_account_analytic_account_tree2')
39 id = result and result[1] or False
40 result = act_obj.read(cr, uid, [id], context=context)[0]
41 data = self.read(cr, uid, ids, [])[0]
42 if data['from_date']:
43 result_context.update({'from_date': data['from_date']})
44 if data['to_date']:
45 result_context.update({'to_date': data['to_date']})
46 result['context'] = str(result_context)
47 return result
48
49# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
500
=== removed file 'account/project/wizard/account_analytic_chart_view.xml'
--- account/project/wizard/account_analytic_chart_view.xml 2014-02-10 05:26:55 +0000
+++ account/project/wizard/account_analytic_chart_view.xml 1970-01-01 00:00:00 +0000
@@ -1,43 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5 <record id="account_analytic_chart_view" model="ir.ui.view">
6 <field name="name">Chart of Analytic Accounts</field>
7 <field name="model">account.analytic.chart</field>
8 <field name="arch" type="xml">
9 <form string="Analytic Account Charts" version="7.0">
10 <group string="Select the Period for Analysis" col="4">
11 <field name="from_date"/>
12 <field name="to_date"/>
13 <label string="(Keep empty to open the current situation)" colspan="4"/>
14 </group>
15 <footer>
16 <button name="analytic_account_chart_open_window" string="Open Charts" type="object" class="oe_highlight"/>
17 or
18 <button string="Cancel" class="oe_link" special="cancel"/>
19 </footer>
20 </form>
21 </field>
22 </record>
23
24 <record id="action_account_analytic_chart" model="ir.actions.act_window">
25 <field name="name">Chart of Analytic Accounts</field>
26 <field name="type">ir.actions.act_window</field>
27 <field name="res_model">account.analytic.chart</field>
28 <field name="view_type">form</field>
29 <field name="view_mode">form</field>
30 <field name="view_id" ref="account_analytic_chart_view"/>
31 <field name="target">new</field>
32 </record>
33
34 <menuitem
35 name="Chart of Analytic Accounts"
36 parent="account.menu_finance_charts"
37 action="action_account_analytic_chart"
38 id="menu_action_analytic_account_tree2"
39 icon="STOCK_INDENT"
40 groups="analytic.group_analytic_accounting"/>
41
42 </data>
43</openerp>
440
=== removed file 'account/project/wizard/account_analytic_cost_ledger_for_journal_report.py'
--- account/project/wizard/account_analytic_cost_ledger_for_journal_report.py 2014-04-02 16:40:53 +0000
+++ account/project/wizard/account_analytic_cost_ledger_for_journal_report.py 1970-01-01 00:00:00 +0000
@@ -1,54 +0,0 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import time
23from openerp.osv import fields, osv
24
25
26class account_analytic_cost_ledger_journal_report(osv.osv_memory):
27 _name = 'account.analytic.cost.ledger.journal.report'
28 _description = 'Account Analytic Cost Ledger For Journal Report'
29
30 _columns = {
31 'date1': fields.date('Start of period', required=True),
32 'date2': fields.date('End of period', required=True),
33 'journal': fields.many2many('account.analytic.journal', 'ledger_journal_rel', 'ledger_id', 'journal_id', 'Journals'),
34 }
35
36 _defaults = {
37 'date1': lambda *a: time.strftime('%Y-01-01'),
38 'date2': lambda *a: time.strftime('%Y-%m-%d')
39 }
40
41 def check_report(self, cr, uid, ids, context=None):
42 if context is None:
43 context = {}
44 data = self.read(cr, uid, ids)[0]
45 datas = {
46 'ids': context.get('active_ids', []),
47 'model': 'account.analytic.account',
48 'form': data
49 }
50
51 datas['form']['active_ids'] = context.get('active_ids', False)
52 return self.pool['report'].get_action(cr, uid, ids, 'account.report_analyticcostledgerquantity', data=datas, context=context)
53
54# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
550
=== removed file 'account/project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml'
--- account/project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml 2012-11-29 22:26:45 +0000
+++ account/project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml 1970-01-01 00:00:00 +0000
@@ -1,44 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5 <record id="account_analytic_cost_ledger_journal_view" model="ir.ui.view">
6 <field name="name">Account Analytic Cost Ledger Journal</field>
7 <field name="model">account.analytic.cost.ledger.journal.report</field>
8 <field name="arch" type="xml">
9 <form string="Select period" version="7.0">
10 <header>
11 <button name="check_report" string="Print" type="object" class="oe_highlight"/>
12 or
13 <button string="Cancel" class="oe_link" special="cancel"/>
14 </header>
15 <group string="Cost Ledger for Period" col="4">
16 <field name="date1"/>
17 <field name="date2"/>
18 <field name="journal" colspan="4"/>
19 </group>
20 </form>
21 </field>
22 </record>
23
24 <record id="action_account_analytic_cost_ledger_journal" model="ir.actions.act_window">
25 <field name="name">Cost Ledger (Only quantities)</field>
26 <field name="type">ir.actions.act_window</field>
27 <field name="res_model">account.analytic.cost.ledger.journal.report</field>
28 <field name="view_type">form</field>
29 <field name="view_mode">form</field>
30 <field name="view_id" ref="account_analytic_cost_ledger_journal_view"/>
31 <field name="target">new</field>
32 </record>
33
34 <record model="ir.values" id="account_analytic_cost_ledger_journal_values">
35 <field name="model_id" ref="analytic.model_account_analytic_account" />
36 <field name="name">Account Analytic Cost Ledger Journal</field>
37 <field name="key2">client_print_multi</field>
38 <field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_analytic_cost_ledger_journal'))" />
39 <field name="key">action</field>
40 <field name="model">account.analytic.account</field>
41 </record>
42
43 </data>
44</openerp>
450
=== removed file 'account/project/wizard/account_analytic_cost_ledger_report.py'
--- account/project/wizard/account_analytic_cost_ledger_report.py 2014-03-27 18:25:20 +0000
+++ account/project/wizard/account_analytic_cost_ledger_report.py 1970-01-01 00:00:00 +0000
@@ -1,54 +0,0 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import time
23from openerp.osv import osv, fields
24
25
26class account_analytic_cost_ledger(osv.osv_memory):
27 _name = 'account.analytic.cost.ledger'
28 _description = 'Account Analytic Cost Ledger'
29
30 _columns = {
31 'date1': fields.date('Start of period', required=True),
32 'date2': fields.date('End of period', required=True),
33 }
34
35 _defaults = {
36 'date1': lambda *a: time.strftime('%Y-01-01'),
37 'date2': lambda *a: time.strftime('%Y-%m-%d')
38 }
39
40 def check_report(self, cr, uid, ids, context=None):
41 if context is None:
42 context = {}
43 data = self.read(cr, uid, ids)[0]
44 datas = {
45 'ids': context.get('active_ids',[]),
46 'model': 'account.analytic.account',
47 'form': data
48 }
49
50 datas['form']['active_ids'] = context.get('active_ids', False)
51
52 return self.pool['report'].get_action(cr, uid, ids, 'account.report_analyticcostledger', data=datas, context=context)
53
54# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
550
=== removed file 'account/project/wizard/account_analytic_cost_ledger_view.xml'
--- account/project/wizard/account_analytic_cost_ledger_view.xml 2012-11-29 22:26:45 +0000
+++ account/project/wizard/account_analytic_cost_ledger_view.xml 1970-01-01 00:00:00 +0000
@@ -1,43 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5 <record id="account_analytic_cost_view" model="ir.ui.view">
6 <field name="name">Account Analytic Check</field>
7 <field name="model">account.analytic.cost.ledger</field>
8 <field name="arch" type="xml">
9 <form string="Select Period" version="7.0">
10 <header>
11 <button name="check_report" string="Print" type="object" class="oe_highlight"/>
12 or
13 <button string="Cancel" class="oe_link" special="cancel"/>
14 </header>
15 <group col="4">
16 <field name="date1"/>
17 <field name="date2"/>
18 </group>
19 </form>
20 </field>
21 </record>
22
23 <record id="action_account_analytic_cost" model="ir.actions.act_window">
24 <field name="name">Cost Ledger</field>
25 <field name="type">ir.actions.act_window</field>
26 <field name="res_model">account.analytic.cost.ledger</field>
27 <field name="view_type">form</field>
28 <field name="view_mode">form</field>
29 <field name="view_id" ref="account_analytic_cost_view"/>
30 <field name="target">new</field>
31 </record>
32
33 <record model="ir.values" id="account_analytic_cost_values">
34 <field name="model_id" ref="analytic.model_account_analytic_account" />
35 <field name="name">Account Analytic Cost</field>
36 <field name="key2">client_print_multi</field>
37 <field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_analytic_cost'))" />
38 <field name="key">action</field>
39 <field name="model">account.analytic.account</field>
40 </record>
41
42 </data>
43</openerp>
440
=== removed file 'account/project/wizard/account_analytic_inverted_balance_report.py'
--- account/project/wizard/account_analytic_inverted_balance_report.py 2014-04-02 16:40:53 +0000
+++ account/project/wizard/account_analytic_inverted_balance_report.py 1970-01-01 00:00:00 +0000
@@ -1,52 +0,0 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import time
23from openerp.osv import fields, osv
24
25
26class account_analytic_inverted_balance(osv.osv_memory):
27 _name = 'account.analytic.inverted.balance'
28 _description = 'Account Analytic Inverted Balance'
29
30 _columns = {
31 'date1': fields.date('Start of period', required=True),
32 'date2': fields.date('End of period', required=True),
33 }
34
35 _defaults = {
36 'date1': lambda *a: time.strftime('%Y-01-01'),
37 'date2': lambda *a: time.strftime('%Y-%m-%d')
38 }
39
40 def check_report(self, cr, uid, ids, context=None):
41 if context is None:
42 context = {}
43 data = self.read(cr, uid, ids)[0]
44 datas = {
45 'ids': context.get('active_ids', []),
46 'model': 'account.analytic.account',
47 'form': data
48 }
49 datas['form']['active_ids'] = context.get('active_ids', False)
50 return self.pool['report'].get_action(cr, uid, ids, 'account.report_invertedanalyticbalance', data=datas, context=context)
51
52# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
530
=== removed file 'account/project/wizard/account_analytic_inverted_balance_report.xml'
--- account/project/wizard/account_analytic_inverted_balance_report.xml 2012-11-29 22:26:45 +0000
+++ account/project/wizard/account_analytic_inverted_balance_report.xml 1970-01-01 00:00:00 +0000
@@ -1,43 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5 <record id="account_analytic_invert_balance_view" model="ir.ui.view">
6 <field name="name">Account Analytic Inverted Balance</field>
7 <field name="model">account.analytic.inverted.balance</field>
8 <field name="arch" type="xml">
9 <form string="Select Period" version="7.0">
10 <header>
11 <button name="check_report" string="Print" type="object" class="oe_highlight"/>
12 or
13 <button string="Cancel" class="oe_link" special="cancel"/>
14 </header>
15 <group col="4">
16 <field name="date1"/>
17 <field name="date2"/>
18 </group>
19 </form>
20 </field>
21 </record>
22
23 <record id="action_account_analytic_invert_balance" model="ir.actions.act_window">
24 <field name="name">Inverted Analytic Balance</field>
25 <field name="type">ir.actions.act_window</field>
26 <field name="res_model">account.analytic.inverted.balance</field>
27 <field name="view_type">form</field>
28 <field name="view_mode">form</field>
29 <field name="view_id" ref="account_analytic_invert_balance_view"/>
30 <field name="target">new</field>
31 </record>
32
33 <record model="ir.values" id="account_analytic_invert_balance_values">
34 <field name="model_id" ref="analytic.model_account_analytic_account" />
35 <field name="name">Account Analytic Inverted Balance</field>
36 <field name="key2">client_print_multi</field>
37 <field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_analytic_invert_balance'))" />
38 <field name="key">action</field>
39 <field name="model">account.analytic.account</field>
40 </record>
41
42 </data>
43</openerp>
440
=== removed file 'account/project/wizard/account_analytic_journal_report.py'
--- account/project/wizard/account_analytic_journal_report.py 2014-04-03 15:48:56 +0000
+++ account/project/wizard/account_analytic_journal_report.py 1970-01-01 00:00:00 +0000
@@ -1,74 +0,0 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import time
23from openerp.osv import fields, osv
24
25
26class account_analytic_journal_report(osv.osv_memory):
27 _name = 'account.analytic.journal.report'
28 _description = 'Account Analytic Journal'
29
30 _columns = {
31 'date1': fields.date('Start of period', required=True),
32 'date2': fields.date('End of period', required=True),
33 'analytic_account_journal_id': fields.many2many('account.analytic.journal', 'account_analytic_journal_name', 'journal_line_id', 'journal_print_id', 'Analytic Journals', required=True),
34 }
35
36 _defaults = {
37 'date1': lambda *a: time.strftime('%Y-01-01'),
38 'date2': lambda *a: time.strftime('%Y-%m-%d')
39 }
40
41 def check_report(self, cr, uid, ids, context=None):
42 if context is None:
43 context = {}
44 data = self.read(cr, uid, ids)[0]
45 ids_list = []
46 if context.get('active_id',False):
47 ids_list.append(context.get('active_id',False))
48 else:
49 record = self.browse(cr,uid,ids[0],context=context)
50 for analytic_record in record.analytic_account_journal_id:
51 ids_list.append(analytic_record.id)
52 datas = {
53 'ids': ids_list,
54 'model': 'account.analytic.journal',
55 'form': data
56 }
57 context2 = context.copy()
58 context2['active_model'] = 'account.analytic.journal'
59 context2['active_ids'] = ids_list
60 return self.pool['report'].get_action(cr, uid, ids, 'account.report_analyticjournal', data=datas, context=context2)
61
62 def default_get(self, cr, uid, fields, context=None):
63 if context is None:
64 context = {}
65 res = super(account_analytic_journal_report, self).default_get(cr, uid, fields, context=context)
66 if not context.has_key('active_ids'):
67 journal_ids = self.pool.get('account.analytic.journal').search(cr, uid, [], context=context)
68 else:
69 journal_ids = context.get('active_ids')
70 if 'analytic_account_journal_id' in fields:
71 res.update({'analytic_account_journal_id': journal_ids})
72 return res
73
74# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
750
=== removed file 'account/project/wizard/account_analytic_journal_report_view.xml'
--- account/project/wizard/account_analytic_journal_report_view.xml 2012-11-29 22:26:45 +0000
+++ account/project/wizard/account_analytic_journal_report_view.xml 1970-01-01 00:00:00 +0000
@@ -1,51 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5 <record id="account_analytic_journal_view" model="ir.ui.view">
6 <field name="name">Account Analytic Journal</field>
7 <field name="model">account.analytic.journal.report</field>
8 <field name="arch" type="xml">
9 <form string="Select Period" version="7.0">
10 <group col="4">
11 <field name="date1"/>
12 <field name="date2"/>
13 <field name="analytic_account_journal_id" widget="many2many_tags" class="oe_inline" required="1" colspan="4"/>
14 </group>
15 <footer>
16 <button name="check_report" string="Print" type="object" class="oe_highlight"/>
17 or
18 <button string="Cancel" class="oe_link" special="cancel"/>
19 </footer>
20 </form>
21 </field>
22 </record>
23
24 <record id="action_account_analytic_journal" model="ir.actions.act_window">
25 <field name="name">Analytic Journal</field>
26 <field name="type">ir.actions.act_window</field>
27 <field name="res_model">account.analytic.journal.report</field>
28 <field name="view_type">form</field>
29 <field name="view_mode">form</field>
30 <field name="view_id" ref="account_analytic_journal_view"/>
31 <field name="target">new</field>
32 </record>
33
34 <record model="ir.values" id="account_analytic_journal_values">
35 <field name="model_id" ref="account.model_account_analytic_journal" />
36 <field name="name">Account Analytic Journal</field>
37 <field name="key2">client_print_multi</field>
38 <field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_analytic_journal'))" />
39 <field name="key">action</field>
40 <field name="model">account.analytic.journal</field>
41 </record>
42
43 <menuitem groups="analytic.group_analytic_accounting" id="next_id_40"
44 name="Analytic" parent="account.menu_finance_generic_reporting"
45 sequence="4"/>
46 <menuitem groups="analytic.group_analytic_accounting"
47 action="account.action_account_analytic_journal"
48 id="account_analytic_journal_print" parent="account.next_id_40"/>
49
50 </data>
51</openerp>
520
=== removed file 'account/project/wizard/project_account_analytic_line.py'
--- account/project/wizard/project_account_analytic_line.py 2013-10-27 12:31:04 +0000
+++ account/project/wizard/project_account_analytic_line.py 1970-01-01 00:00:00 +0000
@@ -1,57 +0,0 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21from openerp.osv import fields, osv
22from openerp.tools.translate import _
23
24class project_account_analytic_line(osv.osv_memory):
25 _name = "project.account.analytic.line"
26 _description = "Analytic Entries by line"
27 _columns = {
28 'from_date': fields.date('From'),
29 'to_date': fields.date('To'),
30 }
31
32 def action_open_window(self, cr, uid, ids, context=None):
33 mod_obj =self.pool.get('ir.model.data')
34 domain = []
35 data = self.read(cr, uid, ids, [])[0]
36 from_date = data['from_date']
37 to_date = data['to_date']
38 if from_date and to_date:
39 domain = [('date','>=',from_date), ('date','<=',to_date)]
40 elif from_date:
41 domain = [('date','>=',from_date)]
42 elif to_date:
43 domain = [('date','<=',to_date)]
44 result = mod_obj.get_object_reference(cr, uid, 'account', 'view_account_analytic_line_filter')
45 id = result and result[1] or False
46 return {
47 'name': _('Analytic Entries by line'),
48 'view_type': 'form',
49 "view_mode": 'tree,form',
50 'res_model': 'account.analytic.line',
51 'type': 'ir.actions.act_window',
52 'domain': domain,
53 'search_view_id': id['res_id'],
54 }
55
56
57# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
580
=== removed file 'account/project/wizard/project_account_analytic_line_view.xml'
--- account/project/wizard/project_account_analytic_line_view.xml 2012-11-29 22:26:45 +0000
+++ account/project/wizard/project_account_analytic_line_view.xml 1970-01-01 00:00:00 +0000
@@ -1,34 +0,0 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5 <record id="view_project_account_analytic_line_form" model="ir.ui.view">
6 <field name="name">project.account.analytic.line.form</field>
7 <field name="model">project.account.analytic.line</field>
8 <field name="arch" type="xml">
9 <form string="View Account Analytic Lines" version="7.0">
10 <header>
11 <button string="Open Entries" name="action_open_window" type="object" class="oe_highlight"/>
12 or
13 <button string="Cancel" class="oe_link" special="cancel"/>
14 </header>
15 <group col="4">
16 <field name="from_date"/>
17 <field name="to_date"/>
18 </group>
19 <label string ="(Keep empty to open the current situation)" />
20 </form>
21 </field>
22 </record>
23
24 <record id="action_project_account_analytic_line_form" model="ir.actions.act_window">
25 <field name="name">Entries By Line</field>
26 <field name="res_model">project.account.analytic.line</field>
27 <field name="view_type">form</field>
28 <field name="view_mode">tree,form</field>
29 <field name="view_id" ref="view_project_account_analytic_line_form"/>
30 <field name="target">new</field>
31 </record>
32
33 </data>
34</openerp>
350
=== modified file 'account/report/account_analytic_entries_report.py'
--- account/report/account_analytic_entries_report.py 2014-01-29 16:03:48 +0000
+++ account/report/account_analytic_entries_report.py 2014-04-28 09:41:45 +0000
@@ -33,8 +33,8 @@
33 'partner_id': fields.many2one('res.partner', 'Partner'),33 'partner_id': fields.many2one('res.partner', 'Partner'),
34 'company_id': fields.many2one('res.company', 'Company', required=True),34 'company_id': fields.many2one('res.company', 'Company', required=True),
35 'currency_id': fields.many2one('res.currency', 'Currency', required=True),35 'currency_id': fields.many2one('res.currency', 'Currency', required=True),
36 'account_id': fields.many2one('account.analytic.account', 'Account', required=False),36 'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=False),
37 'general_account_id': fields.many2one('account.account', 'General Account', required=True),37 'general_account_id': fields.many2one('account.account', 'Financial Account', required=True),
38 'journal_id': fields.many2one('account.analytic.journal', 'Journal', required=True),38 'journal_id': fields.many2one('account.analytic.journal', 'Journal', required=True),
39 'move_id': fields.many2one('account.move.line', 'Move', required=True),39 'move_id': fields.many2one('account.move.line', 'Move', required=True),
40 'product_id': fields.many2one('product.product', 'Product', required=True),40 'product_id': fields.many2one('product.product', 'Product', required=True),
4141
=== modified file 'account/report/account_analytic_entries_report_view.xml'
--- account/report/account_analytic_entries_report_view.xml 2014-01-29 16:03:48 +0000
+++ account/report/account_analytic_entries_report_view.xml 2014-04-28 09:41:45 +0000
@@ -14,8 +14,8 @@
14 <group expand="0" string="Group By...">14 <group expand="0" string="Group By...">
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'}"/>
16 <filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id'}"/>16 <filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id'}"/>
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"/>
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'}"/>
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'}"/>
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'}"/>
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'}"/>
2222
=== modified file 'account/security/account_security.xml'
--- account/security/account_security.xml 2013-10-27 12:31:04 +0000
+++ account/security/account_security.xml 2014-04-28 09:41:45 +0000
@@ -64,7 +64,7 @@
6464
65 <record id="analytic_journal_comp_rule" model="ir.rule">65 <record id="analytic_journal_comp_rule" model="ir.rule">
66 <field name="name">Analytic journal multi-company</field>66 <field name="name">Analytic journal multi-company</field>
67 <field name="model_id" ref="model_account_analytic_journal"/>67 <field name="model_id" ref="analytic.model_account_analytic_journal"/>
68 <field name="global" eval="True"/>68 <field name="global" eval="True"/>
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>
70 </record>70 </record>
7171
=== modified file 'account/security/ir.model.access.csv'
--- account/security/ir.model.access.csv 2013-10-27 12:31:04 +0000
+++ account/security/ir.model.access.csv 2014-04-28 09:41:45 +0000
@@ -24,8 +24,8 @@
24access_account_bank_statement_line,account.bank.statement.line,model_account_bank_statement_line,account.group_account_user,1,1,1,124access_account_bank_statement_line,account.bank.statement.line,model_account_bank_statement_line,account.group_account_user,1,1,1,1
25access_account_analytic_line_manager,account.analytic.line manager,model_account_analytic_line,account.group_account_manager,1,0,0,025access_account_analytic_line_manager,account.analytic.line manager,model_account_analytic_line,account.group_account_manager,1,0,0,0
26access_account_analytic_account,account.analytic.account,analytic.model_account_analytic_account,base.group_user,1,0,0,026access_account_analytic_account,account.analytic.account,analytic.model_account_analytic_account,base.group_user,1,0,0,0
27access_account_analytic_journal,account.analytic.journal,model_account_analytic_journal,account.group_account_user,1,0,0,027access_account_analytic_journal,account.analytic.journal,analytic.model_account_analytic_journal,account.group_account_user,1,0,0,0
28access_account_analytic_journal_user,account.analytic.journal,model_account_analytic_journal,base.group_user,1,1,1,028access_account_analytic_journal_user,account.analytic.journal,analytic.model_account_analytic_journal,base.group_user,1,1,1,0
29access_account_invoice_uinvoice,account.invoice,model_account_invoice,account.group_account_invoice,1,1,1,129access_account_invoice_uinvoice,account.invoice,model_account_invoice,account.group_account_invoice,1,1,1,1
30access_account_invoice_line_uinvoice,account.invoice.line,model_account_invoice_line,account.group_account_invoice,1,1,1,130access_account_invoice_line_uinvoice,account.invoice.line,model_account_invoice_line,account.group_account_invoice,1,1,1,1
31access_account_invoice_tax_uinvoice,account.invoice.tax,model_account_invoice_tax,account.group_account_invoice,1,1,1,131access_account_invoice_tax_uinvoice,account.invoice.tax,model_account_invoice_tax,account.group_account_invoice,1,1,1,1
@@ -41,7 +41,7 @@
41access_account_period_manager,account.period,model_account_period,account.group_account_manager,1,1,1,141access_account_period_manager,account.period,model_account_period,account.group_account_manager,1,1,1,1
42access_account_period_invoice,account.period invoice,model_account_period,account.group_account_invoice,1,0,0,042access_account_period_invoice,account.period invoice,model_account_period,account.group_account_invoice,1,0,0,0
43access_account_invoice_group_invoice,account.invoice group invoice,model_account_invoice,account.group_account_invoice,1,1,1,143access_account_invoice_group_invoice,account.invoice group invoice,model_account_invoice,account.group_account_invoice,1,1,1,1
44access_account_analytic_journal_manager,account.analytic.journal,model_account_analytic_journal,account.group_account_manager,1,1,1,144access_account_analytic_journal_manager,account.analytic.journal,analytic.model_account_analytic_journal,account.group_account_manager,1,1,1,1
45access_account_fiscalyear,account.fiscalyear,model_account_fiscalyear,account.group_account_manager,1,1,1,145access_account_fiscalyear,account.fiscalyear,model_account_fiscalyear,account.group_account_manager,1,1,1,1
46access_account_fiscalyear_invoice,account.fiscalyear.invoice,model_account_fiscalyear,account.group_account_invoice,1,0,0,046access_account_fiscalyear_invoice,account.fiscalyear.invoice,model_account_fiscalyear,account.group_account_invoice,1,0,0,0
47access_account_fiscalyear_partner_manager,account.fiscalyear.partnermanager,model_account_fiscalyear,base.group_partner_manager,1,0,0,047access_account_fiscalyear_partner_manager,account.fiscalyear.partnermanager,model_account_fiscalyear,base.group_partner_manager,1,0,0,0
4848
=== modified file 'account/test/account_fiscalyear_close.yml'
--- account/test/account_fiscalyear_close.yml 2013-11-27 15:32:57 +0000
+++ account/test/account_fiscalyear_close.yml 2014-04-28 09:41:45 +0000
@@ -34,7 +34,7 @@
34 name: End of Year34 name: End of Year
35 code: NEW35 code: NEW
36 type: situation36 type: situation
37 analytic_journal_id: sit37 analytic_journal_id: analytic.sit
38 default_debit_account_id: cash38 default_debit_account_id: cash
39 default_credit_account_id: cash39 default_credit_account_id: cash
40 company_id: base.main_company40 company_id: base.main_company
4141
=== modified file 'account/test/account_report.yml'
--- account/test/account_report.yml 2014-04-02 16:40:53 +0000
+++ account/test/account_report.yml 2014-04-28 09:41:45 +0000
@@ -135,47 +135,47 @@
135-135-
136 !python {model: account.analytic.account}: |136 !python {model: account.analytic.account}: |
137 ctx={}137 ctx={}
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')]})
139 data_dict = {}139 data_dict = {}
140 from openerp.tools import test_reports140 from openerp.tools import test_reports
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')
142142
143-143-
144 Print the Cost Ledger Report through the wizard144 Print the Cost Ledger Report through the wizard
145-145-
146 !python {model: account.analytic.account}: |146 !python {model: account.analytic.account}: |
147 ctx={}147 ctx={}
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')]})
149 data_dict = {}149 data_dict = {}
150 from openerp.tools import test_reports150 from openerp.tools import test_reports
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')
152152
153-153-
154 Print the Cost Ledger(Only Quantities) Report through the wizard154 Print the Cost Ledger(Only Quantities) Report through the wizard
155-155-
156 !python {model: account.analytic.account}: |156 !python {model: account.analytic.account}: |
157 ctx={}157 ctx={}
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')]})
159 data_dict = {}159 data_dict = {}
160 from openerp.tools import test_reports160 from openerp.tools import test_reports
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')
162162
163-163-
164 Print the Analytic Journal Report through the wizard164 Print the Analytic Journal Report through the wizard
165-165-
166 !python {model: account.analytic.journal}: |166 !python {model: account.analytic.journal}: |
167 ctx={}167 ctx={}
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')]})
169 data_dict = {}169 data_dict = {}
170 from openerp.tools import test_reports170 from openerp.tools import test_reports
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')
172172
173-173-
174 Print the Inverted Analytic Balance Report through the wizard174 Print the Inverted Analytic Balance Report through the wizard
175-175-
176 !python {model: account.analytic.account}: |176 !python {model: account.analytic.account}: |
177 ctx={}177 ctx={}
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')]})
179 data_dict = {}179 data_dict = {}
180 from openerp.tools import test_reports180 from openerp.tools import test_reports
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')
182182
=== modified file 'account_analytic_analysis/account_analytic_analysis_view.xml'
--- account_analytic_analysis/account_analytic_analysis_view.xml 2014-04-01 12:36:57 +0000
+++ account_analytic_analysis/account_analytic_analysis_view.xml 2014-04-28 09:41:45 +0000
@@ -197,7 +197,7 @@
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">
198 <field name="name">account.analytic.account.list.contract</field>198 <field name="name">account.analytic.account.list.contract</field>
199 <field name="model">account.analytic.account</field>199 <field name="model">account.analytic.account</field>
200 <field name="inherit_id" ref="account.view_account_analytic_account_list"/>200 <field name="inherit_id" ref="analytic.view_account_analytic_account_list"/>
201 <field name="arch" type="xml">201 <field name="arch" type="xml">
202 <field name="date_start" position="before">202 <field name="date_start" position="before">
203 <field name="last_invoice_date"/>203 <field name="last_invoice_date"/>
@@ -280,7 +280,7 @@
280 <field name="view_mode">tree,form</field>280 <field name="view_mode">tree,form</field>
281 <field name="domain">[('invoice_id','=',False)]</field>281 <field name="domain">[('invoice_id','=',False)]</field>
282 <field name="context">{'search_default_to_invoice': 1}</field>282 <field name="context">{'search_default_to_invoice': 1}</field>
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"/>
284 <field name="help" type="html">284 <field name="help" type="html">
285 <p>285 <p>
286 You will find here timesheets and purchases you did for286 You will find here timesheets and purchases you did for
@@ -338,6 +338,21 @@
338 </field>338 </field>
339 </record>339 </record>
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"/>
341
342 <record id="account_analytic_analysis_form_form" model="ir.ui.view">
343 <field name="name">account.analytic.account.invoice.form.inherit</field>
344 <field name="model">account.analytic.account</field>
345 <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
346 <field eval="20" name="priority"/>
347 <field name="arch" type="xml">
348 <xpath expr='//div[@name="buttons"]' position='inside'>
349 <button string="Time &amp; Materials to Invoice"
350 name="%(action_hr_tree_invoiced_all)d"
351 type="action"
352 context="{'search_default_account_id': [active_id], 'default_account_id': active_id}"/>
353 </xpath>
354 </field>
355 </record>
341356
342 </data>357 </data>
343</openerp>358</openerp>
344359
=== modified file 'account_analytic_analysis/analytic_account_demo.xml'
--- account_analytic_analysis/analytic_account_demo.xml 2013-10-27 12:31:04 +0000
+++ account_analytic_analysis/analytic_account_demo.xml 2014-04-28 09:41:45 +0000
@@ -1,7 +1,7 @@
1<?xml version="1.0" encoding="utf-8"?>1<?xml version="1.0" encoding="utf-8"?>
2<openerp>2<openerp>
3 <data noupdate="1">3 <data noupdate="1">
4 <record id="account.analytic_consultancy" model="account.analytic.account">4 <record id="analytic.analytic_consultancy" model="account.analytic.account">
5 <field name="partner_id" ref="base.res_partner_15"/>5 <field name="partner_id" ref="base.res_partner_15"/>
6 <field name="invoice_on_timesheets">True</field>6 <field name="invoice_on_timesheets">True</field>
7 <field name="hours_qtt_est">1200</field>7 <field name="hours_qtt_est">1200</field>
@@ -12,16 +12,16 @@
12 </record>12 </record>
1313
14 <record id="sale.sale_order_4" model="sale.order">14 <record id="sale.sale_order_4" model="sale.order">
15 <field name="project_id" ref="account.analytic_consultancy"/>15 <field name="project_id" ref="analytic.analytic_consultancy"/>
16 </record>16 </record>
17 17
18 <record id="hr_timesheet.working_hours_maintenance" model="hr.analytic.timesheet">18 <record id="hr_timesheet.working_hours_maintenance" model="hr.analytic.timesheet">
19 <field name="account_id" ref="account.analytic_consultancy"/>19 <field name="account_id" ref="analytic.analytic_consultancy"/>
20 <field name="to_invoice" ref="hr_timesheet_invoice.timesheet_invoice_factor1"/>20 <field name="to_invoice" ref="hr_timesheet_invoice.timesheet_invoice_factor1"/>
21 <field name="unit_amount">100</field>21 <field name="unit_amount">100</field>
22 </record>22 </record>
2323
24 <record id="account.analytic_super_product_trainings" model="account.analytic.account">24 <record id="analytic.analytic_super_product_trainings" model="account.analytic.account">
25 <field name="partner_id" ref="base.res_partner_18"/>25 <field name="partner_id" ref="base.res_partner_18"/>
26 <field name="invoice_on_timesheets">True</field>26 <field name="invoice_on_timesheets">True</field>
27 <field name="hours_qtt_est">500</field>27 <field name="hours_qtt_est">500</field>
@@ -32,11 +32,11 @@
32 </record>32 </record>
33 33
34 <record id="sale.sale_order_6" model="sale.order">34 <record id="sale.sale_order_6" model="sale.order">
35 <field name="project_id" ref="account.analytic_super_product_trainings"/>35 <field name="project_id" ref="analytic.analytic_super_product_trainings"/>
36 <field name="partner_id" ref="base.res_partner_1"/>36 <field name="partner_id" ref="base.res_partner_1"/>
37 </record>37 </record>
3838
39 <record id="account.analytic_support_internal" model="account.analytic.account">39 <record id="analytic.analytic_support_internal" model="account.analytic.account">
40 <field name="partner_id" ref="base.res_partner_1"/>40 <field name="partner_id" ref="base.res_partner_1"/>
41 <field name="use_timesheets">True</field>41 <field name="use_timesheets">True</field>
42 <field name="invoice_on_timesheets">True</field>42 <field name="invoice_on_timesheets">True</field>
4343
=== modified file 'account_analytic_plans/test/acount_analytic_plans_report.yml'
--- account_analytic_plans/test/acount_analytic_plans_report.yml 2014-04-02 16:40:53 +0000
+++ account_analytic_plans/test/acount_analytic_plans_report.yml 2014-04-28 09:41:45 +0000
@@ -5,7 +5,8 @@
5 import os, time5 import os, time
6 import openerp.report6 import openerp.report
7 from openerp import tools7 from openerp import tools
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':{}}}
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, {})
10 if tools.config['test_report_directory']:10 if tools.config['test_report_directory']:
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)
12
1213
=== modified file 'account_budget/account_budget_demo.xml'
--- account_budget/account_budget_demo.xml 2011-11-01 11:28:40 +0000
+++ account_budget/account_budget_demo.xml 2014-04-28 09:41:45 +0000
@@ -42,7 +42,7 @@
42 <!-- Budget lines -->42 <!-- Budget lines -->
43 <data noupdate="1">43 <data noupdate="1">
44 <record id="crossovered_budget_lines_0" model="crossovered.budget.lines">44 <record id="crossovered_budget_lines_0" model="crossovered.budget.lines">
45 <field name="analytic_account_id" ref="account.analytic_consultancy"/>45 <field name="analytic_account_id" ref="analytic.analytic_consultancy"/>
46 <field name="general_budget_id" ref="account_budget_post_purchase0"/>46 <field name="general_budget_id" ref="account_budget_post_purchase0"/>
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"/>
48 <field eval="-500.0" name="planned_amount"/>48 <field eval="-500.0" name="planned_amount"/>
@@ -50,7 +50,7 @@
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"/>
51 </record>51 </record>
52 <record id="crossovered_budget_lines_1" model="crossovered.budget.lines">52 <record id="crossovered_budget_lines_1" model="crossovered.budget.lines">
53 <field name="analytic_account_id" ref="account.analytic_consultancy"/>53 <field name="analytic_account_id" ref="analytic.analytic_consultancy"/>
54 <field name="general_budget_id" ref="account_budget_post_purchase0"/>54 <field name="general_budget_id" ref="account_budget_post_purchase0"/>
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"/>
56 <field eval="-250.0" name="planned_amount"/>56 <field eval="-250.0" name="planned_amount"/>
@@ -58,7 +58,7 @@
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"/>
59 </record>59 </record>
60 <record id="crossovered_budget_lines_2" model="crossovered.budget.lines">60 <record id="crossovered_budget_lines_2" model="crossovered.budget.lines">
61 <field name="analytic_account_id" ref="account.analytic_consultancy"/>61 <field name="analytic_account_id" ref="analytic.analytic_consultancy"/>
62 <field name="general_budget_id" ref="account_budget_post_sales0"/>62 <field name="general_budget_id" ref="account_budget_post_sales0"/>
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"/>
64 <field eval="500.0" name="planned_amount"/>64 <field eval="500.0" name="planned_amount"/>
@@ -66,7 +66,7 @@
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"/>
67 </record>67 </record>
68 <record id="crossovered_budget_lines_3" model="crossovered.budget.lines">68 <record id="crossovered_budget_lines_3" model="crossovered.budget.lines">
69 <field name="analytic_account_id" ref="account.analytic_consultancy"/>69 <field name="analytic_account_id" ref="analytic.analytic_consultancy"/>
70 <field name="general_budget_id" ref="account_budget_post_sales0"/>70 <field name="general_budget_id" ref="account_budget_post_sales0"/>
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"/>
72 <field eval="900.0" name="planned_amount"/>72 <field eval="900.0" name="planned_amount"/>
@@ -74,7 +74,7 @@
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"/>
75 </record>75 </record>
76 <record id="crossovered_budget_lines_4" model="crossovered.budget.lines">76 <record id="crossovered_budget_lines_4" model="crossovered.budget.lines">
77 <field name="analytic_account_id" ref="account.analytic_consultancy"/>77 <field name="analytic_account_id" ref="analytic.analytic_consultancy"/>
78 <field name="general_budget_id" ref="account_budget_post_sales0"/>78 <field name="general_budget_id" ref="account_budget_post_sales0"/>
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"/>
80 <field eval="300.0" name="planned_amount"/>80 <field eval="300.0" name="planned_amount"/>
@@ -84,7 +84,7 @@
84 </data>84 </data>
85 <data noupdate="1">85 <data noupdate="1">
86 <record id="crossovered_budget_lines_5" model="crossovered.budget.lines">86 <record id="crossovered_budget_lines_5" model="crossovered.budget.lines">
87 <field name="analytic_account_id" ref="account.analytic_super_product_trainings"/>87 <field name="analytic_account_id" ref="analytic.analytic_super_product_trainings"/>
88 <field name="general_budget_id" ref="account_budget_post_sales0"/>88 <field name="general_budget_id" ref="account_budget_post_sales0"/>
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"/>
90 <field eval="375.0" name="planned_amount"/>90 <field eval="375.0" name="planned_amount"/>
@@ -93,7 +93,7 @@
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"/>
94 </record>94 </record>
95 <record id="crossovered_budget_lines_6" model="crossovered.budget.lines">95 <record id="crossovered_budget_lines_6" model="crossovered.budget.lines">
96 <field name="analytic_account_id" ref="account.analytic_super_product_trainings"/>96 <field name="analytic_account_id" ref="analytic.analytic_super_product_trainings"/>
97 <field name="general_budget_id" ref="account_budget_post_purchase0"/>97 <field name="general_budget_id" ref="account_budget_post_purchase0"/>
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"/>
99 <field eval="-150.0" name="planned_amount"/>99 <field eval="-150.0" name="planned_amount"/>
@@ -101,7 +101,7 @@
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"/>
102 </record>102 </record>
103 <record id="crossovered_budget_lines_7" model="crossovered.budget.lines">103 <record id="crossovered_budget_lines_7" model="crossovered.budget.lines">
104 <field name="analytic_account_id" ref="account.analytic_super_product_trainings"/>104 <field name="analytic_account_id" ref="analytic.analytic_super_product_trainings"/>
105 <field name="general_budget_id" ref="account_budget_post_sales0"/>105 <field name="general_budget_id" ref="account_budget_post_sales0"/>
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"/>
107 <field eval="375.0" name="planned_amount"/>107 <field eval="375.0" name="planned_amount"/>
@@ -112,7 +112,7 @@
112 </data>112 </data>
113 <data noupdate="1">113 <data noupdate="1">
114 <record id="crossovered_budget_lines_8" model="crossovered.budget.lines">114 <record id="crossovered_budget_lines_8" model="crossovered.budget.lines">
115 <field name="analytic_account_id" ref="account.analytic_seagate_p1"/>115 <field name="analytic_account_id" ref="analytic.analytic_seagate_p1"/>
116 <field name="general_budget_id" ref="account_budget_post_purchase0"/>116 <field name="general_budget_id" ref="account_budget_post_purchase0"/>
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"/>
118 <field eval="-7500.0" name="planned_amount"/>118 <field eval="-7500.0" name="planned_amount"/>
@@ -120,7 +120,7 @@
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"/>
121 </record>121 </record>
122 <record id="crossovered_budget_lines_9" model="crossovered.budget.lines">122 <record id="crossovered_budget_lines_9" model="crossovered.budget.lines">
123 <field name="analytic_account_id" ref="account.analytic_seagate_p1"/>123 <field name="analytic_account_id" ref="analytic.analytic_seagate_p1"/>
124 <field name="general_budget_id" ref="account_budget_post_purchase0"/>124 <field name="general_budget_id" ref="account_budget_post_purchase0"/>
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"/>
126 <field eval="-5000.0" name="planned_amount"/>126 <field eval="-5000.0" name="planned_amount"/>
@@ -128,7 +128,7 @@
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"/>
129 </record>129 </record>
130 <record id="crossovered_budget_lines_10" model="crossovered.budget.lines">130 <record id="crossovered_budget_lines_10" model="crossovered.budget.lines">
131 <field name="analytic_account_id" ref="account.analytic_seagate_p1"/>131 <field name="analytic_account_id" ref="analytic.analytic_seagate_p1"/>
132 <field name="general_budget_id" ref="account_budget_post_purchase0"/>132 <field name="general_budget_id" ref="account_budget_post_purchase0"/>
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"/>
134 <field eval="-2000.0" name="planned_amount"/>134 <field eval="-2000.0" name="planned_amount"/>
@@ -136,7 +136,7 @@
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"/>
137 </record>137 </record>
138 <record id="crossovered_budget_lines_11" model="crossovered.budget.lines">138 <record id="crossovered_budget_lines_11" model="crossovered.budget.lines">
139 <field name="analytic_account_id" ref="account.analytic_seagate_p1"/>139 <field name="analytic_account_id" ref="analytic.analytic_seagate_p1"/>
140 <field name="general_budget_id" ref="account_budget_post_sales0"/>140 <field name="general_budget_id" ref="account_budget_post_sales0"/>
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"/>
142 <field eval="20000.0" name="planned_amount"/>142 <field eval="20000.0" name="planned_amount"/>
@@ -144,7 +144,7 @@
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"/>
145 </record>145 </record>
146 <record id="crossovered_budget_lines_12" model="crossovered.budget.lines">146 <record id="crossovered_budget_lines_12" model="crossovered.budget.lines">
147 <field name="analytic_account_id" ref="account.analytic_seagate_p1"/>147 <field name="analytic_account_id" ref="analytic.analytic_seagate_p1"/>
148 <field name="general_budget_id" ref="account_budget_post_sales0"/>148 <field name="general_budget_id" ref="account_budget_post_sales0"/>
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"/>
150 <field eval="20000.0" name="planned_amount"/>150 <field eval="20000.0" name="planned_amount"/>
@@ -154,7 +154,7 @@
154 </data>154 </data>
155 <data noupdate="1">155 <data noupdate="1">
156 <record id="crossovered_budget_lines_13" model="crossovered.budget.lines">156 <record id="crossovered_budget_lines_13" model="crossovered.budget.lines">
157 <field name="analytic_account_id" ref="account.analytic_seagate_p2"/>157 <field name="analytic_account_id" ref="analytic.analytic_seagate_p2"/>
158 <field name="general_budget_id" ref="account_budget_post_purchase0"/>158 <field name="general_budget_id" ref="account_budget_post_purchase0"/>
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"/>
160 <field eval="-3000.0" name="planned_amount"/>160 <field eval="-3000.0" name="planned_amount"/>
@@ -162,7 +162,7 @@
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"/>
163 </record>163 </record>
164 <record id="crossovered_budget_lines_14" model="crossovered.budget.lines">164 <record id="crossovered_budget_lines_14" model="crossovered.budget.lines">
165 <field name="analytic_account_id" ref="account.analytic_seagate_p2"/>165 <field name="analytic_account_id" ref="analytic.analytic_seagate_p2"/>
166 <field name="general_budget_id" ref="account_budget_post_purchase0"/>166 <field name="general_budget_id" ref="account_budget_post_purchase0"/>
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"/>
168 <field eval="-1000.0" name="planned_amount"/>168 <field eval="-1000.0" name="planned_amount"/>
@@ -170,7 +170,7 @@
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"/>
171 </record>171 </record>
172 <record id="crossovered_budget_lines_15" model="crossovered.budget.lines">172 <record id="crossovered_budget_lines_15" model="crossovered.budget.lines">
173 <field name="analytic_account_id" ref="account.analytic_seagate_p2"/>173 <field name="analytic_account_id" ref="analytic.analytic_seagate_p2"/>
174 <field name="general_budget_id" ref="account_budget_post_sales0"/>174 <field name="general_budget_id" ref="account_budget_post_sales0"/>
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"/>
176 <field eval="10000.0" name="planned_amount"/>176 <field eval="10000.0" name="planned_amount"/>
@@ -178,7 +178,7 @@
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"/>
179 </record>179 </record>
180 <record id="crossovered_budget_lines_16" model="crossovered.budget.lines">180 <record id="crossovered_budget_lines_16" model="crossovered.budget.lines">
181 <field name="analytic_account_id" ref="account.analytic_seagate_p2"/>181 <field name="analytic_account_id" ref="analytic.analytic_seagate_p2"/>
182 <field name="general_budget_id" ref="account_budget_post_sales0"/>182 <field name="general_budget_id" ref="account_budget_post_sales0"/>
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"/>
184 <field eval="10000.0" name="planned_amount"/>184 <field eval="10000.0" name="planned_amount"/>
185185
=== modified file 'account_budget/test/account_budget.yml'
--- account_budget/test/account_budget.yml 2011-01-14 00:11:01 +0000
+++ account_budget/test/account_budget.yml 2014-04-28 09:41:45 +0000
@@ -16,12 +16,12 @@
16-16-
17 !record {model: crossovered.budget, id: crossovered_budget_budget0}:17 !record {model: crossovered.budget, id: crossovered_budget_budget0}:
18 crossovered_budget_line:18 crossovered_budget_line:
19 - analytic_account_id: account.analytic_consultancy19 - analytic_account_id: analytic.analytic_consultancy
20 date_from: !eval "'%s-01-01' %(datetime.now().year+1)"20 date_from: !eval "'%s-01-01' %(datetime.now().year+1)"
21 date_to: !eval "'%s-12-31' %(datetime.now().year+1)"21 date_to: !eval "'%s-12-31' %(datetime.now().year+1)"
22 general_budget_id: account_budget.account_budget_post_purchase022 general_budget_id: account_budget.account_budget_post_purchase0
23 planned_amount: 10000.023 planned_amount: 10000.0
24 - analytic_account_id: account.analytic_super_product_trainings24 - analytic_account_id: analytic.analytic_super_product_trainings
25 date_from: !eval "'%s-09-01' %(datetime.now().year+1)"25 date_from: !eval "'%s-09-01' %(datetime.now().year+1)"
26 date_to: !eval "'%s-09-30' %(datetime.now().year+1)"26 date_to: !eval "'%s-09-30' %(datetime.now().year+1)"
27 general_budget_id: account_budget.account_budget_post_sales027 general_budget_id: account_budget.account_budget_post_sales0
2828
=== modified file 'account_budget/test/account_budget_report.yml'
--- account_budget/test/account_budget_report.yml 2014-04-02 16:40:53 +0000
+++ account_budget/test/account_budget_report.yml 2014-04-28 09:41:45 +0000
@@ -2,7 +2,7 @@
2 Print the Analytic Budget Report through wizard2 Print the Analytic Budget Report through wizard
3-3-
4 !python {model: account.analytic.account}: |4 !python {model: account.analytic.account}: |
5 ctx = {'model': 'account.analytic.account','active_ids': [ref('account.analytic_root')]}5 ctx = {'model': 'account.analytic.account','active_ids': [ref('analytic.analytic_root')]}
6 from openerp.tools import test_reports6 from openerp.tools import test_reports
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')
88
99
=== modified file 'account_voucher/test/case1_usd_usd.yml'
--- account_voucher/test/case1_usd_usd.yml 2013-10-27 12:31:04 +0000
+++ account_voucher/test/case1_usd_usd.yml 2014-04-28 09:41:45 +0000
@@ -60,7 +60,7 @@
60 name: Bank Journal(USD)60 name: Bank Journal(USD)
61 code: BUSD61 code: BUSD
62 type: bank62 type: bank
63 analytic_journal_id: account.sit63 analytic_journal_id: analytic.sit
64 sequence_id: account.sequence_bank_journal64 sequence_id: account.sequence_bank_journal
65 default_debit_account_id: account_cash_usd_id65 default_debit_account_id: account_cash_usd_id
66 default_credit_account_id: account_cash_usd_id66 default_credit_account_id: account_cash_usd_id
6767
=== modified file 'account_voucher/test/case1_usd_usd_payment_rate.yml'
--- account_voucher/test/case1_usd_usd_payment_rate.yml 2013-05-14 12:03:41 +0000
+++ account_voucher/test/case1_usd_usd_payment_rate.yml 2014-04-28 09:41:45 +0000
@@ -60,7 +60,7 @@
60 name: Bank Journal(USD)60 name: Bank Journal(USD)
61 code: BUSD61 code: BUSD
62 type: bank62 type: bank
63 analytic_journal_id: account.sit63 analytic_journal_id: analytic.sit
64 sequence_id: account.sequence_bank_journal64 sequence_id: account.sequence_bank_journal
65 default_debit_account_id: account_cash_usd_id65 default_debit_account_id: account_cash_usd_id
66 default_credit_account_id: account_cash_usd_id66 default_credit_account_id: account_cash_usd_id
6767
=== modified file 'account_voucher/test/case2_suppl_usd_eur.yml'
--- account_voucher/test/case2_suppl_usd_eur.yml 2013-10-27 12:31:04 +0000
+++ account_voucher/test/case2_suppl_usd_eur.yml 2014-04-28 09:41:45 +0000
@@ -17,7 +17,7 @@
17 name: Bank Journal(EUR)17 name: Bank Journal(EUR)
18 code: BEUR18 code: BEUR
19 type: bank19 type: bank
20 analytic_journal_id: account.sit20 analytic_journal_id: analytic.sit
21 sequence_id: account.sequence_bank_journal21 sequence_id: account.sequence_bank_journal
22 default_debit_account_id: account.cash22 default_debit_account_id: account.cash
23 default_credit_account_id: account.cash23 default_credit_account_id: account.cash
@@ -30,7 +30,7 @@
30 name: Bank Journal(USD)30 name: Bank Journal(USD)
31 code: BUSD31 code: BUSD
32 type: bank32 type: bank
33 analytic_journal_id: account.sit33 analytic_journal_id: analytic.sit
34 sequence_id: account.sequence_bank_journal34 sequence_id: account.sequence_bank_journal
35 default_debit_account_id: account.cash35 default_debit_account_id: account.cash
36 default_credit_account_id: account.cash36 default_credit_account_id: account.cash
3737
=== modified file 'account_voucher/test/case2_usd_eur_debtor_in_eur.yml'
--- account_voucher/test/case2_usd_eur_debtor_in_eur.yml 2013-10-27 12:31:04 +0000
+++ account_voucher/test/case2_usd_eur_debtor_in_eur.yml 2014-04-28 09:41:45 +0000
@@ -54,7 +54,7 @@
54 name: Bank Journal(EUR)54 name: Bank Journal(EUR)
55 code: BEUR55 code: BEUR
56 type: bank56 type: bank
57 analytic_journal_id: account.sit57 analytic_journal_id: analytic.sit
58 sequence_id: account.sequence_bank_journal58 sequence_id: account.sequence_bank_journal
59 default_debit_account_id: account.cash59 default_debit_account_id: account.cash
60 default_credit_account_id: account.cash60 default_credit_account_id: account.cash
@@ -66,7 +66,7 @@
66 name: Bank Journal(USD)66 name: Bank Journal(USD)
67 code: BUSD67 code: BUSD
68 type: bank68 type: bank
69 analytic_journal_id: account.sit69 analytic_journal_id: analytic.sit
70 sequence_id: account.sequence_bank_journal70 sequence_id: account.sequence_bank_journal
71 default_debit_account_id: account_cash_usd_id71 default_debit_account_id: account_cash_usd_id
72 default_credit_account_id: account_cash_usd_id72 default_credit_account_id: account_cash_usd_id
7373
=== modified file 'account_voucher/test/case2_usd_eur_debtor_in_usd.yml'
--- account_voucher/test/case2_usd_eur_debtor_in_usd.yml 2013-10-27 12:31:04 +0000
+++ account_voucher/test/case2_usd_eur_debtor_in_usd.yml 2014-04-28 09:41:45 +0000
@@ -54,7 +54,7 @@
54 name: Bank Journal(EUR)54 name: Bank Journal(EUR)
55 code: BEUR55 code: BEUR
56 type: bank56 type: bank
57 analytic_journal_id: account.sit57 analytic_journal_id: analytic.sit
58 sequence_id: account.sequence_bank_journal58 sequence_id: account.sequence_bank_journal
59 default_debit_account_id: account.cash59 default_debit_account_id: account.cash
60 default_credit_account_id: account.cash60 default_credit_account_id: account.cash
@@ -66,7 +66,7 @@
66 name: Bank Journal(USD)66 name: Bank Journal(USD)
67 code: BUSD67 code: BUSD
68 type: bank68 type: bank
69 analytic_journal_id: account.sit69 analytic_journal_id: analytic.sit
70 sequence_id: account.sequence_bank_journal70 sequence_id: account.sequence_bank_journal
71 default_debit_account_id: account_cash_usd_id71 default_debit_account_id: account_cash_usd_id
72 default_credit_account_id: account_cash_usd_id72 default_credit_account_id: account_cash_usd_id
7373
=== modified file 'account_voucher/test/case3_eur_eur.yml'
--- account_voucher/test/case3_eur_eur.yml 2013-10-27 12:31:04 +0000
+++ account_voucher/test/case3_eur_eur.yml 2014-04-28 09:41:45 +0000
@@ -22,7 +22,7 @@
22 name: Bank Journal(EUR)22 name: Bank Journal(EUR)
23 code: BEUR23 code: BEUR
24 type: bank24 type: bank
25 analytic_journal_id: account.sit25 analytic_journal_id: analytic.sit
26 sequence_id: account.sequence_bank_journal26 sequence_id: account.sequence_bank_journal
27 default_debit_account_id: account.cash27 default_debit_account_id: account.cash
28 default_credit_account_id: account.cash28 default_credit_account_id: account.cash
2929
=== modified file 'account_voucher/test/case4_cad_chf.yml'
--- account_voucher/test/case4_cad_chf.yml 2013-10-27 12:31:04 +0000
+++ account_voucher/test/case4_cad_chf.yml 2014-04-28 09:41:45 +0000
@@ -55,7 +55,7 @@
55 name: Bank Journal(CHF)55 name: Bank Journal(CHF)
56 code: BCHF56 code: BCHF
57 type: bank57 type: bank
58 analytic_journal_id: account.sit58 analytic_journal_id: analytic.sit
59 sequence_id: account.sequence_bank_journal59 sequence_id: account.sequence_bank_journal
60 default_debit_account_id: account_cash_chf_id60 default_debit_account_id: account_cash_chf_id
61 default_credit_account_id: account_cash_chf_id61 default_credit_account_id: account_cash_chf_id
6262
=== modified file 'account_voucher/test/case5_suppl_usd_usd.yml'
--- account_voucher/test/case5_suppl_usd_usd.yml 2013-10-27 12:31:04 +0000
+++ account_voucher/test/case5_suppl_usd_usd.yml 2014-04-28 09:41:45 +0000
@@ -41,7 +41,7 @@
41 name: Bank Journal(EUR)41 name: Bank Journal(EUR)
42 code: BEUR42 code: BEUR
43 type: bank43 type: bank
44 analytic_journal_id: account.sit44 analytic_journal_id: analytic.sit
45 sequence_id: account.sequence_bank_journal45 sequence_id: account.sequence_bank_journal
46 default_debit_account_id: account.cash46 default_debit_account_id: account.cash
47 default_credit_account_id: account.cash47 default_credit_account_id: account.cash
@@ -53,7 +53,7 @@
53 name: Bank Journal(USD)53 name: Bank Journal(USD)
54 code: BUSD54 code: BUSD
55 type: bank55 type: bank
56 analytic_journal_id: account.sit56 analytic_journal_id: analytic.sit
57 sequence_id: account.sequence_bank_journal57 sequence_id: account.sequence_bank_journal
58 default_debit_account_id: account_cash_usd_id258 default_debit_account_id: account_cash_usd_id2
59 default_credit_account_id: account_cash_usd_id259 default_credit_account_id: account_cash_usd_id2
6060
=== modified file 'account_voucher/test/case_eur_usd.yml'
--- account_voucher/test/case_eur_usd.yml 2013-10-27 12:31:04 +0000
+++ account_voucher/test/case_eur_usd.yml 2014-04-28 09:41:45 +0000
@@ -39,7 +39,7 @@
39 name: Bank Journal Test(USD)39 name: Bank Journal Test(USD)
40 code: BEUSD40 code: BEUSD
41 type: bank41 type: bank
42 analytic_journal_id: account.sit42 analytic_journal_id: analytic.sit
43 sequence_id: account.sequence_bank_journal43 sequence_id: account.sequence_bank_journal
44 default_debit_account_id: account_eur_usd_id44 default_debit_account_id: account_eur_usd_id
45 default_credit_account_id: account_eur_usd_id45 default_credit_account_id: account_eur_usd_id
4646
=== modified file 'analytic/__init__.py'
--- analytic/__init__.py 2011-01-14 00:11:01 +0000
+++ analytic/__init__.py 2014-04-28 09:41:45 +0000
@@ -20,6 +20,7 @@
20##############################################################################20##############################################################################
2121
22import analytic22import analytic
2323import project
24import report
24# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:25# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
2526
2627
=== modified file 'analytic/__openerp__.py'
--- analytic/__openerp__.py 2012-12-19 17:32:15 +0000
+++ analytic/__openerp__.py 2014-04-28 09:41:45 +0000
@@ -40,8 +40,25 @@
40 'analytic_sequence.xml',40 'analytic_sequence.xml',
41 'analytic_view.xml',41 'analytic_view.xml',
42 'analytic_data.xml',42 'analytic_data.xml',
43 ],43 'project/wizard/project_account_analytic_line_view.xml',
44 'demo': [],44 'project/project_view.xml',
45 'project/project_report.xml',
46 'project/wizard/account_analytic_balance_report_view.xml',
47 'project/wizard/account_analytic_cost_ledger_view.xml',
48 'project/wizard/account_analytic_inverted_balance_report.xml',
49 'project/wizard/account_analytic_journal_report_view.xml',
50 'project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml',
51 'project/wizard/account_analytic_chart_view.xml',
52 'report/report_analyticbalance.xml',
53 'report/report_analyticjournal.xml',
54 'report/report_analyticcostledgerquantity.xml',
55 'report/report_analyticcostledger.xml',
56 'report/report_invertedanalyticbalance.xml',
57 ],
58 'demo': [
59 'project/project_demo.xml',
60 'project/analytic_account_demo.xml',
61 ],
45 'installable': True,62 'installable': True,
46 'auto_install': False,63 'auto_install': False,
47}64}
4865
=== added directory 'analytic/project'
=== added file 'analytic/project/__init__.py'
--- analytic/project/__init__.py 1970-01-01 00:00:00 +0000
+++ analytic/project/__init__.py 2014-04-28 09:41:45 +0000
@@ -0,0 +1,27 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import project
23import wizard
24
25
26# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
27
028
=== added file 'analytic/project/analytic_account_demo.xml'
--- analytic/project/analytic_account_demo.xml 1970-01-01 00:00:00 +0000
+++ analytic/project/analytic_account_demo.xml 2014-04-28 09:41:45 +0000
@@ -0,0 +1,235 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data noupdate="1">
4 <record id="analytic_root" model="account.analytic.account">
5 <field name="name" model="res.company" use="name" search="[]"/>
6 </record>
7 <record id="analytic_absences" model="account.analytic.account">
8 <field name="name">Leaves</field>
9 <field name="type">view</field>
10 <field name="parent_id" ref="analytic_root"/>
11 </record>
12 <record id="analytic_internal" model="account.analytic.account">
13 <field name="name">Internal</field>
14 <field name="type">view</field>
15 <field name="parent_id" ref="analytic_root"/>
16 </record>
17 <record id="analytic_our_super_product" model="account.analytic.account">
18 <field name="name">Our Super Product</field>
19 <field name="state">open</field>
20 <field name="type">view</field>
21 <field name="parent_id" ref="analytic_root"/>
22 </record>
23 <record id="analytic_project_1" model="account.analytic.account">
24 <field name="name">Project 1</field>
25 <field name="type">view</field>
26 <field name="parent_id" ref="analytic_root"/>
27 </record>
28 <record id="analytic_project_2" model="account.analytic.account">
29 <field name="name">Project 2</field>
30 <field name="type">view</field>
31 <field name="parent_id" ref="analytic_root"/>
32 </record>
33 <record id="analytic_journal_trainings" model="account.analytic.account">
34 <field name="name">Training</field>
35 <field name="type">view</field>
36 <field name="parent_id" ref="analytic_internal"/>
37 </record>
38 <record id="analytic_in_house" model="account.analytic.account">
39 <field name="name">In House</field>
40 <field name="type">normal</field>
41 <field name="parent_id" ref="analytic_journal_trainings"/>
42 </record>
43 <record id="analytic_online" model="account.analytic.account">
44 <field name="name">Online</field>
45 <field name="type">normal</field>
46 <field name="parent_id" ref="analytic_journal_trainings"/>
47 </record>
48 <record id="analytic_support" model="account.analytic.account">
49 <field name="name">Support</field>
50 <field name="type">view</field>
51 <field name="parent_id" ref="analytic_our_super_product"/>
52 </record>
53 <record id="analytic_partners" model="account.analytic.account">
54 <field name="name">Partners</field>
55 <field name="type">view</field>
56 <field name="parent_id" ref="analytic_support"/>
57 </record>
58 <record id="analytic_customers" model="account.analytic.account">
59 <field name="name">Customers</field>
60 <field name="type">view</field>
61 <field name="parent_id" ref="analytic_support"/>
62 </record>
63 <record id="analytic_support_internal" model="account.analytic.account">
64 <field name="name">Internal</field>
65 <field name="type">contract</field>
66 <field name="parent_id" ref="analytic_support"/>
67 </record>
68 <record id="analytic_integration" model="account.analytic.account">
69 <field name="name">Integration</field>
70 <field name="type">view</field>
71 <field name="parent_id" ref="analytic_our_super_product"/>
72 </record>
73 <record id="analytic_consultancy" model="account.analytic.account">
74 <field name="name">Consultancy</field>
75 <field name="type">contract</field>
76 <field name="parent_id" ref="analytic_our_super_product"/>
77 </record>
78 <record id="analytic_super_product_trainings" model="account.analytic.account">
79 <field name="name">Training</field>
80 <field name="type">contract</field>
81 <field name="parent_id" ref="analytic_our_super_product"/>
82 </record>
83 <record id="analytic_seagate_p1" model="account.analytic.account">
84 <field name="name">Seagate P1</field>
85 <field name="parent_id" ref="analytic_integration"/>
86 <field name="type">normal</field>
87 <field name="state">open</field>
88 <field name="partner_id" ref="base.res_partner_19"/>
89 </record>
90 <record id="analytic_seagate_p2" model="account.analytic.account">
91 <field name="name">Seagate P2</field>
92 <field name="type">normal</field>
93 <field name="parent_id" ref="analytic_integration"/>
94 <field name="state">open</field>
95 <field name="partner_id" ref="base.res_partner_19"/>
96 </record>
97 <record id="analytic_millennium_industries" model="account.analytic.account">
98 <field name="name">Millennium Industries</field>
99 <field name="parent_id" ref="analytic_integration"/>
100 <field name="type">normal</field>
101 <field name="partner_id" ref="base.res_partner_15"/>
102 </record>
103 <record id="analytic_integration_c2c" model="account.analytic.account">
104 <field name="name">CampToCamp</field>
105 <field name="type">normal</field>
106 <field eval="str(time.localtime()[0] - 1) + '-08-07'" name="date_start"/>
107 <field eval="time.strftime('%Y-12-31')" name="date"/>
108 <field name="parent_id" ref="analytic_integration"/>
109 <field name="partner_id" ref="base.res_partner_12"/>
110 <field name="state">open</field>
111 </record>
112 <record id="analytic_agrolait" model="account.analytic.account">
113 <field name="name">Agrolait</field>
114 <field name="parent_id" ref="analytic_customers"/>
115 <field name="type">normal</field>
116 <field name="partner_id" ref="base.res_partner_2"/>
117 </record>
118 <record id="analytic_asustek" model="account.analytic.account">
119 <field name="name">Asustek</field>
120 <field name="type">normal</field>
121 <field name="parent_id" ref="analytic_customers"/>
122 <field name="partner_id" ref="base.res_partner_1"/>
123 </record>
124 <record id="analytic_deltapc" model="account.analytic.account">
125 <field name="name">Delta PC</field>
126 <field name="parent_id" ref="analytic_customers"/>
127 <field name="type">normal</field>
128 <field name="partner_id" ref="base.res_partner_4"/>
129 </record>
130 <record id="analytic_spark" model="account.analytic.account">
131 <field name="name">Spark Systems</field>
132 <field eval="str(time.localtime()[0] - 1) + '-05-09'" name="date_start"/>
133 <field eval="time.strftime('%Y-05-08')" name="date"/>
134 <field name="parent_id" ref="analytic_partners"/>
135 <field name="type">normal</field>
136 <field name="partner_id" ref="base.res_partner_16"/>
137 <field name="state">open</field>
138 </record>
139 <record id="analytic_nebula" model="account.analytic.account">
140 <field name="name">Nebula</field>
141 <field eval="time.strftime('%Y-02-01')" name="date_start"/>
142 <field eval="time.strftime('%Y-07-01')" name="date"/>
143 <field name="type">normal</field>
144 <field name="parent_id" ref="analytic_partners"/>
145 <field name="partner_id" ref="base.res_partner_17"/>
146 <field name="state">open</field>
147 </record>
148 <record id="analytic_luminous_technologies" model="account.analytic.account">
149 <field name="name">Luminous Technologies</field>
150 <field eval="time.strftime('%Y-04-24')" name="date_start"/>
151 <field eval="str(time.localtime()[0] + 1) + '-04-24'" name="date"/>
152 <field name="type">normal</field>
153 <field name="parent_id" ref="analytic_partners"/>
154 <field name="partner_id" ref="base.res_partner_11"/>
155 </record>
156 <record id="analytic_desertic_hispafuentes" model="account.analytic.account">
157 <field name="name">Desertic - Hispafuentes</field>
158 <field eval="time.strftime('%Y-02-01')" name="date_start"/>
159 <field eval="str(time.localtime()[0] + 1) + '-02-01'" name="date"/>
160 <field name="type">normal</field>
161 <field name="parent_id" ref="analytic_partners"/>
162 <field name="partner_id" ref="base.res_partner_12"/>
163 </record>
164 <record id="analytic_think_big_systems" model="account.analytic.account">
165 <field name="name">Think Big Systems</field>
166 <field name="type">normal</field>
167 <field name="parent_id" ref="analytic_partners"/>
168 <field name="partner_id" ref="base.res_partner_18"/>
169 </record>
170 <record id="analytic_partners_camp_to_camp" model="account.analytic.account">
171 <field name="name">Camp to Camp</field>
172 <field eval="time.strftime('%Y-%m-%d', time.localtime(time.time() - 365 * 86400))" name="date_start"/>
173 <field eval="time.strftime('%Y-%m-%d')" name="date"/>
174 <field name="type">normal</field>
175 <field name="parent_id" ref="analytic_partners"/>
176 <field name="partner_id" ref="base.res_partner_12"/>
177 <field name="state">open</field>
178 </record>
179 <record id="analytic_project_2_support" model="account.analytic.account">
180 <field name="name">Support</field>
181 <field name="type">normal</field>
182 <field name="parent_id" ref="analytic_project_2"/>
183 </record>
184 <record id="analytic_project_2_development" model="account.analytic.account">
185 <field name="name">Development</field>
186 <field name="type">normal</field>
187 <field name="parent_id" ref="analytic_project_2"/>
188 </record>
189 <record id="analytic_project_1_trainings" model="account.analytic.account">
190 <field name="name">Training</field>
191 <field name="type">normal</field>
192 <field name="parent_id" ref="analytic_project_1"/>
193 </record>
194 <record id="analytic_project_1_development" model="account.analytic.account">
195 <field name="name">Development</field>
196 <field name="type">normal</field>
197 <field name="parent_id" ref="analytic_project_1"/>
198 </record>
199 <record id="analytic_administratif" model="account.analytic.account">
200 <field name="name">Administrative</field>
201 <field name="type">normal</field>
202 <field name="parent_id" ref="analytic_internal"/>
203 </record>
204 <record id="analytic_commercial_marketing" model="account.analytic.account">
205 <field name="name">Commercial &amp; Marketing</field>
206 <field name="type">normal</field>
207 <field name="parent_id" ref="analytic_internal"/>
208 </record>
209 <record id="analytic_our_super_product_development" model="account.analytic.account">
210 <field name="name">Our Super Product Development</field>
211 <field name="type">view</field>
212 <field name="parent_id" ref="analytic_internal"/>
213 </record>
214 <record id="analytic_stable" model="account.analytic.account">
215 <field name="name">Stable</field>
216 <field name="type">normal</field>
217 <field name="parent_id" ref="analytic_our_super_product_development"/>
218 </record>
219 <record id="analytic_trunk" model="account.analytic.account">
220 <field name="name">Trunk</field>
221 <field name="type">normal</field>
222 <field name="parent_id" ref="analytic_our_super_product_development"/>
223 </record>
224 <record id="analytic_paid" model="account.analytic.account">
225 <field name="name">Paid</field>
226 <field name="type">normal</field>
227 <field name="parent_id" ref="analytic_absences"/>
228 </record>
229 <record id="analytic_unpaid" model="account.analytic.account">
230 <field name="name">Unpaid</field>
231 <field name="type">normal</field>
232 <field name="parent_id" ref="analytic_absences"/>
233 </record>
234 </data>
235</openerp>
0236
=== added file 'analytic/project/project.py'
--- analytic/project/project.py 1970-01-01 00:00:00 +0000
+++ analytic/project/project.py 2014-04-28 09:41:45 +0000
@@ -0,0 +1,41 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22from openerp.osv import fields, osv
23
24class account_analytic_journal(osv.osv):
25 _name = 'account.analytic.journal'
26 _description = 'Analytic Journal'
27 _columns = {
28 'name': fields.char('Journal Name', size=64, required=True),
29 'code': fields.char('Journal Code', size=8),
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."),
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."),
32 'company_id': fields.many2one('res.company', 'Company', required=True),
33 }
34 _defaults = {
35 'active': True,
36 'type': 'general',
37 'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
38 }
39
40
41# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
042
=== added file 'analytic/project/project_demo.xml'
--- analytic/project/project_demo.xml 1970-01-01 00:00:00 +0000
+++ analytic/project/project_demo.xml 2014-04-28 09:41:45 +0000
@@ -0,0 +1,15 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data noupdate="1">
4 <record id="cose_journal_sale" model="account.analytic.journal">
5 <field name="code">SAL</field>
6 <field name="name">Sales</field>
7 <field name="type">sale</field>
8 </record>
9 <record id="sit" model="account.analytic.journal">
10 <field name="code">START</field>
11 <field name="name">Miscellaneous Operation</field>
12 <field name="type">situation</field>
13 </record>
14 </data>
15</openerp>
016
=== added file 'analytic/project/project_report.xml'
--- analytic/project/project_report.xml 1970-01-01 00:00:00 +0000
+++ analytic/project/project_report.xml 2014-04-28 09:41:45 +0000
@@ -0,0 +1,55 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4 <report
5 id="action_account_analytic_account_inverted_balance"
6 model="account.analytic.account"
7 string="Inverted Analytic Balance"
8 report_type="qweb-pdf"
9 name="account.report_invertedanalyticbalance"
10 file="account.report_invertedanalyticbalance"
11 menu="False"
12 />
13
14 <report
15 id="action_report_analytic_journal"
16 model="account.analytic.journal"
17 string="Analytic Journal"
18 report_type="qweb-pdf"
19 name="account.report_analyticjournal"
20 file="account.report_analyticjournal"
21 menu="False"
22 />
23
24 <report
25 id="action_report_analytic_balance"
26 model="account.analytic.account"
27 string="Analytic Balance"
28 report_type="qweb-pdf"
29 name="account.report_analyticbalance"
30 file="account.report_analyticbalance"
31 menu="False"
32 />
33
34 <report
35 id="action_report_cost_ledger"
36 model="account.analytic.account"
37 report_type="qweb-pdf"
38 string="Cost Ledger"
39 name="account.report_analyticcostledger"
40 file="account.report_analyticcostledger"
41 menu="False"
42 />
43
44 <report
45 id="action_report_cost_ledgerquantity"
46 model="account.analytic.account"
47 report_type="qweb-pdf"
48 string="Cost Ledger (Only quantities)"
49 name="account.report_analyticcostledgerquantity"
50 file="account.report_analyticcostledgerquantity"
51 menu="False"
52 />
53
54 </data>
55</openerp>
056
=== added file 'analytic/project/project_view.xml'
--- analytic/project/project_view.xml 1970-01-01 00:00:00 +0000
+++ analytic/project/project_view.xml 2014-04-28 09:41:45 +0000
@@ -0,0 +1,309 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5 <record id="view_account_analytic_account_list" model="ir.ui.view">
6 <field name="name">account.analytic.account.list</field>
7 <field name="model">account.analytic.account</field>
8 <field eval="8" name="priority"/>
9 <field name="arch" type="xml">
10 <tree toolbar="1" colors="red:state=='pending';grey:state in ('cancelled','close');blue:type=='view'" string="Analytic Accounts">
11 <field name="complete_name"/>
12 <field name="partner_id"/>
13 <field name="code"/>
14 <field name="date_start"/>
15 <field name="date"/>
16 <field name="user_id" invisible="1"/>
17 <field name="manager_id"/>
18 <field name="parent_id" invisible="1"/>
19 <field name="state" invisible="1"/>
20 <field name="type" invisible="1"/>
21 <field name="template_id" invisible="1"/>
22 <field name="company_id" groups="base.group_multi_company"/>
23 </tree>
24 </field>
25 </record>
26
27 <record id="view_account_analytic_account_search" model="ir.ui.view">
28 <field name="name">account.analytic.account.search</field>
29 <field name="model">account.analytic.account</field>
30 <field name="arch" type="xml">
31 <search string="Analytic Account">
32 <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Analytic Account"/>
33 <field name="date"/>
34 <field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
35 <field name="manager_id"/>
36 <field name="parent_id"/>
37 <field name="user_id"/>
38 <filter string="Open" domain="[('state','=','open')]" help="Current Accounts"/>
39 <filter string="Pending" domain="[('state','=','pending')]" help="Pending Accounts"/>
40 <group expand="0" string="Group By...">
41 <filter string="Associated Partner" domain="[]" context="{'group_by':'partner_id'}"/>
42 <filter string="Type" domain="[]" context="{'group_by':'type'}"/>
43 <filter string="Template" domain="[]" context="{'group_by':'template_id'}"/>
44 <filter string="Parent Account" domain="[]" context="{'group_by':'parent_id'}"/>
45 <filter string="Status" domain="[]" context="{'group_by':'state'}" groups="base.group_no_one"/>
46 </group>
47 </search>
48 </field>
49 </record>
50
51 <record id="view_account_analytic_account_tree" model="ir.ui.view">
52 <field name="name">account.analytic.account.tree</field>
53 <field name="model">account.analytic.account</field>
54 <field name="field_parent">child_complete_ids</field>
55 <field name="arch" type="xml">
56 <tree colors="blue:state=='pending';grey:state in ('close','cancelled');blue:type=='view'" string="Analytic account" toolbar="1">
57 <field name="name" invisible="1"/>
58 <field name="complete_name"/>
59 <field name="code"/>
60 <field name="debit"/>
61 <field name="credit"/>
62 <field name="balance"/>
63 <field name="state" invisible="1"/>
64 <field name="currency_id" groups="base.group_multi_currency"/>
65 <field name="date" invisible="1"/>
66 <field name="user_id" invisible="1"/>
67 <field name="partner_id" invisible="1"/>
68 <field name="parent_id" invisible="1"/>
69 <field name="type"/>
70 <field name="company_id" groups="base.group_multi_company"/>
71 <field name="template_id" invisible="1"/>
72 </tree>
73 </field>
74 </record>
75
76
77 <record id="action_account_analytic_account_form" model="ir.actions.act_window">
78 <field name="name">Analytic Accounts</field>
79 <field name="type">ir.actions.act_window</field>
80 <field name="res_model">account.analytic.account</field>
81 <field name="context">{}</field> <!-- repair invalid context by setting empty one -->
82 <field name="view_type">form</field>
83 <field name="view_mode">tree,form</field>
84 <field name="view_id" ref="view_account_analytic_account_tree"/>
85 <field name="search_view_id" ref="view_account_analytic_account_search"/>
86 </record>
87
88 <record id="act_account_renew_view" model="ir.actions.act_window">
89 <field name="name">Accounts to Renew</field>
90 <field name="type">ir.actions.act_window</field>
91 <field name="res_model">account.analytic.account</field>
92 <field name="view_type">form</field>
93 <field name="view_mode">tree,form</field>
94 <field name="domain">[('date','&lt;',time.strftime('%Y-%m-%d %H:%M:%S'))]</field>
95 <field name="filter" eval="True"/>
96 </record>
97
98 <record id="action_account_analytic_account_tree2" model="ir.actions.act_window">
99 <field name="name">Chart of Analytic Accounts</field>
100 <field name="res_model">account.analytic.account</field>
101 <field name="view_type">tree</field>
102 <field name="view_id" ref="view_account_analytic_account_tree"/>
103 <field name="domain">[('parent_id','=',False)]</field>
104 <field name="help" type="html">
105 <p>
106 Click to add a new analytic account.
107 </p><p>
108 The normal chart of accounts has a structure defined by the
109 legal requirement of the country. The analytic chart of
110 accounts structure should reflect your own business needs in
111 term of costs/revenues reporting.
112 </p><p>
113 They are usually structured by contracts, projects, products or
114 departements. Most of the OpenERP operations (invoices,
115 timesheets, expenses, etc) generate analytic entries on the
116 related account.
117 </p>
118 </field>
119 </record>
120
121
122 <record id="view_account_analytic_line_form" model="ir.ui.view">
123 <field name="name">account.analytic.line.form</field>
124 <field name="model">account.analytic.line</field>
125 <field name="priority">1</field>
126 <field name="arch" type="xml">
127 <form string="Analytic Entry" version="7.0">
128 <group>
129 <group>
130 <field name="name"/>
131 <field name="account_id"/>
132 <field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'account.group_account_invoice']}"/>
133 </group>
134 <group>
135 <field name="date"/>
136 <field name="company_id" groups="base.group_multi_company"/>
137 </group>
138 <group string="Amount">
139 <field name="amount"/>
140 </group>
141 <group string="Product Information">
142 <label for="unit_amount"/>
143 <div>
144 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
145 </div>
146 </group>
147 </group>
148 </form>
149 </field>
150 </record>
151 <record id="view_account_analytic_line_tree" model="ir.ui.view">
152 <field name="name">account.analytic.line.tree</field>
153 <field name="model">account.analytic.line</field>
154 <field name="arch" type="xml">
155 <tree string="Analytic Entries">
156 <field name="date"/>
157 <field name="name"/>
158 <field name="user_id"/>
159 <field name="amount" sum="Total" invisible="context.get('to_invoice', False)"/>
160 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" sum="Total Quantity"/>
161 <field domain="[('type','=','normal')]" name="account_id"/>
162 <field name="company_id" groups="base.group_multi_company"/>
163 </tree>
164 </field>
165 </record>
166 <record id="view_account_analytic_line_filter" model="ir.ui.view">
167 <field name="name">account.analytic.line.select</field>
168 <field name="model">account.analytic.line</field>
169 <field name="arch" type="xml">
170 <search string="Search Analytic Lines">
171 <field name="name" string="Description"/>
172 <field name="date"/>
173 <separator/>
174 <filter string="My Entries" domain="[('user_id','=',uid)]"/>
175 <field name="account_id" filter_domain="[('account_id','child_of',self)]"/>
176 <field name="user_id"/>
177 <group string="Group By..." expand="0">
178 <filter string="Analytic Account" context="{'group_by':'account_id'}"/>
179 <separator/>
180 <filter string="User" context="{'group_by':'user_id'}"/>
181 <separator/>
182 <filter string="Tasks Month" context="{'group_by':'date'}" name="group_date" help="Invoice Tasks by Month"/>
183 </group>
184 </search>
185 </field>
186 </record>
187 <record id="action_account_analytic_line_form" model="ir.actions.act_window">
188 <field name="name">Analytic Entries</field>
189 <field name="type">ir.actions.act_window</field>
190 <field name="res_model">account.analytic.line</field>
191 <field name="view_type">form</field>
192 <field name="context">{"search_default_user_id":uid}</field>
193 <field name="view_id" ref="view_account_analytic_line_tree"/>
194 </record>
195 <!-- Entries by Line -->
196
197 <record id="action_account_tree1" model="ir.actions.act_window">
198 <field name="name">Analytic Items</field>
199 <field name="res_model">account.analytic.line</field>
200 <field name="view_type">form</field>
201 <field name="view_mode">tree,form</field>
202 <field name="domain">[('account_id','child_of',[active_id])]</field>
203 <field name="context">{'account_id':active_id}</field>
204 <field name="search_view_id" ref="view_account_analytic_line_filter"/>
205 </record>
206 <record id="ir_open_account_analytic_account" model="ir.values">
207 <field eval="'tree_but_open'" name="key2"/>
208 <field eval="'account.analytic.account'" name="model"/>
209 <field name="name">Open Account Tree</field>
210 <field eval="'ir.actions.act_window,%d'%action_account_tree1" name="value"/>
211 </record>
212
213 <record id="account_analytic_line_extended_form" model="ir.ui.view">
214 <field name="name">account.analytic.line.extended_form</field>
215 <field name="model">account.analytic.line</field>
216 <field name="arch" type="xml">
217 <form string="Project line" version="7.0">
218 <group>
219 <group>
220 <field name="name"/>
221 <field name="account_id"/>
222 </group>
223 <group>
224 <field name="date" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
225 <field name="company_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
226 </group>
227 <group string="Amount">
228 <field name="amount"/>
229 </group>
230 <group string="Product Information">
231 <label for="unit_amount"/>
232 <div>
233 <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
234 </div>
235 </group>
236 </group>
237 </form>
238 </field>
239 </record>
240 <record id="action_account_analytic_account_line_extended_form" model="ir.actions.act_window">
241 <field name="name">account.analytic.line.extended</field>
242 <field name="type">ir.actions.act_window</field>
243 <field name="res_model">account.analytic.line</field>
244 <field name="view_type">form</field>
245 <field name="view_id" ref="account_analytic_line_extended_form"/>
246 </record>
247
248 #
249 # Analytic Journal
250 #
251
252 <record id="view_account_analytic_journal_tree" model="ir.ui.view">
253 <field name="name">account.analytic.journal.tree</field>
254 <field name="model">account.analytic.journal</field>
255 <field name="arch" type="xml">
256 <tree string="Analytic Journal">
257 <field name="code"/>
258 <field name="name"/>
259 <field name="type"/>
260 </tree>
261 </field>
262 </record>
263
264 <record id="view_analytic_journal_search" model="ir.ui.view">
265 <field name="name">account.analytic.journal.search</field>
266 <field name="model">account.analytic.journal</field>
267 <field name="arch" type="xml">
268 <search string="Analytic Journals">
269 <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Analytic Journal"/>
270 <field name="type"/>
271 <group expand="0" string="Group By...">
272 <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
273 </group>
274 </search>
275 </field>
276 </record>
277
278 <record id="view_account_analytic_journal_form" model="ir.ui.view">
279 <field name="name">account.analytic.journal.form</field>
280 <field name="model">account.analytic.journal</field>
281 <field name="arch" type="xml">
282 <form string="Analytic Journal" version="7.0">
283 <group col="4">
284 <field name="name"/>
285 <field name="code"/>
286 <field name="type"/>
287 <field name="active"/>
288 <field name="company_id" groups="base.group_multi_company"/>
289 </group>
290 </form>
291 </field>
292 </record>
293 <record id="action_account_analytic_journal_form" model="ir.actions.act_window">
294 <field name="name">Analytic Journals</field>
295 <field name="res_model">account.analytic.journal</field>
296 <field name="view_type">form</field>
297 <field name="view_mode">tree,form</field>
298 <field name="search_view_id" ref="view_analytic_journal_search" />
299 </record>
300
301 <record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
302 <field name="name">Analytic Journal Items</field>
303 <field name="res_model">account.analytic.line</field>
304 <field name="view_type">form</field>
305 <field name="view_mode">tree,form</field>
306 </record>
307
308 </data>
309</openerp>
0310
=== added directory 'analytic/project/wizard'
=== added file 'analytic/project/wizard/__init__.py'
--- analytic/project/wizard/__init__.py 1970-01-01 00:00:00 +0000
+++ analytic/project/wizard/__init__.py 2014-04-28 09:41:45 +0000
@@ -0,0 +1,30 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import account_analytic_journal_report
23import account_analytic_balance_report
24import account_analytic_inverted_balance_report
25import account_analytic_cost_ledger_report
26import account_analytic_cost_ledger_for_journal_report
27import project_account_analytic_line
28import account_analytic_chart
29
30# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
031
=== added file 'analytic/project/wizard/account_analytic_balance_report.py'
--- analytic/project/wizard/account_analytic_balance_report.py 1970-01-01 00:00:00 +0000
+++ analytic/project/wizard/account_analytic_balance_report.py 2014-04-28 09:41:45 +0000
@@ -0,0 +1,57 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import time
23from openerp.osv import fields, osv
24
25
26class account_analytic_balance(osv.osv_memory):
27 _name = 'account.analytic.balance'
28 _description = 'Account Analytic Balance'
29
30 _columns = {
31 'date1': fields.date('Start of period', required=True),
32 'date2': fields.date('End of period', required=True),
33 'empty_acc': fields.boolean('Empty Accounts ? ', help='Check if you want to display Accounts with 0 balance too.'),
34 }
35
36 _defaults = {
37 'date1': lambda *a: time.strftime('%Y-01-01'),
38 'date2': lambda *a: time.strftime('%Y-%m-%d')
39 }
40
41 def check_report(self, cr, uid, ids, context=None):
42 if context is None:
43 context = {}
44 data = self.read(cr, uid, ids)[0]
45 datas = {
46 'ids': context.get('active_ids', []),
47 'model': 'account.analytic.account',
48 'form': data
49 }
50
51 datas['form']['active_ids'] = context.get('active_ids', False)
52
53 return self.pool['report'].get_action(cr, uid, ids, 'account.report_analyticbalance', data=datas, context=context)
54
55
56# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
57
058
=== added file 'analytic/project/wizard/account_analytic_balance_report_view.xml'
--- analytic/project/wizard/account_analytic_balance_report_view.xml 1970-01-01 00:00:00 +0000
+++ analytic/project/wizard/account_analytic_balance_report_view.xml 2014-04-28 09:41:45 +0000
@@ -0,0 +1,46 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5 <record id="account_analytic_balance_view" model="ir.ui.view">
6 <field name="name">Account Analytic Balance</field>
7 <field name="model">account.analytic.balance</field>
8 <field name="arch" type="xml">
9 <form string="Select Period" version="7.0">
10 <header>
11 <button name="check_report" string="Print" type="object" class="oe_highlight"/>
12 or
13 <button string="Cancel" class="oe_link" special="cancel"/>
14 </header>
15 <group col="4">
16 <field name="date1"/>
17 <field name="date2"/>
18 <newline/>
19 <field name="empty_acc"/>
20 </group>
21 </form>
22 </field>
23 </record>
24
25 <record id="action_account_analytic_balance" model="ir.actions.act_window">
26 <field name="name">Analytic Balance</field>
27 <field name="type">ir.actions.act_window</field>
28 <field name="res_model">account.analytic.balance</field>
29 <field name="view_type">form</field>
30 <field name="view_mode">form</field>
31 <field name="view_id" ref="account_analytic_balance_view"/>
32 <field name="target">new</field>
33 </record>
34
35 <record model="ir.values" id="account_analytic_balance_values">
36 <field name="model_id" ref="analytic.model_account_analytic_account" />
37 <field name="name">Account Analytic Balance</field>
38 <field name="key2">client_print_multi</field>
39 <field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_analytic_balance'))" />
40 <field name="key">action</field>
41 <field name="model">account.analytic.account</field>
42 </record>
43
44 </data>
45</openerp>
46
047
=== added file 'analytic/project/wizard/account_analytic_chart.py'
--- analytic/project/wizard/account_analytic_chart.py 1970-01-01 00:00:00 +0000
+++ analytic/project/wizard/account_analytic_chart.py 2014-04-28 09:41:45 +0000
@@ -0,0 +1,49 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21from openerp.osv import fields, osv
22
23class account_analytic_chart(osv.osv_memory):
24 _name = 'account.analytic.chart'
25 _description = 'Account Analytic Chart'
26
27 _columns = {
28 'from_date': fields.date('From'),
29 'to_date': fields.date('To'),
30 }
31
32 def analytic_account_chart_open_window(self, cr, uid, ids, context=None):
33 mod_obj = self.pool.get('ir.model.data')
34 act_obj = self.pool.get('ir.actions.act_window')
35 result_context = {}
36 if context is None:
37 context = {}
38 result = mod_obj.get_object_reference(cr, uid, 'analytic', 'action_account_analytic_account_tree2')
39 id = result and result[1] or False
40 result = act_obj.read(cr, uid, [id], context=context)[0]
41 data = self.read(cr, uid, ids, [])[0]
42 if data['from_date']:
43 result_context.update({'from_date': data['from_date']})
44 if data['to_date']:
45 result_context.update({'to_date': data['to_date']})
46 result['context'] = str(result_context)
47 return result
48
49# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
050
=== added file 'analytic/project/wizard/account_analytic_chart_view.xml'
--- analytic/project/wizard/account_analytic_chart_view.xml 1970-01-01 00:00:00 +0000
+++ analytic/project/wizard/account_analytic_chart_view.xml 2014-04-28 09:41:45 +0000
@@ -0,0 +1,35 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5 <record id="account_analytic_chart_view" model="ir.ui.view">
6 <field name="name">Chart of Analytic Accounts</field>
7 <field name="model">account.analytic.chart</field>
8 <field name="arch" type="xml">
9 <form string="Analytic Account Charts" version="7.0">
10 <group string="Select the Period for Analysis" col="4">
11 <field name="from_date"/>
12 <field name="to_date"/>
13 <label string="(Keep empty to open the current situation)" colspan="4"/>
14 </group>
15 <footer>
16 <button name="analytic_account_chart_open_window" string="Open Charts" type="object" class="oe_highlight"/>
17 or
18 <button string="Cancel" class="oe_link" special="cancel"/>
19 </footer>
20 </form>
21 </field>
22 </record>
23
24 <record id="action_account_analytic_chart" model="ir.actions.act_window">
25 <field name="name">Chart of Analytic Accounts</field>
26 <field name="type">ir.actions.act_window</field>
27 <field name="res_model">account.analytic.chart</field>
28 <field name="view_type">form</field>
29 <field name="view_mode">form</field>
30 <field name="view_id" ref="account_analytic_chart_view"/>
31 <field name="target">new</field>
32 </record>
33
34 </data>
35</openerp>
036
=== added file 'analytic/project/wizard/account_analytic_cost_ledger_for_journal_report.py'
--- analytic/project/wizard/account_analytic_cost_ledger_for_journal_report.py 1970-01-01 00:00:00 +0000
+++ analytic/project/wizard/account_analytic_cost_ledger_for_journal_report.py 2014-04-28 09:41:45 +0000
@@ -0,0 +1,54 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import time
23from openerp.osv import fields, osv
24
25
26class account_analytic_cost_ledger_journal_report(osv.osv_memory):
27 _name = 'account.analytic.cost.ledger.journal.report'
28 _description = 'Account Analytic Cost Ledger For Journal Report'
29
30 _columns = {
31 'date1': fields.date('Start of period', required=True),
32 'date2': fields.date('End of period', required=True),
33 'journal': fields.many2many('account.analytic.journal', 'ledger_journal_rel', 'ledger_id', 'journal_id', 'Journals'),
34 }
35
36 _defaults = {
37 'date1': lambda *a: time.strftime('%Y-01-01'),
38 'date2': lambda *a: time.strftime('%Y-%m-%d')
39 }
40
41 def check_report(self, cr, uid, ids, context=None):
42 if context is None:
43 context = {}
44 data = self.read(cr, uid, ids)[0]
45 datas = {
46 'ids': context.get('active_ids', []),
47 'model': 'account.analytic.account',
48 'form': data
49 }
50
51 datas['form']['active_ids'] = context.get('active_ids', False)
52 return self.pool['report'].get_action(cr, uid, ids, 'account.report_analyticcostledgerquantity', data=datas, context=context)
53
54# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
055
=== added file 'analytic/project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml'
--- analytic/project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml 1970-01-01 00:00:00 +0000
+++ analytic/project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml 2014-04-28 09:41:45 +0000
@@ -0,0 +1,44 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5 <record id="account_analytic_cost_ledger_journal_view" model="ir.ui.view">
6 <field name="name">Account Analytic Cost Ledger Journal</field>
7 <field name="model">account.analytic.cost.ledger.journal.report</field>
8 <field name="arch" type="xml">
9 <form string="Select period" version="7.0">
10 <header>
11 <button name="check_report" string="Print" type="object" class="oe_highlight"/>
12 or
13 <button string="Cancel" class="oe_link" special="cancel"/>
14 </header>
15 <group string="Cost Ledger for Period" col="4">
16 <field name="date1"/>
17 <field name="date2"/>
18 <field name="journal" colspan="4"/>
19 </group>
20 </form>
21 </field>
22 </record>
23
24 <record id="action_account_analytic_cost_ledger_journal" model="ir.actions.act_window">
25 <field name="name">Cost Ledger (Only quantities)</field>
26 <field name="type">ir.actions.act_window</field>
27 <field name="res_model">account.analytic.cost.ledger.journal.report</field>
28 <field name="view_type">form</field>
29 <field name="view_mode">form</field>
30 <field name="view_id" ref="account_analytic_cost_ledger_journal_view"/>
31 <field name="target">new</field>
32 </record>
33
34 <record model="ir.values" id="account_analytic_cost_ledger_journal_values">
35 <field name="model_id" ref="analytic.model_account_analytic_account" />
36 <field name="name">Account Analytic Cost Ledger Journal</field>
37 <field name="key2">client_print_multi</field>
38 <field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_analytic_cost_ledger_journal'))" />
39 <field name="key">action</field>
40 <field name="model">account.analytic.account</field>
41 </record>
42
43 </data>
44</openerp>
045
=== added file 'analytic/project/wizard/account_analytic_cost_ledger_report.py'
--- analytic/project/wizard/account_analytic_cost_ledger_report.py 1970-01-01 00:00:00 +0000
+++ analytic/project/wizard/account_analytic_cost_ledger_report.py 2014-04-28 09:41:45 +0000
@@ -0,0 +1,54 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import time
23from openerp.osv import osv, fields
24
25
26class account_analytic_cost_ledger(osv.osv_memory):
27 _name = 'account.analytic.cost.ledger'
28 _description = 'Account Analytic Cost Ledger'
29
30 _columns = {
31 'date1': fields.date('Start of period', required=True),
32 'date2': fields.date('End of period', required=True),
33 }
34
35 _defaults = {
36 'date1': lambda *a: time.strftime('%Y-01-01'),
37 'date2': lambda *a: time.strftime('%Y-%m-%d')
38 }
39
40 def check_report(self, cr, uid, ids, context=None):
41 if context is None:
42 context = {}
43 data = self.read(cr, uid, ids)[0]
44 datas = {
45 'ids': context.get('active_ids',[]),
46 'model': 'account.analytic.account',
47 'form': data
48 }
49
50 datas['form']['active_ids'] = context.get('active_ids', False)
51
52 return self.pool['report'].get_action(cr, uid, ids, 'account.report_analyticcostledger', data=datas, context=context)
53
54# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
055
=== added file 'analytic/project/wizard/account_analytic_cost_ledger_view.xml'
--- analytic/project/wizard/account_analytic_cost_ledger_view.xml 1970-01-01 00:00:00 +0000
+++ analytic/project/wizard/account_analytic_cost_ledger_view.xml 2014-04-28 09:41:45 +0000
@@ -0,0 +1,43 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5 <record id="account_analytic_cost_view" model="ir.ui.view">
6 <field name="name">Account Analytic Check</field>
7 <field name="model">account.analytic.cost.ledger</field>
8 <field name="arch" type="xml">
9 <form string="Select Period" version="7.0">
10 <header>
11 <button name="check_report" string="Print" type="object" class="oe_highlight"/>
12 or
13 <button string="Cancel" class="oe_link" special="cancel"/>
14 </header>
15 <group col="4">
16 <field name="date1"/>
17 <field name="date2"/>
18 </group>
19 </form>
20 </field>
21 </record>
22
23 <record id="action_account_analytic_cost" model="ir.actions.act_window">
24 <field name="name">Cost Ledger</field>
25 <field name="type">ir.actions.act_window</field>
26 <field name="res_model">account.analytic.cost.ledger</field>
27 <field name="view_type">form</field>
28 <field name="view_mode">form</field>
29 <field name="view_id" ref="account_analytic_cost_view"/>
30 <field name="target">new</field>
31 </record>
32
33 <record model="ir.values" id="account_analytic_cost_values">
34 <field name="model_id" ref="analytic.model_account_analytic_account" />
35 <field name="name">Account Analytic Cost</field>
36 <field name="key2">client_print_multi</field>
37 <field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_analytic_cost'))" />
38 <field name="key">action</field>
39 <field name="model">account.analytic.account</field>
40 </record>
41
42 </data>
43</openerp>
044
=== added file 'analytic/project/wizard/account_analytic_inverted_balance_report.py'
--- analytic/project/wizard/account_analytic_inverted_balance_report.py 1970-01-01 00:00:00 +0000
+++ analytic/project/wizard/account_analytic_inverted_balance_report.py 2014-04-28 09:41:45 +0000
@@ -0,0 +1,52 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
18# along with this program. If not, see <http://www.gnu.org/licenses/>.
19#
20##############################################################################
21
22import time
23from openerp.osv import fields, osv
24
25
26class account_analytic_inverted_balance(osv.osv_memory):
27 _name = 'account.analytic.inverted.balance'
28 _description = 'Account Analytic Inverted Balance'
29
30 _columns = {
31 'date1': fields.date('Start of period', required=True),
32 'date2': fields.date('End of period', required=True),
33 }
34
35 _defaults = {
36 'date1': lambda *a: time.strftime('%Y-01-01'),
37 'date2': lambda *a: time.strftime('%Y-%m-%d')
38 }
39
40 def check_report(self, cr, uid, ids, context=None):
41 if context is None:
42 context = {}
43 data = self.read(cr, uid, ids)[0]
44 datas = {
45 'ids': context.get('active_ids', []),
46 'model': 'account.analytic.account',
47 'form': data
48 }
49 datas['form']['active_ids'] = context.get('active_ids', False)
50 return self.pool['report'].get_action(cr, uid, ids, 'account.report_invertedanalyticbalance', data=datas, context=context)
51
52# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
053
=== added file 'analytic/project/wizard/account_analytic_inverted_balance_report.xml'
--- analytic/project/wizard/account_analytic_inverted_balance_report.xml 1970-01-01 00:00:00 +0000
+++ analytic/project/wizard/account_analytic_inverted_balance_report.xml 2014-04-28 09:41:45 +0000
@@ -0,0 +1,43 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5 <record id="account_analytic_invert_balance_view" model="ir.ui.view">
6 <field name="name">Account Analytic Inverted Balance</field>
7 <field name="model">account.analytic.inverted.balance</field>
8 <field name="arch" type="xml">
9 <form string="Select Period" version="7.0">
10 <header>
11 <button name="check_report" string="Print" type="object" class="oe_highlight"/>
12 or
13 <button string="Cancel" class="oe_link" special="cancel"/>
14 </header>
15 <group col="4">
16 <field name="date1"/>
17 <field name="date2"/>
18 </group>
19 </form>
20 </field>
21 </record>
22
23 <record id="action_account_analytic_invert_balance" model="ir.actions.act_window">
24 <field name="name">Inverted Analytic Balance</field>
25 <field name="type">ir.actions.act_window</field>
26 <field name="res_model">account.analytic.inverted.balance</field>
27 <field name="view_type">form</field>
28 <field name="view_mode">form</field>
29 <field name="view_id" ref="account_analytic_invert_balance_view"/>
30 <field name="target">new</field>
31 </record>
32
33 <record model="ir.values" id="account_analytic_invert_balance_values">
34 <field name="model_id" ref="analytic.model_account_analytic_account" />
35 <field name="name">Account Analytic Inverted Balance</field>
36 <field name="key2">client_print_multi</field>
37 <field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_analytic_invert_balance'))" />
38 <field name="key">action</field>
39 <field name="model">account.analytic.account</field>
40 </record>
41
42 </data>
43</openerp>
044
=== added file 'analytic/project/wizard/account_analytic_journal_report.py'
--- analytic/project/wizard/account_analytic_journal_report.py 1970-01-01 00:00:00 +0000
+++ analytic/project/wizard/account_analytic_journal_report.py 2014-04-28 09:41:45 +0000
@@ -0,0 +1,75 @@
1# -*- coding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
6#
7# This program is free software: you can redistribute it and/or modify
8# it under the terms of the GNU Affero General Public License as
9# published by the Free Software Foundation, either version 3 of the
10# License, or (at your option) any later version.
11#
12# This program is distributed in the hope that it will be useful,
13# but WITHOUT ANY WARRANTY; without even the implied warranty of
14# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15# GNU Affero General Public License for more details.
16#
17# You should have received a copy of the GNU Affero General Public License
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to all changes: