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

Proposed by Chirag Dodiya(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-move-account-project-another-cod
Merge into: lp:openobject-addons
Diff against target: 2742 lines (+684/-750)
73 files modified
account/__init__.py (+0/-1)
account/__openerp__.py (+1/-16)
account/account.py (+1/-0)
account/account_analytic_line.py (+2/-1)
account/account_analytic_view.xml (+128/-0)
account/demo/account_minimal.xml (+6/-6)
account/partner_view.xml (+2/-2)
account/project/__init__.py (+0/-28)
account/project/project.py (+0/-50)
account/project/project_view.xml (+0/-372)
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 (+0/-7)
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 (+2/-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_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 (+3/-1)
analytic/__openerp__.py (+20/-5)
analytic/models/__init__.py (+3/-0)
analytic/models/analytic.py (+20/-0)
analytic/report/__init__.py (+3/-3)
analytic/report/analytic_balance.py (+1/-1)
analytic/report/analytic_cost_ledger.py (+1/-1)
analytic/report/analytic_inverted_balance.py (+1/-1)
analytic/report/analytic_journal.py (+1/-1)
analytic/report/analytic_quantity_cost_ledger.py (+1/-1)
analytic/security/analytic_security.xml (+7/-3)
analytic/views/analytic_view.xml (+306/-0)
analytic/wizard/__init__.py (+0/-1)
analytic/wizard/account_analytic_chart.py (+1/-1)
analytic/wizard/account_analytic_chart_view.xml (+0/-8)
analytic/wizard/account_analytic_journal_report_view.xml (+1/-8)
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_expense/security/ir.model.access.csv (+1/-1)
hr_timesheet/hr_timesheet_demo.xml (+15/-15)
hr_timesheet/security/ir.model.access.csv (+2/-2)
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)
mrp/security/ir.model.access.csv (+1/-1)
multi_company/multi_company_demo.xml (+15/-15)
project/project.py (+18/-5)
project_issue/project_issue.py (+5/-0)
project_issue_sheet/security/ir.model.access.csv (+2/-2)
project_timesheet/project_timesheet_view.xml (+3/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-move-account-project-another-cod
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+217894@code.launchpad.net

Description of the change

Hello,

    I have done following changes,

     -> merged account/project/project* with analytic/analytic*
     -> renamed report name
         cost_ledger.py -> analytic_cost_ledger.py
         quantity_cost_ledger.py -> analytic_quantity_cost_ledger.py
         inverted_analytic_balance.py -> analytic_inverted_balance.py
     ->when deleting a project IF there are no analytic lines defined on the analytic account of the project also delete the analytic account.
     -> when delete an analytic acccount whene there is project IF the project contains NO taks NOR issues also delete the project (instead of the Warning! Please delete the project linked with this account first.)
     -> merged https://pad.openerp.com/p/openerp-project.task-DZ6WAROGUU task.
Thanks,
cod

To post a comment you must log in.
9401. By Fabien (Open ERP)

[IMP] website images: allow no max_width (default), faster loading if no resize

9402. By Antony Lesuisse (OpenERP)

[MERGE] saas-4 up to 9398 <email address hidden>

9403. By Antony Lesuisse (OpenERP)

[MERGE] saas-4 report_webkit missing dependency on report

9404. By Fabien (Open ERP)

[IMP] Lossless PNG compression. Reduced size by 3 with pngquant

9405. By Antony Lesuisse (OpenERP)

[FIX] website controller, correctly resolve last merge about images
fix fp commit to use debian compatible werkzeug api data instead of set_data

9406. By Antony Lesuisse (OpenERP)

[FIX] website_event missing javascript asset

9407. By Fabien Meghazi (OpenERP)

[FIX] edi, calendar webclient bootstrap

9408. By Géry Debongnie

[MERGE] converts buttons in form views into 'stat buttons'

This branch converts pretty much every buttons in 'stat buttons',
which means buttons that can display any kind of information. Right
now, it is mostly used to display a numerical information (such as a
number, for example 9 Calls). Also, look at the invoices button in
Customers form view for an example of a functional field, displaying
the total amount invoiced.

The stat buttons also supports sub widgets, for example a mini pie chart
or a mini bar chart. Examples of such sub widgets can be found in
marketing/mass mailings form views (not ready yet)

9409. By Fabien (Open ERP)

[IMP] Certification Template

9410. By Raphael Collet (OpenERP)

[FIX] event: move definition of fields track_ids and count_tracks to the right module

9411. By Fabien Meghazi (OpenERP)

[IMP] website: load website.xml templates only in editable mode

9412. By Fabien Meghazi (OpenERP)

[ADD] base_import_module test module, static asset in backend bundle

9413. By jke-openerp

[MERGE] Merge with trunk-cal-V8-jke. - Change field datetime into date or datetime according to that event type is in all day or not...

9414. By Fabien Meghazi (OpenERP)

[REM] preprocess_request from website

The method is still there with only a pass statement
Will completetly remove once chm merges his branch

9415. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

9416. By Fabien Meghazi (OpenERP)

[FIX] jQuery.ui - boostrap conflict

9417. By Fabien Meghazi (OpenERP)

[REM] Removed addons.web#html_template usage

9418. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

9419. By Xavier (Open ERP)

[IMP] mail: type fixes

* _get_tracked_fields should return a dict even when there's no tracked field
  (return an empty dict)

* in write, only call _get_tracked_fields once, initialize to None instead of
  a list (especially since it should be a dict in the first place)

9420. By Géry Debongnie

Large cleanups in addons

The code I merged in my branch stat buttons was sadly not up to our
standing... This branch improves the situation by removing harmful
try/excpet/pass statements, by using search_count when appropriate, by
removing unused one2many fields and by correcting some bugs

9421. By Antony Lesuisse (OpenERP)

[MERGE] trunk-websit-al-refactor by chm
- allow fiscal position change on sale orders
- public user on website
- simplify website_sale sale.order and shopping cart code
- remove preprocess_request

9422. By Fabien Meghazi (OpenERP)

[REM] QWeb does not self close empty divs anymore

See web Rev#4011

9423. By Christophe Simonis (OpenERP)

[MERGE] forward port of branch saas-4 up to revid 9410 <email address hidden>

9424. By Fabien Meghazi (OpenERP)

[REM] completetly removed website#preprocess_request()

9425. By Quentin (OpenERP) <email address hidden>

[REV] partial revert of revision 9408 <email address hidden> where we wrongly beleive than stock depends on crm_claim... :( That code will probably be back _in the right module_

9426. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

9427. By Géry Debongnie

[MERGE] merge trunk-claimcount-fix-ged

Add the claim_count_out field to its correct place (in addon claim_from_delivery). The field was removed because it was incorrectly added to stock.py instead of the addon claim_from_delivery. (note: it was renamed from claim_count to claim_count_out)

9428. By Quentin (OpenERP) <email address hidden>

[MERGE] trunk-wms branch which include a lot of freaking features. Check the diff by yourself :-)

9429. By Mahendra Barad(OpenERP)

[MERGE] [IMP] crm, hr_recruitment, project, project_issue: use the newly-introduced widgets for the kanban state and the priority management.

This branch comes with a web branch holding those new widgets for form and kanban views.

9430. By Launchpad Translations on behalf of openerp

Launchpad automatic translations update.

9431. By Martin Trigaux (OpenERP)

[FIX] product: get_history_price recieves ids instead of a browse record for product template

9432. By Chirag Dodiya(OpenERP)

[Merge]: Merged with trunk

9433. By Chirag Dodiya(OpenERP)

[Merge]: changed model_id in model access file

9434. By Chirag Dodiya(OpenERP)

[IMP]Improved xpath used name istead of string,applied class on button of Time & Materials to Invoice,removed size from char field,removed separator

9435. By Chirag Dodiya(OpenERP)

[MRG]Merged with trunk

Unmerged revisions

9435. By Chirag Dodiya(OpenERP)

[MRG]Merged with trunk

9434. By Chirag Dodiya(OpenERP)

[IMP]Improved xpath used name istead of string,applied class on button of Time & Materials to Invoice,removed size from char field,removed separator

9433. By Chirag Dodiya(OpenERP)

[Merge]: changed model_id in model access file

9432. By Chirag Dodiya(OpenERP)

[Merge]: Merged with trunk

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account/__init__.py'
2--- account/__init__.py 2012-11-29 22:26:45 +0000
3+++ account/__init__.py 2014-05-16 11:21:01 +0000
4@@ -22,7 +22,6 @@
5 import partner
6 import account
7 import installer
8-import project
9 import account_invoice
10 import account_bank_statement
11 import account_bank
12
13=== modified file 'account/__openerp__.py'
14--- account/__openerp__.py 2014-04-29 15:41:04 +0000
15+++ account/__openerp__.py 2014-05-16 11:21:01 +0000
16@@ -96,24 +96,16 @@
17 'wizard/account_automatic_reconcile_view.xml',
18 'wizard/account_financial_report_view.xml',
19 'wizard/pos_box.xml',
20- 'project/wizard/project_account_analytic_line_view.xml',
21 'account_end_fy.xml',
22 'account_invoice_view.xml',
23 'data/account_data.xml',
24 'data/data_account_type.xml',
25 'data/configurable_account_chart.xml',
26 'account_invoice_workflow.xml',
27- 'project/project_view.xml',
28- 'project/project_report.xml',
29- 'project/wizard/account_analytic_balance_report_view.xml',
30- 'project/wizard/account_analytic_cost_ledger_view.xml',
31- 'project/wizard/account_analytic_inverted_balance_report.xml',
32- 'project/wizard/account_analytic_journal_report_view.xml',
33- 'project/wizard/account_analytic_cost_ledger_for_journal_report_view.xml',
34- 'project/wizard/account_analytic_chart_view.xml',
35 'partner_view.xml',
36 'product_view.xml',
37 'account_assert_test.xml',
38+ 'account_analytic_view.xml',
39 'ir_sequence_view.xml',
40 'company_view.xml',
41 'edi/invoice_action_data.xml',
42@@ -134,11 +126,6 @@
43 'views/report_partnerledgerother.xml',
44 'views/report_financial.xml',
45 'views/report_generalledger.xml',
46- 'project/views/report_analyticbalance.xml',
47- 'project/views/report_analyticjournal.xml',
48- 'project/views/report_analyticcostledgerquantity.xml',
49- 'project/views/report_analyticcostledger.xml',
50- 'project/views/report_invertedanalyticbalance.xml',
51 'views/account.xml',
52 ],
53 'qweb' : [
54@@ -147,8 +134,6 @@
55 ],
56 'demo': [
57 'demo/account_demo.xml',
58- 'project/project_demo.xml',
59- 'project/analytic_account_demo.xml',
60 'demo/account_minimal.xml',
61 'demo/account_invoice_demo.xml',
62 'account_unit_test.xml',
63
64=== modified file 'account/account.py'
65--- account/account.py 2014-04-24 13:45:33 +0000
66+++ account/account.py 2014-05-16 11:21:01 +0000
67@@ -734,6 +734,7 @@
68 'loss_account_id' : fields.many2one('account.account', 'Loss Account'),
69 'internal_account_id' : fields.many2one('account.account', 'Internal Transfers Account', select=1),
70 'cash_control' : fields.boolean('Cash Control', help='If you want the journal should be control at opening/closing, check this option'),
71+ 'analytic_journal_id':fields.many2one('account.analytic.journal','Analytic Journal', help="Journal for analytic entries"),
72 }
73
74 _defaults = {
75
76=== modified file 'account/account_analytic_line.py'
77--- account/account_analytic_line.py 2013-10-27 12:31:04 +0000
78+++ account/account_analytic_line.py 2014-05-16 11:21:01 +0000
79@@ -29,13 +29,14 @@
80 _columns = {
81 'product_uom_id': fields.many2one('product.uom', 'Unit of Measure'),
82 'product_id': fields.many2one('product.product', 'Product'),
83- 'general_account_id': fields.many2one('account.account', 'General Account', required=True, ondelete='restrict'),
84+ 'general_account_id': fields.many2one('account.account', 'Financial Account', required=True, ondelete='restrict'),
85 'move_id': fields.many2one('account.move.line', 'Move Line', ondelete='cascade', select=True),
86 'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal', required=True, ondelete='restrict', select=True),
87 'code': fields.char('Code', size=8),
88 'ref': fields.char('Ref.', size=64),
89 '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),
90 '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),
91+ 'partner_id': fields.related('account_id', 'partner_id', type='many2one', relation='res.partner', string='Partner', store=True),
92 }
93
94 _defaults = {
95
96=== added file 'account/account_analytic_view.xml'
97--- account/account_analytic_view.xml 1970-01-01 00:00:00 +0000
98+++ account/account_analytic_view.xml 2014-05-16 11:21:01 +0000
99@@ -0,0 +1,128 @@
100+<?xml version="1.0" encoding="utf-8"?>
101+<openerp>
102+ <data>
103+ <record id="view_account_analytic_line_form_1" model="ir.ui.view">
104+ <field name="name">account.analytic.line.form.1</field>
105+ <field name="model">account.analytic.line</field>
106+ <field name="inherit_id" ref="analytic.view_account_analytic_line_form"/>
107+ <field name="arch" type="xml">
108+ <xpath expr="//field[@name='account_id']" position="after">
109+ <field name="journal_id"/>
110+ </xpath>
111+ <xpath expr="//field[@name='date']" position="after">
112+ <field name="product_id" string="Product"/>
113+ <field name="ref"/>
114+ </xpath>
115+ <xpath expr="//field[@name='company_id']" position="after">
116+ <field name="partner_id"/>
117+ </xpath>
118+ <xpath expr="//field[@name='amount']" position="after">
119+ <label for="amount_currency" groups="base.group_multi_currency"/>
120+ <div groups="base.group_multi_currency">
121+ <field name="amount_currency" class="oe_inline"/>
122+ <field name="currency_id" class="oe_inline"/>
123+ </div>
124+ <field invisible="1" name="general_account_id"/>
125+ </xpath>
126+ <xpath expr="//group[@name='product_info']" position="replace">
127+ <group string="Product Information" name="product_info">
128+ <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
129+ <label for="unit_amount"/>
130+ <div>
131+ <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
132+ <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
133+ </div>
134+ </group>
135+ </xpath>
136+ <xpath expr="//group[@name='product_info']" position="after">
137+ <group string="General Accounting">
138+ <field name="general_account_id"/>
139+ <field name="move_id" readonly="1"/>
140+ </group>
141+ </xpath>
142+ </field>
143+ </record>
144+ <record id="view_account_analytic_line_tree_1" model="ir.ui.view">
145+ <field name="name">account.analytic.line.tree.1</field>
146+ <field name="model">account.analytic.line</field>
147+ <field name="inherit_id" ref="analytic.view_account_analytic_line_tree"/>
148+ <field name="arch" type="xml">
149+ <xpath expr="//field[@name='date']" position="after">
150+ <field name="ref" invisible="context.get('to_invoice', False)"/>
151+ </xpath>
152+ <xpath expr="//field[@name='user_id']" position="after">
153+ <field name="partner_id"/>
154+ <field name="journal_id" invisible="context.get('to_invoice', False)"/>
155+ </xpath>
156+ <xpath expr="//field[@name='amount']" position="after">
157+ <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)"/>
158+ </xpath>
159+ <xpath expr="//field[@name='unit_amount']" position="after">
160+ <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)"/>
161+ </xpath>
162+ <xpath expr="//field[@name='account_id']" position="after">
163+ <field name="general_account_id" invisible="context.get('to_invoice', False)"/>
164+ </xpath>
165+ </field>
166+ </record>
167+ <record id="view_account_analytic_line_filter_1" model="ir.ui.view">
168+ <field name="name">account.analytic.line.select.1</field>
169+ <field name="model">account.analytic.line</field>
170+ <field name="inherit_id" ref="analytic.view_account_analytic_line_filter"/>
171+ <field name="arch" type="xml">
172+ <xpath expr="//field[@name='date']" position="after">
173+ <field name="product_id"/>
174+ <filter name="sales" string="Sales" domain="[('journal_id.type','=','sale')]" help="Analytic Journal Items related to a sale journal."/>
175+ <filter name="purchases" string="Purchases" domain="[('journal_id.type','=','purchase')]" help="Analytic Journal Items related to a purchase journal."/>
176+ <filter name="others" string="Others" domain="[('journal_id.type','in',('cash','general','situation'))]"/>
177+ </xpath>
178+ <xpath expr="//field[@name='account_id']" position="after">
179+ <field name="partner_id" filter_domain="[('partner_id','child_of',self)]"/>
180+ </xpath>
181+ <xpath expr="//filter[@name='account_id']" position="after">
182+ <filter string="Financial Account" context="{'group_by':'general_account_id'}"/>
183+ <filter string="Journal" context="{'group_by':'journal_id'}" name="group_journal"/>
184+ </xpath>
185+ <xpath expr="//filter[@name='user_id']" position="before">
186+ <filter string="Product" context="{'group_by':'product_id'}"/>
187+ <filter string="Partner" context="{'group_by':'partner_id'}"/>
188+ </xpath>
189+ </field>
190+ </record>
191+
192+ <menuitem groups="analytic.group_analytic_accounting"
193+ action="analytic.action_account_analytic_journal_open_form"
194+ id="account_analytic_journal_entries"
195+ parent="menu_finance_entries"/>
196+
197+ <record id="view_account_journal_1" model="ir.ui.view">
198+ <field name="name">account.journal.form.1</field>
199+ <field name="model">account.journal</field>
200+ <field name="inherit_id" ref="account.view_account_journal_form"/>
201+ <field name="arch" type="xml">
202+ <field name="type" position="after">
203+ <field name="analytic_journal_id" groups="analytic.group_analytic_accounting"/>
204+ </field>
205+ </field>
206+ </record>
207+
208+ <menuitem groups="analytic.group_analytic_accounting" id="next_id_40"
209+ name="Analytic" parent="account.menu_finance_generic_reporting"
210+ sequence="4"/>
211+ <menuitem groups="analytic.group_analytic_accounting"
212+ action="analytic.action_account_analytic_journal"
213+ id="account_analytic_journal_print" parent="account.next_id_40"/>
214+ <menuitem
215+ name="Chart of Analytic Accounts"
216+ parent="account.menu_finance_charts"
217+ action="analytic.action_account_analytic_chart"
218+ id="menu_action_analytic_account_tree2"
219+ icon="STOCK_INDENT"
220+ groups="analytic.group_analytic_accounting"/>
221+ <menuitem action="analytic.action_account_analytic_account_form" id="account_analytic_def_account"
222+ parent="menu_analytic_accounting"
223+ groups="analytic.group_analytic_accounting"/>
224+
225+ <menuitem groups="analytic.group_analytic_accounting" action="analytic.action_account_analytic_journal_form" id="account_def_analytic_journal" parent="menu_analytic_accounting" sequence="5"/>
226+ </data>
227+</openerp>
228
229=== modified file 'account/demo/account_minimal.xml'
230--- account/demo/account_minimal.xml 2013-10-27 12:31:04 +0000
231+++ account/demo/account_minimal.xml 2014-05-16 11:21:01 +0000
232@@ -315,7 +315,7 @@
233 <field name="sequence_id" ref="sequence_sale_journal"/>
234 <field name="default_credit_account_id" ref="a_sale"/>
235 <field name="default_debit_account_id" ref="a_sale"/>
236- <field name="analytic_journal_id" ref="cose_journal_sale"/>
237+ <field name="analytic_journal_id" ref="analytic.cose_journal_sale"/>
238 <field name="user_id" ref="base.user_root"/>
239 </record>
240 <record id="refund_sales_journal" model="account.journal">
241@@ -325,7 +325,7 @@
242 <field name="sequence_id" ref="sequence_refund_sales_journal"/>
243 <field name="default_credit_account_id" ref="a_sale"/>
244 <field name="default_debit_account_id" ref="a_sale"/>
245- <field name="analytic_journal_id" ref="cose_journal_sale"/>
246+ <field name="analytic_journal_id" ref="analytic.cose_journal_sale"/>
247 <field name="user_id" ref="base.user_root"/>
248 </record>
249
250@@ -357,7 +357,7 @@
251 <field name="sequence_id" ref="sequence_bank_journal"/>
252 <field name="default_debit_account_id" ref="bnk"/>
253 <field name="default_credit_account_id" ref="bnk"/>
254- <field name="analytic_journal_id" ref="sit"/>
255+ <field name="analytic_journal_id" ref="analytic.sit"/>
256 <field name="user_id" ref="base.user_root"/>
257 </record>
258 <record id="check_journal" model="account.journal">
259@@ -367,7 +367,7 @@
260 <field name="sequence_id" ref="sequence_check_journal"/>
261 <field name="default_debit_account_id" ref="cash"/>
262 <field name="default_credit_account_id" ref="cash"/>
263- <field name="analytic_journal_id" ref="sit"/>
264+ <field name="analytic_journal_id" ref="analytic.sit"/>
265 <field name="user_id" ref="base.user_root"/>
266 </record>
267 <record id="cash_journal" model="account.journal">
268@@ -387,7 +387,7 @@
269 <field name="sequence_id" ref="sequence_cash_journal"/>
270 <field name="default_debit_account_id" ref="cash"/>
271 <field name="default_credit_account_id" ref="cash"/>
272- <field name="analytic_journal_id" ref="sit"/>
273+ <field name="analytic_journal_id" ref="analytic.sit"/>
274 <field name="user_id" ref="base.user_root"/>
275 </record>
276 <record id="miscellaneous_journal" model="account.journal">
277@@ -395,7 +395,7 @@
278 <field name="code">TMIS</field>
279 <field name="type">general</field>
280 <field name="sequence_id" ref="sequence_miscellaneous_journal"/>
281- <field name="analytic_journal_id" ref="sit"/>
282+ <field name="analytic_journal_id" ref="analytic.sit"/>
283 <field name="user_id" ref="base.user_root"/>
284 </record>
285 <record id="opening_journal" model="account.journal">
286
287=== modified file 'account/partner_view.xml'
288--- account/partner_view.xml 2014-05-02 13:07:53 +0000
289+++ account/partner_view.xml 2014-05-16 11:21:01 +0000
290@@ -54,8 +54,8 @@
291 <field name="context">{'search_default_partner_id': [active_id], 'default_partner_id': active_id}</field>
292 <field name="name">Contracts/Analytic Accounts</field>
293 <field name="res_model">account.analytic.account</field>
294- <field name="view_id" ref="view_account_analytic_account_tree"/>
295- <field name="search_view_id" ref="view_account_analytic_account_search"/>
296+ <field name="view_id" ref="analytic.view_account_analytic_account_tree"/>
297+ <field name="search_view_id" ref="analytic.view_account_analytic_account_search"/>
298 </record>
299 <record model="ir.ui.view" id="partner_view_buttons">
300 <field name="name">partner.view.buttons</field>
301
302=== removed file 'account/project/__init__.py'
303--- account/project/__init__.py 2011-01-14 00:11:01 +0000
304+++ account/project/__init__.py 1970-01-01 00:00:00 +0000
305@@ -1,28 +0,0 @@
306-# -*- coding: utf-8 -*-
307-##############################################################################
308-#
309-# OpenERP, Open Source Management Solution
310-# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
311-#
312-# This program is free software: you can redistribute it and/or modify
313-# it under the terms of the GNU Affero General Public License as
314-# published by the Free Software Foundation, either version 3 of the
315-# License, or (at your option) any later version.
316-#
317-# This program is distributed in the hope that it will be useful,
318-# but WITHOUT ANY WARRANTY; without even the implied warranty of
319-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
320-# GNU Affero General Public License for more details.
321-#
322-# You should have received a copy of the GNU Affero General Public License
323-# along with this program. If not, see <http://www.gnu.org/licenses/>.
324-#
325-##############################################################################
326-
327-import project
328-import report
329-import wizard
330-
331-
332-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
333-
334
335=== removed file 'account/project/project.py'
336--- account/project/project.py 2013-10-27 12:31:04 +0000
337+++ account/project/project.py 1970-01-01 00:00:00 +0000
338@@ -1,50 +0,0 @@
339-# -*- coding: utf-8 -*-
340-##############################################################################
341-#
342-# OpenERP, Open Source Management Solution
343-# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
344-#
345-# This program is free software: you can redistribute it and/or modify
346-# it under the terms of the GNU Affero General Public License as
347-# published by the Free Software Foundation, either version 3 of the
348-# License, or (at your option) any later version.
349-#
350-# This program is distributed in the hope that it will be useful,
351-# but WITHOUT ANY WARRANTY; without even the implied warranty of
352-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
353-# GNU Affero General Public License for more details.
354-#
355-# You should have received a copy of the GNU Affero General Public License
356-# along with this program. If not, see <http://www.gnu.org/licenses/>.
357-#
358-##############################################################################
359-
360-from openerp.osv import fields, osv
361-
362-class account_analytic_journal(osv.osv):
363- _name = 'account.analytic.journal'
364- _description = 'Analytic Journal'
365- _columns = {
366- 'name': fields.char('Journal Name', size=64, required=True),
367- 'code': fields.char('Journal Code', size=8),
368- '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."),
369- '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."),
370- 'line_ids': fields.one2many('account.analytic.line', 'journal_id', 'Lines'),
371- 'company_id': fields.many2one('res.company', 'Company', required=True),
372- }
373- _defaults = {
374- 'active': True,
375- 'type': 'general',
376- 'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
377- }
378-
379-
380-class account_journal(osv.osv):
381- _inherit="account.journal"
382-
383- _columns = {
384- 'analytic_journal_id':fields.many2one('account.analytic.journal','Analytic Journal', help="Journal for analytic entries"),
385- }
386-
387-
388-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
389
390=== removed file 'account/project/project_view.xml'
391--- account/project/project_view.xml 2014-04-22 16:20:28 +0000
392+++ account/project/project_view.xml 1970-01-01 00:00:00 +0000
393@@ -1,372 +0,0 @@
394-<?xml version="1.0" encoding="utf-8"?>
395-<openerp>
396- <data>
397-
398- <record id="view_account_analytic_account_list" model="ir.ui.view">
399- <field name="name">account.analytic.account.list</field>
400- <field name="model">account.analytic.account</field>
401- <field eval="8" name="priority"/>
402- <field name="arch" type="xml">
403- <tree toolbar="1" colors="red:state=='pending';grey:state in ('cancelled','close');blue:type=='view'" string="Analytic Accounts">
404- <field name="complete_name"/>
405- <field name="partner_id"/>
406- <field name="code"/>
407- <field name="date_start"/>
408- <field name="date"/>
409- <field name="user_id" invisible="1"/>
410- <field name="manager_id"/>
411- <field name="parent_id" invisible="1"/>
412- <field name="state" invisible="1"/>
413- <field name="type" invisible="1"/>
414- <field name="template_id" invisible="1"/>
415- <field name="company_id" groups="base.group_multi_company"/>
416- </tree>
417- </field>
418- </record>
419-
420- <record id="view_account_analytic_account_search" model="ir.ui.view">
421- <field name="name">account.analytic.account.search</field>
422- <field name="model">account.analytic.account</field>
423- <field name="arch" type="xml">
424- <search string="Analytic Account">
425- <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Analytic Account"/>
426- <field name="date"/>
427- <field name="partner_id" operator="child_of"/>
428- <field name="manager_id"/>
429- <field name="parent_id"/>
430- <field name="user_id"/>
431- <filter string="Open" domain="[('state','=','open')]" help="Current Accounts"/>
432- <filter string="Pending" domain="[('state','=','pending')]" help="Pending Accounts"/>
433- <group expand="0" string="Group By...">
434- <filter string="Associated Partner" domain="[]" context="{'group_by':'partner_id'}"/>
435- <filter string="Type" domain="[]" context="{'group_by':'type'}"/>
436- <filter string="Template" domain="[]" context="{'group_by':'template_id'}"/>
437- <filter string="Parent Account" domain="[]" context="{'group_by':'parent_id'}"/>
438- <filter string="Status" domain="[]" context="{'group_by':'state'}" groups="base.group_no_one"/>
439- </group>
440- </search>
441- </field>
442- </record>
443-
444- <record id="view_account_analytic_account_tree" model="ir.ui.view">
445- <field name="name">account.analytic.account.tree</field>
446- <field name="model">account.analytic.account</field>
447- <field name="field_parent">child_complete_ids</field>
448- <field name="arch" type="xml">
449- <tree colors="blue:state=='pending';grey:state in ('close','cancelled');blue:type=='view'" string="Analytic account" toolbar="1">
450- <field name="name" invisible="1"/>
451- <field name="complete_name"/>
452- <field name="code"/>
453- <field name="debit"/>
454- <field name="credit"/>
455- <field name="balance"/>
456- <field name="state" invisible="1"/>
457- <field name="currency_id" groups="base.group_multi_currency"/>
458- <field name="date" invisible="1"/>
459- <field name="user_id" invisible="1"/>
460- <field name="partner_id" invisible="1"/>
461- <field name="parent_id" invisible="1"/>
462- <field name="type"/>
463- <field name="company_id" groups="base.group_multi_company"/>
464- <field name="template_id" invisible="1"/>
465- </tree>
466- </field>
467- </record>
468-
469-
470- <record id="action_account_analytic_account_form" model="ir.actions.act_window">
471- <field name="name">Analytic Accounts</field>
472- <field name="type">ir.actions.act_window</field>
473- <field name="res_model">account.analytic.account</field>
474- <field name="context">{}</field> <!-- repair invalid context by setting empty one -->
475- <field name="view_type">form</field>
476- <field name="view_mode">tree,form</field>
477- <field name="view_id" ref="view_account_analytic_account_tree"/>
478- <field name="search_view_id" ref="account.view_account_analytic_account_search"/>
479- </record>
480- <menuitem action="action_account_analytic_account_form" id="account_analytic_def_account"
481- parent="menu_analytic_accounting"
482- groups="analytic.group_analytic_accounting"/>
483-
484- <record id="act_account_renew_view" model="ir.actions.act_window">
485- <field name="name">Accounts to Renew</field>
486- <field name="type">ir.actions.act_window</field>
487- <field name="res_model">account.analytic.account</field>
488- <field name="view_type">form</field>
489- <field name="view_mode">tree,form</field>
490- <field name="domain">[('date','&lt;',time.strftime('%Y-%m-%d %H:%M:%S'))]</field>
491- <field name="filter" eval="True"/>
492- </record>
493-
494- <record id="action_account_analytic_account_tree2" model="ir.actions.act_window">
495- <field name="name">Chart of Analytic Accounts</field>
496- <field name="res_model">account.analytic.account</field>
497- <field name="view_type">tree</field>
498- <field name="view_id" ref="view_account_analytic_account_tree"/>
499- <field name="domain">[('parent_id','=',False)]</field>
500- <field name="help" type="html">
501- <p>
502- Click to add a new analytic account.
503- </p><p>
504- The normal chart of accounts has a structure defined by the
505- legal requirement of the country. The analytic chart of
506- accounts structure should reflect your own business needs in
507- term of costs/revenues reporting.
508- </p><p>
509- They are usually structured by contracts, projects, products or
510- departements. Most of the OpenERP operations (invoices,
511- timesheets, expenses, etc) generate analytic entries on the
512- related account.
513- </p>
514- </field>
515- </record>
516-
517-
518- <record id="view_account_analytic_line_form" model="ir.ui.view">
519- <field name="name">account.analytic.line.form</field>
520- <field name="model">account.analytic.line</field>
521- <field name="priority">1</field>
522- <field name="arch" type="xml">
523- <form string="Analytic Entry" version="7.0">
524- <group>
525- <group>
526- <field name="name"/>
527- <field name="account_id"/>
528- <field name="journal_id"/>
529- <field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'account.group_account_invoice']}"/>
530- </group>
531- <group>
532- <field name="date"/>
533- <field name="ref"/>
534- <field name="company_id" groups="base.group_multi_company"/>
535- </group>
536- <group string="Amount">
537- <field name="amount"/>
538- <label for="amount_currency" groups="base.group_multi_currency"/>
539- <div groups="base.group_multi_currency">
540- <field name="amount_currency" class="oe_inline"/>
541- <field name="currency_id" class="oe_inline"/>
542- </div>
543- </group>
544- <group string="Product Information">
545- <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
546- <label for="unit_amount"/>
547- <div>
548- <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
549- <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
550- </div>
551- </group>
552- <group string="General Accounting">
553- <field name="general_account_id"/>
554- <field name="move_id" readonly="1"/>
555- </group>
556- </group>
557- </form>
558- </field>
559- </record>
560- <record id="view_account_analytic_line_tree" model="ir.ui.view">
561- <field name="name">account.analytic.line.tree</field>
562- <field name="model">account.analytic.line</field>
563- <field name="arch" type="xml">
564- <tree string="Analytic Entries">
565- <field name="date"/>
566- <field name="ref" invisible="context.get('to_invoice', False)"/>
567- <field name="name"/>
568- <field name="user_id"/>
569- <field name="journal_id" invisible="context.get('to_invoice', False)"/>
570- <field name="amount" sum="Total" invisible="context.get('to_invoice', False)"/>
571- <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)"/>
572- <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" sum="Total Quantity"/>
573- <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)"/>
574- <field domain="[('type','=','normal')]" name="account_id"/>
575- <field name="general_account_id" invisible="context.get('to_invoice', False)"/>
576- <field name="company_id" groups="base.group_multi_company"/>
577- </tree>
578- </field>
579- </record>
580- <record id="view_account_analytic_line_filter" model="ir.ui.view">
581- <field name="name">account.analytic.line.select</field>
582- <field name="model">account.analytic.line</field>
583- <field name="arch" type="xml">
584- <search string="Search Analytic Lines">
585- <field name="name" string="Analytic Line"/>
586- <field name="date"/>
587- <filter name="sales" string="Sales" domain="[('journal_id.type','=','sale')]" help="Analytic Journal Items related to a sale journal."/>
588- <filter name="purchases" string="Purchases" domain="[('journal_id.type','=','purchase')]" help="Analytic Journal Items related to a purchase journal."/>
589- <filter name="others" string="Others" domain="[('journal_id.type','in',('cash','general','situation'))]"/>
590- <separator/>
591- <filter string="My Entries" domain="[('user_id','=',uid)]"/>
592- <field name="account_id"/>
593- <field name="user_id"/>
594- <group string="Group By..." expand="0">
595- <filter string="Analytic Account" context="{'group_by':'account_id'}"/>
596- <filter string="Fin. Account" context="{'group_by':'general_account_id'}"/>
597- <filter string="Journal" context="{'group_by':'journal_id'}" name="group_journal"/>
598- <separator/>
599- <filter string="Product" context="{'group_by':'product_id'}"/>
600- <filter string="User" context="{'group_by':'user_id'}"/>
601- <separator/>
602- <filter string="Tasks Month" context="{'group_by':'date'}" name="group_date" help="Invoice Tasks by Month"/>
603-
604- </group>
605- </search>
606- </field>
607- </record>
608- <record id="action_account_analytic_line_form" model="ir.actions.act_window">
609- <field name="name">Analytic Entries</field>
610- <field name="type">ir.actions.act_window</field>
611- <field name="res_model">account.analytic.line</field>
612- <field name="view_type">form</field>
613- <field name="context">{"search_default_user_id":uid}</field>
614- <field name="view_id" ref="view_account_analytic_line_tree"/>
615- </record>
616-
617- <!-- Entries by Line -->
618-
619- <record id="action_account_tree1" model="ir.actions.act_window">
620- <field name="name">Analytic Items</field>
621- <field name="res_model">account.analytic.line</field>
622- <field name="view_type">form</field>
623- <field name="view_mode">tree,form</field>
624- <field name="domain">[('account_id','child_of',[active_id])]</field>
625- <field name="context">{'account_id':active_id}</field>
626- <field name="search_view_id" ref="view_account_analytic_line_filter"/>
627- </record>
628- <record id="ir_open_account_analytic_account" model="ir.values">
629- <field eval="'tree_but_open'" name="key2"/>
630- <field eval="'account.analytic.account'" name="model"/>
631- <field name="name">Open Account Tree</field>
632- <field eval="'ir.actions.act_window,%d'%action_account_tree1" name="value"/>
633- </record>
634-
635- <record id="account_analytic_line_extended_form" model="ir.ui.view">
636- <field name="name">account.analytic.line.extended_form</field>
637- <field name="model">account.analytic.line</field>
638- <field name="arch" type="xml">
639- <form string="Project line" version="7.0">
640- <group>
641- <group>
642- <field name="name"/>
643- <field name="account_id"/>
644- <field name="journal_id"/>
645- </group>
646- <group>
647- <field name="date" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
648- <field name="company_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
649- </group>
650- <group string="Amount">
651- <field name="amount"/>
652- <label for="amount_currency" groups="base.group_multi_currency"/>
653- <div groups="base.group_multi_currency">
654- <field name="amount_currency" class="oe_inline"/>
655- <field name="currency_id" class="oe_inline"/>
656- </div>
657- <field invisible="1" name="general_account_id"/>
658- </group>
659- <group string="Product Information">
660- <field name="product_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id, journal_id)"/>
661- <label for="unit_amount"/>
662- <div>
663- <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
664- <field name="product_uom_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
665- </div>
666- </group>
667- </group>
668- </form>
669- </field>
670- </record>
671- <record id="action_account_analytic_account_line_extended_form" model="ir.actions.act_window">
672- <field name="name">account.analytic.line.extended</field>
673- <field name="type">ir.actions.act_window</field>
674- <field name="res_model">account.analytic.line</field>
675- <field name="view_type">form</field>
676- <field name="view_id" ref="account_analytic_line_extended_form"/>
677- </record>
678-
679- #
680- # Analytic Journal
681- #
682-
683- <record id="view_account_analytic_journal_tree" model="ir.ui.view">
684- <field name="name">account.analytic.journal.tree</field>
685- <field name="model">account.analytic.journal</field>
686- <field name="arch" type="xml">
687- <tree string="Analytic Journal">
688- <field name="code"/>
689- <field name="name"/>
690- <field name="type"/>
691- </tree>
692- </field>
693- </record>
694-
695- <record id="view_analytic_journal_search" model="ir.ui.view">
696- <field name="name">account.analytic.journal.search</field>
697- <field name="model">account.analytic.journal</field>
698- <field name="arch" type="xml">
699- <search string="Analytic Journals">
700- <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Analytic Journal"/>
701- <field name="type"/>
702- <group expand="0" string="Group By...">
703- <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
704- </group>
705- </search>
706- </field>
707- </record>
708-
709- <record id="view_account_analytic_journal_form" model="ir.ui.view">
710- <field name="name">account.analytic.journal.form</field>
711- <field name="model">account.analytic.journal</field>
712- <field name="arch" type="xml">
713- <form string="Analytic Journal" version="7.0">
714- <group col="4">
715- <field name="name"/>
716- <field name="code"/>
717- <field name="type"/>
718- <field name="active"/>
719- <field name="company_id" groups="base.group_multi_company"/>
720- </group>
721- </form>
722- </field>
723- </record>
724- <record id="action_account_analytic_journal_form" model="ir.actions.act_window">
725- <field name="name">Analytic Journals</field>
726- <field name="res_model">account.analytic.journal</field>
727- <field name="view_type">form</field>
728- <field name="view_mode">tree,form</field>
729- <field name="search_view_id" ref="view_analytic_journal_search" />
730- </record>
731- <menuitem groups="analytic.group_analytic_accounting" action="action_account_analytic_journal_form" id="account_def_analytic_journal" parent="menu_analytic_accounting" sequence="5"/>
732-
733- #
734- # Open journal entries
735- #
736-
737- <record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
738- <field name="name">Analytic Journal Items</field>
739- <field name="res_model">account.analytic.line</field>
740- <field name="view_type">form</field>
741- <field name="view_mode">tree,form</field>
742- </record>
743- <menuitem groups="analytic.group_analytic_accounting"
744- action="action_account_analytic_journal_open_form"
745- id="account_analytic_journal_entries"
746- parent="menu_finance_entries"/>
747-
748- #
749- # Reporting
750- #
751-
752-
753- <record id="view_account_journal_1" model="ir.ui.view">
754- <field name="name">account.journal.form.1</field>
755- <field name="model">account.journal</field>
756- <field name="inherit_id" ref="account.view_account_journal_form"/>
757- <field name="arch" type="xml">
758- <field name="type" position="after">
759- <field name="analytic_journal_id" groups="analytic.group_analytic_accounting"/>
760- </field>
761- </field>
762- </record>
763-
764- </data>
765-</openerp>
766
767=== removed file 'account/project/wizard/project_account_analytic_line.py'
768--- account/project/wizard/project_account_analytic_line.py 2013-10-27 12:31:04 +0000
769+++ account/project/wizard/project_account_analytic_line.py 1970-01-01 00:00:00 +0000
770@@ -1,57 +0,0 @@
771-# -*- coding: utf-8 -*-
772-##############################################################################
773-#
774-# OpenERP, Open Source Management Solution
775-# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
776-#
777-# This program is free software: you can redistribute it and/or modify
778-# it under the terms of the GNU Affero General Public License as
779-# published by the Free Software Foundation, either version 3 of the
780-# License, or (at your option) any later version.
781-#
782-# This program is distributed in the hope that it will be useful,
783-# but WITHOUT ANY WARRANTY; without even the implied warranty of
784-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
785-# GNU Affero General Public License for more details.
786-#
787-# You should have received a copy of the GNU Affero General Public License
788-# along with this program. If not, see <http://www.gnu.org/licenses/>.
789-#
790-##############################################################################
791-from openerp.osv import fields, osv
792-from openerp.tools.translate import _
793-
794-class project_account_analytic_line(osv.osv_memory):
795- _name = "project.account.analytic.line"
796- _description = "Analytic Entries by line"
797- _columns = {
798- 'from_date': fields.date('From'),
799- 'to_date': fields.date('To'),
800- }
801-
802- def action_open_window(self, cr, uid, ids, context=None):
803- mod_obj =self.pool.get('ir.model.data')
804- domain = []
805- data = self.read(cr, uid, ids, [])[0]
806- from_date = data['from_date']
807- to_date = data['to_date']
808- if from_date and to_date:
809- domain = [('date','>=',from_date), ('date','<=',to_date)]
810- elif from_date:
811- domain = [('date','>=',from_date)]
812- elif to_date:
813- domain = [('date','<=',to_date)]
814- result = mod_obj.get_object_reference(cr, uid, 'account', 'view_account_analytic_line_filter')
815- id = result and result[1] or False
816- return {
817- 'name': _('Analytic Entries by line'),
818- 'view_type': 'form',
819- "view_mode": 'tree,form',
820- 'res_model': 'account.analytic.line',
821- 'type': 'ir.actions.act_window',
822- 'domain': domain,
823- 'search_view_id': id['res_id'],
824- }
825-
826-
827-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
828
829=== removed file 'account/project/wizard/project_account_analytic_line_view.xml'
830--- account/project/wizard/project_account_analytic_line_view.xml 2012-11-29 22:26:45 +0000
831+++ account/project/wizard/project_account_analytic_line_view.xml 1970-01-01 00:00:00 +0000
832@@ -1,34 +0,0 @@
833-<?xml version="1.0" encoding="utf-8"?>
834-<openerp>
835- <data>
836-
837- <record id="view_project_account_analytic_line_form" model="ir.ui.view">
838- <field name="name">project.account.analytic.line.form</field>
839- <field name="model">project.account.analytic.line</field>
840- <field name="arch" type="xml">
841- <form string="View Account Analytic Lines" version="7.0">
842- <header>
843- <button string="Open Entries" name="action_open_window" type="object" class="oe_highlight"/>
844- or
845- <button string="Cancel" class="oe_link" special="cancel"/>
846- </header>
847- <group col="4">
848- <field name="from_date"/>
849- <field name="to_date"/>
850- </group>
851- <label string ="(Keep empty to open the current situation)" />
852- </form>
853- </field>
854- </record>
855-
856- <record id="action_project_account_analytic_line_form" model="ir.actions.act_window">
857- <field name="name">Entries By Line</field>
858- <field name="res_model">project.account.analytic.line</field>
859- <field name="view_type">form</field>
860- <field name="view_mode">tree,form</field>
861- <field name="view_id" ref="view_project_account_analytic_line_form"/>
862- <field name="target">new</field>
863- </record>
864-
865- </data>
866-</openerp>
867
868=== modified file 'account/report/account_analytic_entries_report.py'
869--- account/report/account_analytic_entries_report.py 2014-01-29 16:03:48 +0000
870+++ account/report/account_analytic_entries_report.py 2014-05-16 11:21:01 +0000
871@@ -33,8 +33,8 @@
872 'partner_id': fields.many2one('res.partner', 'Partner'),
873 'company_id': fields.many2one('res.company', 'Company', required=True),
874 'currency_id': fields.many2one('res.currency', 'Currency', required=True),
875- 'account_id': fields.many2one('account.analytic.account', 'Account', required=False),
876- 'general_account_id': fields.many2one('account.account', 'General Account', required=True),
877+ 'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=False),
878+ 'general_account_id': fields.many2one('account.account', 'Financial Account', required=True),
879 'journal_id': fields.many2one('account.analytic.journal', 'Journal', required=True),
880 'move_id': fields.many2one('account.move.line', 'Move', required=True),
881 'product_id': fields.many2one('product.product', 'Product', required=True),
882
883=== modified file 'account/report/account_analytic_entries_report_view.xml'
884--- account/report/account_analytic_entries_report_view.xml 2014-01-29 16:03:48 +0000
885+++ account/report/account_analytic_entries_report_view.xml 2014-05-16 11:21:01 +0000
886@@ -14,8 +14,8 @@
887 <group expand="0" string="Group By...">
888 <filter string="User" name="User" icon="terp-personal" context="{'group_by':'user_id'}"/>
889 <filter string="Partner" icon="terp-partner" context="{'group_by':'partner_id'}"/>
890- <filter string="Account" name="Account" icon="terp-folder-green" context="{'group_by':'account_id'}" groups="analytic.group_analytic_accounting"/>
891- <filter string="General Account" icon="terp-folder-orange" context="{'group_by':'general_account_id'}"/>
892+ <filter string="Analytic Account" name="Account" icon="terp-folder-green" context="{'group_by':'account_id'}" groups="analytic.group_analytic_accounting"/>
893+ <filter string="Financial Account" icon="terp-folder-orange" context="{'group_by':'general_account_id'}"/>
894 <filter string="Journal" icon="terp-folder-orange" context="{'group_by':'journal_id'}"/>
895 <filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
896 <filter string="Product Unit of Measure" icon="terp-mrp" context="{'group_by':'product_uom_id'}"/>
897
898=== modified file 'account/security/account_security.xml'
899--- account/security/account_security.xml 2013-10-27 12:31:04 +0000
900+++ account/security/account_security.xml 2014-05-16 11:21:01 +0000
901@@ -62,13 +62,6 @@
902 <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
903 </record>
904
905- <record id="analytic_journal_comp_rule" model="ir.rule">
906- <field name="name">Analytic journal multi-company</field>
907- <field name="model_id" ref="model_account_analytic_journal"/>
908- <field name="global" eval="True"/>
909- <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
910- </record>
911-
912 <record id="period_comp_rule" model="ir.rule">
913 <field name="name">Period multi-company</field>
914 <field name="model_id" ref="model_account_period"/>
915
916=== modified file 'account/security/ir.model.access.csv'
917--- account/security/ir.model.access.csv 2013-10-27 12:31:04 +0000
918+++ account/security/ir.model.access.csv 2014-05-16 11:21:01 +0000
919@@ -24,8 +24,8 @@
920 access_account_bank_statement_line,account.bank.statement.line,model_account_bank_statement_line,account.group_account_user,1,1,1,1
921 access_account_analytic_line_manager,account.analytic.line manager,model_account_analytic_line,account.group_account_manager,1,0,0,0
922 access_account_analytic_account,account.analytic.account,analytic.model_account_analytic_account,base.group_user,1,0,0,0
923-access_account_analytic_journal,account.analytic.journal,model_account_analytic_journal,account.group_account_user,1,0,0,0
924-access_account_analytic_journal_user,account.analytic.journal,model_account_analytic_journal,base.group_user,1,1,1,0
925+access_account_analytic_journal,account.analytic.journal,analytic.model_account_analytic_journal,account.group_account_user,1,0,0,0
926+access_account_analytic_journal_user,account.analytic.journal,analytic.model_account_analytic_journal,base.group_user,1,1,1,0
927 access_account_invoice_uinvoice,account.invoice,model_account_invoice,account.group_account_invoice,1,1,1,1
928 access_account_invoice_line_uinvoice,account.invoice.line,model_account_invoice_line,account.group_account_invoice,1,1,1,1
929 access_account_invoice_tax_uinvoice,account.invoice.tax,model_account_invoice_tax,account.group_account_invoice,1,1,1,1
930@@ -41,7 +41,7 @@
931 access_account_period_manager,account.period,model_account_period,account.group_account_manager,1,1,1,1
932 access_account_period_invoice,account.period invoice,model_account_period,account.group_account_invoice,1,0,0,0
933 access_account_invoice_group_invoice,account.invoice group invoice,model_account_invoice,account.group_account_invoice,1,1,1,1
934-access_account_analytic_journal_manager,account.analytic.journal,model_account_analytic_journal,account.group_account_manager,1,1,1,1
935+access_account_analytic_journal_manager,account.analytic.journal,analytic.model_account_analytic_journal,account.group_account_manager,1,1,1,1
936 access_account_fiscalyear,account.fiscalyear,model_account_fiscalyear,account.group_account_manager,1,1,1,1
937 access_account_fiscalyear_invoice,account.fiscalyear.invoice,model_account_fiscalyear,account.group_account_invoice,1,0,0,0
938 access_account_fiscalyear_partner_manager,account.fiscalyear.partnermanager,model_account_fiscalyear,base.group_partner_manager,1,0,0,0
939
940=== modified file 'account/test/account_fiscalyear_close.yml'
941--- account/test/account_fiscalyear_close.yml 2013-11-27 15:32:57 +0000
942+++ account/test/account_fiscalyear_close.yml 2014-05-16 11:21:01 +0000
943@@ -34,7 +34,7 @@
944 name: End of Year
945 code: NEW
946 type: situation
947- analytic_journal_id: sit
948+ analytic_journal_id: analytic.sit
949 default_debit_account_id: cash
950 default_credit_account_id: cash
951 company_id: base.main_company
952
953=== modified file 'account/test/account_report.yml'
954--- account/test/account_report.yml 2014-04-02 16:40:53 +0000
955+++ account/test/account_report.yml 2014-05-16 11:21:01 +0000
956@@ -135,47 +135,47 @@
957 -
958 !python {model: account.analytic.account}: |
959 ctx={}
960- ctx.update({'model': 'account.analytic.account','active_ids': [ref('account.analytic_root')]})
961+ ctx.update({'model': 'account.analytic.account','active_ids': [ref('analytic.analytic_root')]})
962 data_dict = {}
963 from openerp.tools import test_reports
964- test_reports.try_report_action(cr, uid, 'action_account_analytic_balance',wiz_data=data_dict, context=ctx, our_module='account')
965+ test_reports.try_report_action(cr, uid, 'analytic.action_account_analytic_balance',wiz_data=data_dict, context=ctx, our_module='account')
966
967 -
968 Print the Cost Ledger Report through the wizard
969 -
970 !python {model: account.analytic.account}: |
971 ctx={}
972- 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')]})
973+ 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')]})
974 data_dict = {}
975 from openerp.tools import test_reports
976- test_reports.try_report_action(cr, uid, 'action_account_analytic_cost',wiz_data=data_dict, context=ctx, our_module='account')
977+ test_reports.try_report_action(cr, uid, 'analytic.action_account_analytic_cost',wiz_data=data_dict, context=ctx, our_module='account')
978
979 -
980 Print the Cost Ledger(Only Quantities) Report through the wizard
981 -
982 !python {model: account.analytic.account}: |
983 ctx={}
984- 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')]})
985+ 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')]})
986 data_dict = {}
987 from openerp.tools import test_reports
988- test_reports.try_report_action(cr, uid, 'action_account_analytic_cost_ledger_journal',wiz_data=data_dict, context=ctx, our_module='account')
989+ test_reports.try_report_action(cr, uid, 'analytic.action_account_analytic_cost_ledger_journal',wiz_data=data_dict, context=ctx, our_module='account')
990
991 -
992 Print the Analytic Journal Report through the wizard
993 -
994 !python {model: account.analytic.journal}: |
995 ctx={}
996- ctx.update({'model': 'account.analytic.journal','active_ids': [ref('account.cose_journal_sale'), ref('account.exp'), ref('account.sit')]})
997+ ctx.update({'model': 'account.analytic.journal','active_ids': [ref('analytic.cose_journal_sale'), ref('account.exp'), ref('analytic.sit')]})
998 data_dict = {}
999 from openerp.tools import test_reports
1000- test_reports.try_report_action(cr, uid, 'action_account_analytic_journal',wiz_data=data_dict, context=ctx, our_module='account')
1001+ test_reports.try_report_action(cr, uid, 'analytic.action_account_analytic_journal',wiz_data=data_dict, context=ctx, our_module='account')
1002
1003 -
1004 Print the Inverted Analytic Balance Report through the wizard
1005 -
1006 !python {model: account.analytic.account}: |
1007 ctx={}
1008- ctx.update({'model': 'account.analytic.account','active_ids': [ref('account.analytic_root')]})
1009+ ctx.update({'model': 'account.analytic.account','active_ids': [ref('analytic.analytic_root')]})
1010 data_dict = {}
1011 from openerp.tools import test_reports
1012- test_reports.try_report_action(cr, uid, 'action_account_analytic_invert_balance',wiz_data=data_dict, context=ctx, our_module='account')
1013+ test_reports.try_report_action(cr, uid, 'analytic.action_account_analytic_invert_balance',wiz_data=data_dict, context=ctx, our_module='account')
1014
1015=== modified file 'account_analytic_analysis/account_analytic_analysis_view.xml'
1016--- account_analytic_analysis/account_analytic_analysis_view.xml 2014-05-08 08:39:48 +0000
1017+++ account_analytic_analysis/account_analytic_analysis_view.xml 2014-05-16 11:21:01 +0000
1018@@ -196,7 +196,7 @@
1019 <record id="view_account_analytic_account_tree_c2c_3" model="ir.ui.view">
1020 <field name="name">account.analytic.account.list.contract</field>
1021 <field name="model">account.analytic.account</field>
1022- <field name="inherit_id" ref="account.view_account_analytic_account_list"/>
1023+ <field name="inherit_id" ref="analytic.view_account_analytic_account_list"/>
1024 <field name="arch" type="xml">
1025 <field name="date_start" position="before">
1026 <field name="last_invoice_date"/>
1027@@ -279,7 +279,7 @@
1028 <field name="view_mode">tree,form</field>
1029 <field name="domain">[('invoice_id','=',False)]</field>
1030 <field name="context">{'search_default_to_invoice': 1}</field>
1031- <field name="search_view_id" ref="account.view_account_analytic_line_filter"/>
1032+ <field name="search_view_id" ref="analytic.view_account_analytic_line_filter"/>
1033 <field name="help" type="html">
1034 <p>
1035 You will find here timesheets and purchases you did for
1036@@ -337,6 +337,21 @@
1037 </field>
1038 </record>
1039 <menuitem action="template_of_contract_action" id="menu_template_of_contract_action" parent="base.menu_base_config"/>
1040+
1041+ <record id="account_analytic_analysis_form_form" model="ir.ui.view">
1042+ <field name="name">account.analytic.account.invoice.form.inherit</field>
1043+ <field name="model">account.analytic.account</field>
1044+ <field name="inherit_id" ref="analytic.view_account_analytic_account_form"/>
1045+ <field eval="20" name="priority"/>
1046+ <field name="arch" type="xml">
1047+ <xpath expr='//div[@name="buttons"]' position='inside'>
1048+ <button class="oe_inline oe_stat_button" string="Time &amp; Materials to Invoice"
1049+ name="%(action_hr_tree_invoiced_all)d"
1050+ type="action"
1051+ context="{'search_default_account_id': [active_id], 'default_account_id': active_id}"/>
1052+ </xpath>
1053+ </field>
1054+ </record>
1055
1056 </data>
1057 </openerp>
1058
1059=== modified file 'account_analytic_analysis/analytic_account_demo.xml'
1060--- account_analytic_analysis/analytic_account_demo.xml 2013-10-27 12:31:04 +0000
1061+++ account_analytic_analysis/analytic_account_demo.xml 2014-05-16 11:21:01 +0000
1062@@ -1,7 +1,7 @@
1063 <?xml version="1.0" encoding="utf-8"?>
1064 <openerp>
1065 <data noupdate="1">
1066- <record id="account.analytic_consultancy" model="account.analytic.account">
1067+ <record id="analytic.analytic_consultancy" model="account.analytic.account">
1068 <field name="partner_id" ref="base.res_partner_15"/>
1069 <field name="invoice_on_timesheets">True</field>
1070 <field name="hours_qtt_est">1200</field>
1071@@ -12,16 +12,16 @@
1072 </record>
1073
1074 <record id="sale.sale_order_4" model="sale.order">
1075- <field name="project_id" ref="account.analytic_consultancy"/>
1076+ <field name="project_id" ref="analytic.analytic_consultancy"/>
1077 </record>
1078
1079 <record id="hr_timesheet.working_hours_maintenance" model="hr.analytic.timesheet">
1080- <field name="account_id" ref="account.analytic_consultancy"/>
1081+ <field name="account_id" ref="analytic.analytic_consultancy"/>
1082 <field name="to_invoice" ref="hr_timesheet_invoice.timesheet_invoice_factor1"/>
1083 <field name="unit_amount">100</field>
1084 </record>
1085
1086- <record id="account.analytic_super_product_trainings" model="account.analytic.account">
1087+ <record id="analytic.analytic_super_product_trainings" model="account.analytic.account">
1088 <field name="partner_id" ref="base.res_partner_18"/>
1089 <field name="invoice_on_timesheets">True</field>
1090 <field name="hours_qtt_est">500</field>
1091@@ -32,11 +32,11 @@
1092 </record>
1093
1094 <record id="sale.sale_order_6" model="sale.order">
1095- <field name="project_id" ref="account.analytic_super_product_trainings"/>
1096+ <field name="project_id" ref="analytic.analytic_super_product_trainings"/>
1097 <field name="partner_id" ref="base.res_partner_1"/>
1098 </record>
1099
1100- <record id="account.analytic_support_internal" model="account.analytic.account">
1101+ <record id="analytic.analytic_support_internal" model="account.analytic.account">
1102 <field name="partner_id" ref="base.res_partner_1"/>
1103 <field name="use_timesheets">True</field>
1104 <field name="invoice_on_timesheets">True</field>
1105
1106=== modified file 'account_analytic_plans/test/acount_analytic_plans_report.yml'
1107--- account_analytic_plans/test/acount_analytic_plans_report.yml 2014-04-02 16:40:53 +0000
1108+++ account_analytic_plans/test/acount_analytic_plans_report.yml 2014-05-16 11:21:01 +0000
1109@@ -5,7 +5,7 @@
1110 import os, time
1111 import openerp.report
1112 from openerp import tools
1113- 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':{}}}
1114- data, format = openerp.report.render_report(cr, uid, [ref('account.analytic_root')], 'account_analytic_plans.report_crossoveredanalyticplans', data_dict, {})
1115+ 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':{}}}
1116+ data, format = openerp.report.render_report(cr, uid, [ref('analytic.analytic_root')], 'account_analytic_plans.report_crossoveredanalyticplans', data_dict, {})
1117 if tools.config['test_report_directory']:
1118 file(os.path.join(tools.config['test_report_directory'], 'account_analytic_plans-crossovered_analyitic.'+format), 'wb+').write(data)
1119
1120=== modified file 'account_budget/account_budget_demo.xml'
1121--- account_budget/account_budget_demo.xml 2011-11-01 11:28:40 +0000
1122+++ account_budget/account_budget_demo.xml 2014-05-16 11:21:01 +0000
1123@@ -42,7 +42,7 @@
1124 <!-- Budget lines -->
1125 <data noupdate="1">
1126 <record id="crossovered_budget_lines_0" model="crossovered.budget.lines">
1127- <field name="analytic_account_id" ref="account.analytic_consultancy"/>
1128+ <field name="analytic_account_id" ref="analytic.analytic_consultancy"/>
1129 <field name="general_budget_id" ref="account_budget_post_purchase0"/>
1130 <field eval="str(time.localtime(time.time())[0]+1)+'-01-01'" name="date_from"/>
1131 <field eval="-500.0" name="planned_amount"/>
1132@@ -50,7 +50,7 @@
1133 <field eval="str(time.localtime(time.time())[0]+1)+'-01-31'" name="date_to"/>
1134 </record>
1135 <record id="crossovered_budget_lines_1" model="crossovered.budget.lines">
1136- <field name="analytic_account_id" ref="account.analytic_consultancy"/>
1137+ <field name="analytic_account_id" ref="analytic.analytic_consultancy"/>
1138 <field name="general_budget_id" ref="account_budget_post_purchase0"/>
1139 <field eval="str(time.localtime(time.time())[0]+1)+'-02-01'" name="date_from"/>
1140 <field eval="-250.0" name="planned_amount"/>
1141@@ -58,7 +58,7 @@
1142 <field eval="str(time.localtime(time.time())[0]+1)+'-02-28'" name="date_to"/>
1143 </record>
1144 <record id="crossovered_budget_lines_2" model="crossovered.budget.lines">
1145- <field name="analytic_account_id" ref="account.analytic_consultancy"/>
1146+ <field name="analytic_account_id" ref="analytic.analytic_consultancy"/>
1147 <field name="general_budget_id" ref="account_budget_post_sales0"/>
1148 <field eval="str(time.localtime(time.time())[0]+1)+'-01-01'" name="date_from"/>
1149 <field eval="500.0" name="planned_amount"/>
1150@@ -66,7 +66,7 @@
1151 <field eval="str(time.localtime(time.time())[0]+1)+'-01-31'" name="date_to"/>
1152 </record>
1153 <record id="crossovered_budget_lines_3" model="crossovered.budget.lines">
1154- <field name="analytic_account_id" ref="account.analytic_consultancy"/>
1155+ <field name="analytic_account_id" ref="analytic.analytic_consultancy"/>
1156 <field name="general_budget_id" ref="account_budget_post_sales0"/>
1157 <field eval="str(time.localtime(time.time())[0]+1)+'-02-07'" name="date_from"/>
1158 <field eval="900.0" name="planned_amount"/>
1159@@ -74,7 +74,7 @@
1160 <field eval="str(time.localtime(time.time())[0]+1)+'-02-28'" name="date_to"/>
1161 </record>
1162 <record id="crossovered_budget_lines_4" model="crossovered.budget.lines">
1163- <field name="analytic_account_id" ref="account.analytic_consultancy"/>
1164+ <field name="analytic_account_id" ref="analytic.analytic_consultancy"/>
1165 <field name="general_budget_id" ref="account_budget_post_sales0"/>
1166 <field eval="str(time.localtime(time.time())[0]+1)+'-03-01'" name="date_from"/>
1167 <field eval="300.0" name="planned_amount"/>
1168@@ -84,7 +84,7 @@
1169 </data>
1170 <data noupdate="1">
1171 <record id="crossovered_budget_lines_5" model="crossovered.budget.lines">
1172- <field name="analytic_account_id" ref="account.analytic_super_product_trainings"/>
1173+ <field name="analytic_account_id" ref="analytic.analytic_super_product_trainings"/>
1174 <field name="general_budget_id" ref="account_budget_post_sales0"/>
1175 <field eval="str(time.localtime(time.time())[0]+1)+'-03-16'" name="date_from"/>
1176 <field eval="375.0" name="planned_amount"/>
1177@@ -93,7 +93,7 @@
1178 <field eval="str(time.localtime(time.time())[0]+1)+'-03-31'" name="date_to"/>
1179 </record>
1180 <record id="crossovered_budget_lines_6" model="crossovered.budget.lines">
1181- <field name="analytic_account_id" ref="account.analytic_super_product_trainings"/>
1182+ <field name="analytic_account_id" ref="analytic.analytic_super_product_trainings"/>
1183 <field name="general_budget_id" ref="account_budget_post_purchase0"/>
1184 <field eval="str(time.localtime(time.time())[0]+1)+'-04-01'" name="date_from"/>
1185 <field eval="-150.0" name="planned_amount"/>
1186@@ -101,7 +101,7 @@
1187 <field eval="str(time.localtime(time.time())[0]+1)+'-04-30'" name="date_to"/>
1188 </record>
1189 <record id="crossovered_budget_lines_7" model="crossovered.budget.lines">
1190- <field name="analytic_account_id" ref="account.analytic_super_product_trainings"/>
1191+ <field name="analytic_account_id" ref="analytic.analytic_super_product_trainings"/>
1192 <field name="general_budget_id" ref="account_budget_post_sales0"/>
1193 <field eval="str(time.localtime(time.time())[0]+1)+'-05-01'" name="date_from"/>
1194 <field eval="375.0" name="planned_amount"/>
1195@@ -112,7 +112,7 @@
1196 </data>
1197 <data noupdate="1">
1198 <record id="crossovered_budget_lines_8" model="crossovered.budget.lines">
1199- <field name="analytic_account_id" ref="account.analytic_seagate_p1"/>
1200+ <field name="analytic_account_id" ref="analytic.analytic_seagate_p1"/>
1201 <field name="general_budget_id" ref="account_budget_post_purchase0"/>
1202 <field eval="str(time.localtime(time.time())[0]+1)+'-06-01'" name="date_from"/>
1203 <field eval="-7500.0" name="planned_amount"/>
1204@@ -120,7 +120,7 @@
1205 <field eval="str(time.localtime(time.time())[0]+1)+'-06-15'" name="date_to"/>
1206 </record>
1207 <record id="crossovered_budget_lines_9" model="crossovered.budget.lines">
1208- <field name="analytic_account_id" ref="account.analytic_seagate_p1"/>
1209+ <field name="analytic_account_id" ref="analytic.analytic_seagate_p1"/>
1210 <field name="general_budget_id" ref="account_budget_post_purchase0"/>
1211 <field eval="str(time.localtime(time.time())[0]+1)+'-06-16'" name="date_from"/>
1212 <field eval="-5000.0" name="planned_amount"/>
1213@@ -128,7 +128,7 @@
1214 <field eval="str(time.localtime(time.time())[0]+1)+'-06-30'" name="date_to"/>
1215 </record>
1216 <record id="crossovered_budget_lines_10" model="crossovered.budget.lines">
1217- <field name="analytic_account_id" ref="account.analytic_seagate_p1"/>
1218+ <field name="analytic_account_id" ref="analytic.analytic_seagate_p1"/>
1219 <field name="general_budget_id" ref="account_budget_post_purchase0"/>
1220 <field eval="str(time.localtime(time.time())[0]+1)+'-07-01'" name="date_from"/>
1221 <field eval="-2000.0" name="planned_amount"/>
1222@@ -136,7 +136,7 @@
1223 <field eval="str(time.localtime(time.time())[0]+1)+'-07-15'" name="date_to"/>
1224 </record>
1225 <record id="crossovered_budget_lines_11" model="crossovered.budget.lines">
1226- <field name="analytic_account_id" ref="account.analytic_seagate_p1"/>
1227+ <field name="analytic_account_id" ref="analytic.analytic_seagate_p1"/>
1228 <field name="general_budget_id" ref="account_budget_post_sales0"/>
1229 <field eval="str(time.localtime(time.time())[0]+1)+'-07-16'" name="date_from"/>
1230 <field eval="20000.0" name="planned_amount"/>
1231@@ -144,7 +144,7 @@
1232 <field eval="str(time.localtime(time.time())[0]+1)+'-07-31'" name="date_to"/>
1233 </record>
1234 <record id="crossovered_budget_lines_12" model="crossovered.budget.lines">
1235- <field name="analytic_account_id" ref="account.analytic_seagate_p1"/>
1236+ <field name="analytic_account_id" ref="analytic.analytic_seagate_p1"/>
1237 <field name="general_budget_id" ref="account_budget_post_sales0"/>
1238 <field eval="str(time.localtime(time.time())[0]+1)+'-08-01'" name="date_from"/>
1239 <field eval="20000.0" name="planned_amount"/>
1240@@ -154,7 +154,7 @@
1241 </data>
1242 <data noupdate="1">
1243 <record id="crossovered_budget_lines_13" model="crossovered.budget.lines">
1244- <field name="analytic_account_id" ref="account.analytic_seagate_p2"/>
1245+ <field name="analytic_account_id" ref="analytic.analytic_seagate_p2"/>
1246 <field name="general_budget_id" ref="account_budget_post_purchase0"/>
1247 <field eval="str(time.localtime(time.time())[0]+1)+'-08-16'" name="date_from"/>
1248 <field eval="-3000.0" name="planned_amount"/>
1249@@ -162,7 +162,7 @@
1250 <field eval="str(time.localtime(time.time())[0]+1)+'-08-31'" name="date_to"/>
1251 </record>
1252 <record id="crossovered_budget_lines_14" model="crossovered.budget.lines">
1253- <field name="analytic_account_id" ref="account.analytic_seagate_p2"/>
1254+ <field name="analytic_account_id" ref="analytic.analytic_seagate_p2"/>
1255 <field name="general_budget_id" ref="account_budget_post_purchase0"/>
1256 <field eval="str(time.localtime(time.time())[0]+1)+'-09-01'" name="date_from"/>
1257 <field eval="-1000.0" name="planned_amount"/>
1258@@ -170,7 +170,7 @@
1259 <field eval="str(time.localtime(time.time())[0]+1)+'-09-15'" name="date_to"/>
1260 </record>
1261 <record id="crossovered_budget_lines_15" model="crossovered.budget.lines">
1262- <field name="analytic_account_id" ref="account.analytic_seagate_p2"/>
1263+ <field name="analytic_account_id" ref="analytic.analytic_seagate_p2"/>
1264 <field name="general_budget_id" ref="account_budget_post_sales0"/>
1265 <field eval="str(time.localtime(time.time())[0]+1)+'-09-16'" name="date_from"/>
1266 <field eval="10000.0" name="planned_amount"/>
1267@@ -178,7 +178,7 @@
1268 <field eval="str(time.localtime(time.time())[0]+1)+'-09-30'" name="date_to"/>
1269 </record>
1270 <record id="crossovered_budget_lines_16" model="crossovered.budget.lines">
1271- <field name="analytic_account_id" ref="account.analytic_seagate_p2"/>
1272+ <field name="analytic_account_id" ref="analytic.analytic_seagate_p2"/>
1273 <field name="general_budget_id" ref="account_budget_post_sales0"/>
1274 <field eval="str(time.localtime(time.time())[0]+1)+'-10-01'" name="date_from"/>
1275 <field eval="10000.0" name="planned_amount"/>
1276
1277=== modified file 'account_budget/test/account_budget.yml'
1278--- account_budget/test/account_budget.yml 2011-01-14 00:11:01 +0000
1279+++ account_budget/test/account_budget.yml 2014-05-16 11:21:01 +0000
1280@@ -16,12 +16,12 @@
1281 -
1282 !record {model: crossovered.budget, id: crossovered_budget_budget0}:
1283 crossovered_budget_line:
1284- - analytic_account_id: account.analytic_consultancy
1285+ - analytic_account_id: analytic.analytic_consultancy
1286 date_from: !eval "'%s-01-01' %(datetime.now().year+1)"
1287 date_to: !eval "'%s-12-31' %(datetime.now().year+1)"
1288 general_budget_id: account_budget.account_budget_post_purchase0
1289 planned_amount: 10000.0
1290- - analytic_account_id: account.analytic_super_product_trainings
1291+ - analytic_account_id: analytic.analytic_super_product_trainings
1292 date_from: !eval "'%s-09-01' %(datetime.now().year+1)"
1293 date_to: !eval "'%s-09-30' %(datetime.now().year+1)"
1294 general_budget_id: account_budget.account_budget_post_sales0
1295
1296=== modified file 'account_budget/test/account_budget_report.yml'
1297--- account_budget/test/account_budget_report.yml 2014-04-02 16:40:53 +0000
1298+++ account_budget/test/account_budget_report.yml 2014-05-16 11:21:01 +0000
1299@@ -2,7 +2,7 @@
1300 Print the Analytic Budget Report through wizard
1301 -
1302 !python {model: account.analytic.account}: |
1303- ctx = {'model': 'account.analytic.account','active_ids': [ref('account.analytic_root')]}
1304+ ctx = {'model': 'account.analytic.account','active_ids': [ref('analytic.analytic_root')]}
1305 from openerp.tools import test_reports
1306 test_reports.try_report_action(cr, uid, 'action_account_budget_analytic',wiz_data={}, context=ctx, our_module='account_budget')
1307
1308
1309=== modified file 'account_voucher/test/case1_usd_usd.yml'
1310--- account_voucher/test/case1_usd_usd.yml 2013-10-27 12:31:04 +0000
1311+++ account_voucher/test/case1_usd_usd.yml 2014-05-16 11:21:01 +0000
1312@@ -60,7 +60,7 @@
1313 name: Bank Journal(USD)
1314 code: BUSD
1315 type: bank
1316- analytic_journal_id: account.sit
1317+ analytic_journal_id: analytic.sit
1318 sequence_id: account.sequence_bank_journal
1319 default_debit_account_id: account_cash_usd_id
1320 default_credit_account_id: account_cash_usd_id
1321
1322=== modified file 'account_voucher/test/case1_usd_usd_payment_rate.yml'
1323--- account_voucher/test/case1_usd_usd_payment_rate.yml 2013-05-14 12:03:41 +0000
1324+++ account_voucher/test/case1_usd_usd_payment_rate.yml 2014-05-16 11:21:01 +0000
1325@@ -60,7 +60,7 @@
1326 name: Bank Journal(USD)
1327 code: BUSD
1328 type: bank
1329- analytic_journal_id: account.sit
1330+ analytic_journal_id: analytic.sit
1331 sequence_id: account.sequence_bank_journal
1332 default_debit_account_id: account_cash_usd_id
1333 default_credit_account_id: account_cash_usd_id
1334
1335=== modified file 'account_voucher/test/case2_usd_eur_debtor_in_eur.yml'
1336--- account_voucher/test/case2_usd_eur_debtor_in_eur.yml 2013-10-27 12:31:04 +0000
1337+++ account_voucher/test/case2_usd_eur_debtor_in_eur.yml 2014-05-16 11:21:01 +0000
1338@@ -54,7 +54,7 @@
1339 name: Bank Journal(EUR)
1340 code: BEUR
1341 type: bank
1342- analytic_journal_id: account.sit
1343+ analytic_journal_id: analytic.sit
1344 sequence_id: account.sequence_bank_journal
1345 default_debit_account_id: account.cash
1346 default_credit_account_id: account.cash
1347@@ -66,7 +66,7 @@
1348 name: Bank Journal(USD)
1349 code: BUSD
1350 type: bank
1351- analytic_journal_id: account.sit
1352+ analytic_journal_id: analytic.sit
1353 sequence_id: account.sequence_bank_journal
1354 default_debit_account_id: account_cash_usd_id
1355 default_credit_account_id: account_cash_usd_id
1356
1357=== modified file 'account_voucher/test/case2_usd_eur_debtor_in_usd.yml'
1358--- account_voucher/test/case2_usd_eur_debtor_in_usd.yml 2013-10-27 12:31:04 +0000
1359+++ account_voucher/test/case2_usd_eur_debtor_in_usd.yml 2014-05-16 11:21:01 +0000
1360@@ -54,7 +54,7 @@
1361 name: Bank Journal(EUR)
1362 code: BEUR
1363 type: bank
1364- analytic_journal_id: account.sit
1365+ analytic_journal_id: analytic.sit
1366 sequence_id: account.sequence_bank_journal
1367 default_debit_account_id: account.cash
1368 default_credit_account_id: account.cash
1369@@ -66,7 +66,7 @@
1370 name: Bank Journal(USD)
1371 code: BUSD
1372 type: bank
1373- analytic_journal_id: account.sit
1374+ analytic_journal_id: analytic.sit
1375 sequence_id: account.sequence_bank_journal
1376 default_debit_account_id: account_cash_usd_id
1377 default_credit_account_id: account_cash_usd_id
1378
1379=== modified file 'account_voucher/test/case3_eur_eur.yml'
1380--- account_voucher/test/case3_eur_eur.yml 2013-10-27 12:31:04 +0000
1381+++ account_voucher/test/case3_eur_eur.yml 2014-05-16 11:21:01 +0000
1382@@ -22,7 +22,7 @@
1383 name: Bank Journal(EUR)
1384 code: BEUR
1385 type: bank
1386- analytic_journal_id: account.sit
1387+ analytic_journal_id: analytic.sit
1388 sequence_id: account.sequence_bank_journal
1389 default_debit_account_id: account.cash
1390 default_credit_account_id: account.cash
1391
1392=== modified file 'account_voucher/test/case4_cad_chf.yml'
1393--- account_voucher/test/case4_cad_chf.yml 2013-10-27 12:31:04 +0000
1394+++ account_voucher/test/case4_cad_chf.yml 2014-05-16 11:21:01 +0000
1395@@ -55,7 +55,7 @@
1396 name: Bank Journal(CHF)
1397 code: BCHF
1398 type: bank
1399- analytic_journal_id: account.sit
1400+ analytic_journal_id: analytic.sit
1401 sequence_id: account.sequence_bank_journal
1402 default_debit_account_id: account_cash_chf_id
1403 default_credit_account_id: account_cash_chf_id
1404
1405=== modified file 'account_voucher/test/case5_suppl_usd_usd.yml'
1406--- account_voucher/test/case5_suppl_usd_usd.yml 2013-10-27 12:31:04 +0000
1407+++ account_voucher/test/case5_suppl_usd_usd.yml 2014-05-16 11:21:01 +0000
1408@@ -41,7 +41,7 @@
1409 name: Bank Journal(EUR)
1410 code: BEUR
1411 type: bank
1412- analytic_journal_id: account.sit
1413+ analytic_journal_id: analytic.sit
1414 sequence_id: account.sequence_bank_journal
1415 default_debit_account_id: account.cash
1416 default_credit_account_id: account.cash
1417@@ -53,7 +53,7 @@
1418 name: Bank Journal(USD)
1419 code: BUSD
1420 type: bank
1421- analytic_journal_id: account.sit
1422+ analytic_journal_id: analytic.sit
1423 sequence_id: account.sequence_bank_journal
1424 default_debit_account_id: account_cash_usd_id2
1425 default_credit_account_id: account_cash_usd_id2
1426
1427=== modified file 'account_voucher/test/case_eur_usd.yml'
1428--- account_voucher/test/case_eur_usd.yml 2013-10-27 12:31:04 +0000
1429+++ account_voucher/test/case_eur_usd.yml 2014-05-16 11:21:01 +0000
1430@@ -39,7 +39,7 @@
1431 name: Bank Journal Test(USD)
1432 code: BEUSD
1433 type: bank
1434- analytic_journal_id: account.sit
1435+ analytic_journal_id: analytic.sit
1436 sequence_id: account.sequence_bank_journal
1437 default_debit_account_id: account_eur_usd_id
1438 default_credit_account_id: account_eur_usd_id
1439
1440=== modified file 'analytic/__init__.py'
1441--- analytic/__init__.py 2011-01-14 00:11:01 +0000
1442+++ analytic/__init__.py 2014-05-16 11:21:01 +0000
1443@@ -19,7 +19,9 @@
1444 #
1445 ##############################################################################
1446
1447-import analytic
1448+import models
1449+import report
1450+import wizard
1451
1452 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1453
1454
1455=== modified file 'analytic/__openerp__.py'
1456--- analytic/__openerp__.py 2012-12-19 17:32:15 +0000
1457+++ analytic/__openerp__.py 2014-05-16 11:21:01 +0000
1458@@ -37,11 +37,26 @@
1459 'data': [
1460 'security/analytic_security.xml',
1461 'security/ir.model.access.csv',
1462- 'analytic_sequence.xml',
1463- 'analytic_view.xml',
1464- 'analytic_data.xml',
1465- ],
1466- 'demo': [],
1467+ 'data/analytic_sequence.xml',
1468+ 'views/analytic_view.xml',
1469+ 'data/analytic_data.xml',
1470+ 'analytic_report.xml',
1471+ 'wizard/account_analytic_balance_report_view.xml',
1472+ 'wizard/account_analytic_cost_ledger_view.xml',
1473+ 'wizard/account_analytic_inverted_balance_report.xml',
1474+ 'wizard/account_analytic_journal_report_view.xml',
1475+ 'wizard/account_analytic_cost_ledger_for_journal_report_view.xml',
1476+ 'wizard/account_analytic_chart_view.xml',
1477+ 'views/report_analyticbalance.xml',
1478+ 'views/report_analyticjournal.xml',
1479+ 'views/report_analyticcostledgerquantity.xml',
1480+ 'views/report_analyticcostledger.xml',
1481+ 'views/report_invertedanalyticbalance.xml',
1482+ ],
1483+ 'demo': [
1484+ 'data/analytic_demo.xml',
1485+ 'data/analytic_account_demo.xml',
1486+ ],
1487 'installable': True,
1488 'auto_install': False,
1489 }
1490
1491=== renamed file 'account/project/project_report.xml' => 'analytic/analytic_report.xml'
1492=== added directory 'analytic/data'
1493=== renamed file 'account/project/analytic_account_demo.xml' => 'analytic/data/analytic_account_demo.xml'
1494=== renamed file 'analytic/analytic_data.xml' => 'analytic/data/analytic_data.xml'
1495=== renamed file 'account/project/project_demo.xml' => 'analytic/data/analytic_demo.xml'
1496=== renamed file 'analytic/analytic_sequence.xml' => 'analytic/data/analytic_sequence.xml'
1497=== added directory 'analytic/models'
1498=== added file 'analytic/models/__init__.py'
1499--- analytic/models/__init__.py 1970-01-01 00:00:00 +0000
1500+++ analytic/models/__init__.py 2014-05-16 11:21:01 +0000
1501@@ -0,0 +1,3 @@
1502+# -*- coding: utf-8 -*-
1503+
1504+import analytic
1505
1506=== renamed file 'analytic/analytic.py' => 'analytic/models/analytic.py'
1507--- analytic/analytic.py 2014-04-01 12:36:57 +0000
1508+++ analytic/models/analytic.py 2014-05-16 11:21:01 +0000
1509@@ -321,6 +321,7 @@
1510 'account_id': fields.many2one('account.analytic.account', 'Analytic Account', required=True, ondelete='restrict', select=True, domain=[('type','<>','view')]),
1511 'user_id': fields.many2one('res.users', 'User'),
1512 'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True),
1513+ 'journal_id': fields.many2one('account.analytic.journal', 'Analytic Journal', required=True, ondelete='restrict', select=True),
1514
1515 }
1516
1517@@ -348,5 +349,24 @@
1518 _constraints = [
1519 (_check_no_view, 'You cannot create analytic line on view account.', ['account_id']),
1520 ]
1521+
1522+class account_analytic_journal(osv.osv):
1523+ _name = 'account.analytic.journal'
1524+ _description = 'Analytic Journal'
1525+ _columns = {
1526+ 'name': fields.char('Journal Name', required=True),
1527+ 'code': fields.char('Journal Code'),
1528+ '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."),
1529+ '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."),
1530+ 'line_ids': fields.one2many('account.analytic.line', 'journal_id', 'Lines'),
1531+ 'company_id': fields.many2one('res.company', 'Company', required=True),
1532+ 'line_ids': fields.one2many('account.analytic.line', 'journal_id', 'Lines'),
1533+ }
1534+ _defaults = {
1535+ 'active': True,
1536+ 'type': 'general',
1537+ 'company_id': lambda self,cr,uid,c: self.pool.get('res.users').browse(cr, uid, uid, c).company_id.id,
1538+ }
1539+
1540
1541 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1542
1543=== renamed directory 'account/project/report' => 'analytic/report'
1544=== modified file 'analytic/report/__init__.py'
1545--- account/project/report/__init__.py 2011-01-14 00:11:01 +0000
1546+++ analytic/report/__init__.py 2014-05-16 11:21:01 +0000
1547@@ -21,9 +21,9 @@
1548
1549 import analytic_journal
1550 import analytic_balance
1551-import inverted_analytic_balance
1552-import cost_ledger
1553-import quantity_cost_ledger
1554+import analytic_inverted_balance
1555+import analytic_cost_ledger
1556+import analytic_quantity_cost_ledger
1557
1558 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1559
1560
1561=== modified file 'analytic/report/analytic_balance.py'
1562--- account/project/report/analytic_balance.py 2014-04-02 16:40:53 +0000
1563+++ analytic/report/analytic_balance.py 2014-05-16 11:21:01 +0000
1564@@ -151,7 +151,7 @@
1565 class report_analyticbalance(osv.AbstractModel):
1566 _name = 'report.account.report_analyticbalance'
1567 _inherit = 'report.abstract_report'
1568- _template = 'account.report_analyticbalance'
1569+ _template = 'analytic.report_analyticbalance'
1570 _wrapped_report_class = account_analytic_balance
1571
1572 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1573
1574=== renamed file 'account/project/report/cost_ledger.py' => 'analytic/report/analytic_cost_ledger.py'
1575--- account/project/report/cost_ledger.py 2014-04-02 16:40:53 +0000
1576+++ analytic/report/analytic_cost_ledger.py 2014-05-16 11:21:01 +0000
1577@@ -105,7 +105,7 @@
1578 class report_analyticcostledger(osv.AbstractModel):
1579 _name = 'report.account.report_analyticcostledger'
1580 _inherit = 'report.abstract_report'
1581- _template = 'account.report_analyticcostledger'
1582+ _template = 'analytic.report_analyticcostledger'
1583 _wrapped_report_class = account_analytic_cost_ledger
1584
1585 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1586
1587=== renamed file 'account/project/report/inverted_analytic_balance.py' => 'analytic/report/analytic_inverted_balance.py'
1588--- account/project/report/inverted_analytic_balance.py 2014-04-02 16:40:53 +0000
1589+++ analytic/report/analytic_inverted_balance.py 2014-05-16 11:21:01 +0000
1590@@ -124,7 +124,7 @@
1591 class report_invertedanalyticbalance(osv.AbstractModel):
1592 _name = 'report.account.report_invertedanalyticbalance'
1593 _inherit = 'report.abstract_report'
1594- _template = 'account.report_invertedanalyticbalance'
1595+ _template = 'analytic.report_invertedanalyticbalance'
1596 _wrapped_report_class = account_inverted_analytic_balance
1597
1598 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1599
1600=== modified file 'analytic/report/analytic_journal.py'
1601--- account/project/report/analytic_journal.py 2014-04-02 16:40:53 +0000
1602+++ analytic/report/analytic_journal.py 2014-05-16 11:21:01 +0000
1603@@ -62,7 +62,7 @@
1604 class report_analyticjournal(osv.AbstractModel):
1605 _name = 'report.account.report_analyticjournal'
1606 _inherit = 'report.abstract_report'
1607- _template = 'account.report_analyticjournal'
1608+ _template = 'analytic.report_analyticjournal'
1609 _wrapped_report_class = account_analytic_journal
1610
1611 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1612
1613=== renamed file 'account/project/report/quantity_cost_ledger.py' => 'analytic/report/analytic_quantity_cost_ledger.py'
1614--- account/project/report/quantity_cost_ledger.py 2014-04-02 16:40:53 +0000
1615+++ analytic/report/analytic_quantity_cost_ledger.py 2014-05-16 11:21:01 +0000
1616@@ -121,7 +121,7 @@
1617 class report_analyticcostledgerquantity(osv.AbstractModel):
1618 _name = 'report.account.report_analyticcostledgerquantity'
1619 _inherit = 'report.abstract_report'
1620- _template = 'account.report_analyticcostledgerquantity'
1621+ _template = 'analytic.report_analyticcostledgerquantity'
1622 _wrapped_report_class = account_analytic_quantity_cost_ledger
1623
1624 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1625
1626=== modified file 'analytic/security/analytic_security.xml'
1627--- analytic/security/analytic_security.xml 2013-10-27 12:31:04 +0000
1628+++ analytic/security/analytic_security.xml 2014-05-16 11:21:01 +0000
1629@@ -15,9 +15,13 @@
1630 <field eval="True" name="global"/>
1631 <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
1632 </record>
1633-
1634-</data>
1635-<data noupdate="0">
1636+
1637+ <record id="analytic_journal_comp_rule" model="ir.rule">
1638+ <field name="name">Analytic journal multi-company</field>
1639+ <field name="model_id" ref="model_account_analytic_journal"/>
1640+ <field name="global" eval="True"/>
1641+ <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
1642+ </record>
1643
1644 <record id="group_analytic_accounting" model="res.groups">
1645 <field name="name">Analytic Accounting</field>
1646
1647=== renamed directory 'account/project/views' => 'analytic/views'
1648=== renamed file 'analytic/analytic_view.xml' => 'analytic/views/analytic_view.xml'
1649--- analytic/analytic_view.xml 2014-04-01 12:36:57 +0000
1650+++ analytic/views/analytic_view.xml 2014-05-16 11:21:01 +0000
1651@@ -62,5 +62,311 @@
1652 </form>
1653 </field>
1654 </record>
1655+
1656+ <record id="view_account_analytic_account_list" model="ir.ui.view">
1657+ <field name="name">account.analytic.account.list</field>
1658+ <field name="model">account.analytic.account</field>
1659+ <field eval="8" name="priority"/>
1660+ <field name="arch" type="xml">
1661+ <tree toolbar="1" colors="red:state=='pending';grey:state in ('cancelled','close');blue:type=='view'" string="Analytic Accounts">
1662+ <field name="complete_name"/>
1663+ <field name="partner_id"/>
1664+ <field name="code"/>
1665+ <field name="date_start"/>
1666+ <field name="date"/>
1667+ <field name="user_id" invisible="1"/>
1668+ <field name="manager_id"/>
1669+ <field name="parent_id" invisible="1"/>
1670+ <field name="state" invisible="1"/>
1671+ <field name="type" invisible="1"/>
1672+ <field name="template_id" invisible="1"/>
1673+ <field name="company_id" groups="base.group_multi_company"/>
1674+ </tree>
1675+ </field>
1676+ </record>
1677+
1678+ <record id="view_account_analytic_account_search" model="ir.ui.view">
1679+ <field name="name">account.analytic.account.search</field>
1680+ <field name="model">account.analytic.account</field>
1681+ <field name="arch" type="xml">
1682+ <search string="Analytic Account">
1683+ <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Analytic Account"/>
1684+ <field name="date"/>
1685+ <field name="partner_id" operator="child_of"/>
1686+ <field name="manager_id"/>
1687+ <field name="parent_id"/>
1688+ <field name="user_id"/>
1689+ <filter string="Open" domain="[('state','=','open')]" help="Current Accounts"/>
1690+ <filter string="Pending" domain="[('state','=','pending')]" help="Pending Accounts"/>
1691+ <group expand="0" string="Group By...">
1692+ <filter string="Associated Partner" domain="[]" context="{'group_by':'partner_id'}"/>
1693+ <filter string="Type" domain="[]" context="{'group_by':'type'}"/>
1694+ <filter string="Template" domain="[]" context="{'group_by':'template_id'}"/>
1695+ <filter string="Parent Account" domain="[]" context="{'group_by':'parent_id'}"/>
1696+ <filter string="Status" domain="[]" context="{'group_by':'state'}" groups="base.group_no_one"/>
1697+ </group>
1698+ </search>
1699+ </field>
1700+ </record>
1701+
1702+ <record id="view_account_analytic_account_tree" model="ir.ui.view">
1703+ <field name="name">account.analytic.account.tree</field>
1704+ <field name="model">account.analytic.account</field>
1705+ <field name="field_parent">child_complete_ids</field>
1706+ <field name="arch" type="xml">
1707+ <tree colors="blue:state=='pending';grey:state in ('close','cancelled');blue:type=='view'" string="Analytic account" toolbar="1">
1708+ <field name="name" invisible="1"/>
1709+ <field name="complete_name"/>
1710+ <field name="code"/>
1711+ <field name="debit"/>
1712+ <field name="credit"/>
1713+ <field name="balance"/>
1714+ <field name="state" invisible="1"/>
1715+ <field name="currency_id" groups="base.group_multi_currency"/>
1716+ <field name="date" invisible="1"/>
1717+ <field name="user_id" invisible="1"/>
1718+ <field name="partner_id" invisible="1"/>
1719+ <field name="parent_id" invisible="1"/>
1720+ <field name="type"/>
1721+ <field name="company_id" groups="base.group_multi_company"/>
1722+ <field name="template_id" invisible="1"/>
1723+ </tree>
1724+ </field>
1725+ </record>
1726+
1727+
1728+ <record id="action_account_analytic_account_form" model="ir.actions.act_window">
1729+ <field name="name">Analytic Accounts</field>
1730+ <field name="type">ir.actions.act_window</field>
1731+ <field name="res_model">account.analytic.account</field>
1732+ <field name="context">{}</field> <!-- repair invalid context by setting empty one -->
1733+ <field name="view_type">form</field>
1734+ <field name="view_mode">tree,form</field>
1735+ <field name="view_id" ref="view_account_analytic_account_tree"/>
1736+ <field name="search_view_id" ref="analytic.view_account_analytic_account_search"/>
1737+ </record>
1738+
1739+ <record id="act_account_renew_view" model="ir.actions.act_window">
1740+ <field name="name">Accounts to Renew</field>
1741+ <field name="type">ir.actions.act_window</field>
1742+ <field name="res_model">account.analytic.account</field>
1743+ <field name="view_type">form</field>
1744+ <field name="view_mode">tree,form</field>
1745+ <field name="domain">[('date','&lt;',time.strftime('%Y-%m-%d %H:%M:%S'))]</field>
1746+ <field name="filter" eval="True"/>
1747+ </record>
1748+
1749+ <record id="action_account_analytic_account_tree2" model="ir.actions.act_window">
1750+ <field name="name">Chart of Analytic Accounts</field>
1751+ <field name="res_model">account.analytic.account</field>
1752+ <field name="view_type">tree</field>
1753+ <field name="view_id" ref="view_account_analytic_account_tree"/>
1754+ <field name="domain">[('parent_id','=',False)]</field>
1755+ <field name="help" type="html">
1756+ <p>
1757+ Click to add a new analytic account.
1758+ </p><p>
1759+ The normal chart of accounts has a structure defined by the
1760+ legal requirement of the country. The analytic chart of
1761+ accounts structure should reflect your own business needs in
1762+ term of costs/revenues reporting.
1763+ </p><p>
1764+ They are usually structured by contracts, projects, products or
1765+ departements. Most of the OpenERP operations (invoices,
1766+ timesheets, expenses, etc) generate analytic entries on the
1767+ related account.
1768+ </p>
1769+ </field>
1770+ </record>
1771+
1772+
1773+ <record id="view_account_analytic_line_form" model="ir.ui.view">
1774+ <field name="name">account.analytic.line.form</field>
1775+ <field name="model">account.analytic.line</field>
1776+ <field name="priority">1</field>
1777+ <field name="arch" type="xml">
1778+ <form string="Analytic Entry" version="7.0">
1779+ <group>
1780+ <group>
1781+ <field name="name"/>
1782+ <field name="account_id"/>
1783+ <field name="user_id" context="{'default_groups_ref': ['base.group_user', 'base.group_partner_manager', 'account.group_account_invoice']}"/>
1784+ </group>
1785+ <group>
1786+ <field name="date"/>
1787+ <field name="company_id" groups="base.group_multi_company"/>
1788+ </group>
1789+ <group string="Amount">
1790+ <field name="amount"/>
1791+ </group>
1792+ <group string="Product Information" name="product_info">
1793+ <label for="unit_amount"/>
1794+ <div>
1795+ <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
1796+ </div>
1797+ </group>
1798+ </group>
1799+ </form>
1800+ </field>
1801+ </record>
1802+ <record id="view_account_analytic_line_tree" model="ir.ui.view">
1803+ <field name="name">account.analytic.line.tree</field>
1804+ <field name="model">account.analytic.line</field>
1805+ <field name="arch" type="xml">
1806+ <tree string="Analytic Entries">
1807+ <field name="date"/>
1808+ <field name="name"/>
1809+ <field name="user_id"/>
1810+ <field name="amount" sum="Total" invisible="context.get('to_invoice', False)"/>
1811+ <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" sum="Total Quantity"/>
1812+ <field domain="[('type','=','normal')]" name="account_id"/>
1813+ <field name="company_id" groups="base.group_multi_company"/>
1814+ </tree>
1815+ </field>
1816+ </record>
1817+ <record id="view_account_analytic_line_filter" model="ir.ui.view">
1818+ <field name="name">account.analytic.line.select</field>
1819+ <field name="model">account.analytic.line</field>
1820+ <field name="arch" type="xml">
1821+ <search string="Search Analytic Lines">
1822+ <field name="name" string="Description"/>
1823+ <field name="date"/>
1824+ <filter string="My Entries" domain="[('user_id','=',uid)]"/>
1825+ <field name="account_id" filter_domain="[('account_id','child_of',self)]"/>
1826+ <field name="user_id"/>
1827+ <group string="Group By..." expand="0">
1828+ <filter string="Analytic Account" context="{'group_by':'account_id'}" name="account_id"/>
1829+ <filter string="User" context="{'group_by':'user_id'}" name="user_id"/>
1830+ <filter string="Tasks Month" context="{'group_by':'date'}" name="group_date" help="Invoice Tasks by Month"/>
1831+ </group>
1832+ </search>
1833+ </field>
1834+ </record>
1835+ <record id="action_account_analytic_line_form" model="ir.actions.act_window">
1836+ <field name="name">Analytic Entries</field>
1837+ <field name="type">ir.actions.act_window</field>
1838+ <field name="res_model">account.analytic.line</field>
1839+ <field name="view_type">form</field>
1840+ <field name="context">{"search_default_user_id":uid}</field>
1841+ <field name="view_id" ref="view_account_analytic_line_tree"/>
1842+ </record>
1843+
1844+ <!-- Entries by Line -->
1845+
1846+ <record id="action_account_tree1" model="ir.actions.act_window">
1847+ <field name="name">Analytic Items</field>
1848+ <field name="res_model">account.analytic.line</field>
1849+ <field name="view_type">form</field>
1850+ <field name="view_mode">tree,form</field>
1851+ <field name="domain">[('account_id','child_of',[active_id])]</field>
1852+ <field name="context">{'account_id':active_id}</field>
1853+ <field name="search_view_id" ref="view_account_analytic_line_filter"/>
1854+ </record>
1855+ <record id="ir_open_account_analytic_account" model="ir.values">
1856+ <field eval="'tree_but_open'" name="key2"/>
1857+ <field eval="'account.analytic.account'" name="model"/>
1858+ <field name="name">Open Account Tree</field>
1859+ <field eval="'ir.actions.act_window,%d'%action_account_tree1" name="value"/>
1860+ </record>
1861+
1862+ <record id="account_analytic_line_extended_form" model="ir.ui.view">
1863+ <field name="name">account.analytic.line.extended_form</field>
1864+ <field name="model">account.analytic.line</field>
1865+ <field name="arch" type="xml">
1866+ <form string="Project line" version="7.0">
1867+ <group>
1868+ <group>
1869+ <field name="name"/>
1870+ <field name="account_id"/>
1871+ </group>
1872+ <group>
1873+ <field name="date" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
1874+ <field name="company_id" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)"/>
1875+ </group>
1876+ <group string="Amount">
1877+ <field name="amount"/>
1878+ </group>
1879+ <group string="Product Information">
1880+ <label for="unit_amount"/>
1881+ <div>
1882+ <field name="unit_amount" on_change="on_change_unit_amount(product_id, unit_amount, company_id, product_uom_id)" class="oe_inline"/>
1883+ </div>
1884+ </group>
1885+ </group>
1886+ </form>
1887+ </field>
1888+ </record>
1889+ <record id="action_account_analytic_account_line_extended_form" model="ir.actions.act_window">
1890+ <field name="name">account.analytic.line.extended</field>
1891+ <field name="type">ir.actions.act_window</field>
1892+ <field name="res_model">account.analytic.line</field>
1893+ <field name="view_type">form</field>
1894+ <field name="view_id" ref="view_account_analytic_line_form"/>
1895+ </record>
1896+
1897+ #
1898+ # Analytic Journal
1899+ #
1900+
1901+ <record id="view_account_analytic_journal_tree" model="ir.ui.view">
1902+ <field name="name">account.analytic.journal.tree</field>
1903+ <field name="model">account.analytic.journal</field>
1904+ <field name="arch" type="xml">
1905+ <tree string="Analytic Journal">
1906+ <field name="code"/>
1907+ <field name="name"/>
1908+ <field name="type"/>
1909+ </tree>
1910+ </field>
1911+ </record>
1912+
1913+ <record id="view_analytic_journal_search" model="ir.ui.view">
1914+ <field name="name">account.analytic.journal.search</field>
1915+ <field name="model">account.analytic.journal</field>
1916+ <field name="arch" type="xml">
1917+ <search string="Analytic Journals">
1918+ <field name="name" filter_domain="['|', ('name','ilike',self), ('code','ilike',self)]" string="Analytic Journal"/>
1919+ <field name="type"/>
1920+ <group expand="0" string="Group By...">
1921+ <filter string="Type" icon="terp-stock_symbol-selection" domain="[]" context="{'group_by':'type'}"/>
1922+ </group>
1923+ </search>
1924+ </field>
1925+ </record>
1926+
1927+ <record id="view_account_analytic_journal_form" model="ir.ui.view">
1928+ <field name="name">account.analytic.journal.form</field>
1929+ <field name="model">account.analytic.journal</field>
1930+ <field name="arch" type="xml">
1931+ <form string="Analytic Journal" version="7.0">
1932+ <group col="4">
1933+ <field name="name"/>
1934+ <field name="code"/>
1935+ <field name="type"/>
1936+ <field name="active"/>
1937+ <field name="company_id" groups="base.group_multi_company"/>
1938+ </group>
1939+ </form>
1940+ </field>
1941+ </record>
1942+ <record id="action_account_analytic_journal_form" model="ir.actions.act_window">
1943+ <field name="name">Analytic Journals</field>
1944+ <field name="res_model">account.analytic.journal</field>
1945+ <field name="view_type">form</field>
1946+ <field name="view_mode">tree,form</field>
1947+ <field name="search_view_id" ref="view_analytic_journal_search" />
1948+ </record>
1949+
1950+ #
1951+ # Open journal entries
1952+ #
1953+
1954+ <record id="action_account_analytic_journal_open_form" model="ir.actions.act_window">
1955+ <field name="name">Analytic Journal Items</field>
1956+ <field name="res_model">account.analytic.line</field>
1957+ <field name="view_type">form</field>
1958+ <field name="view_mode">tree,form</field>
1959+ </record>
1960+
1961 </data>
1962 </openerp>
1963
1964=== renamed directory 'account/project/wizard' => 'analytic/wizard'
1965=== modified file 'analytic/wizard/__init__.py'
1966--- account/project/wizard/__init__.py 2011-01-14 00:11:01 +0000
1967+++ analytic/wizard/__init__.py 2014-05-16 11:21:01 +0000
1968@@ -24,7 +24,6 @@
1969 import account_analytic_inverted_balance_report
1970 import account_analytic_cost_ledger_report
1971 import account_analytic_cost_ledger_for_journal_report
1972-import project_account_analytic_line
1973 import account_analytic_chart
1974
1975 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
1976
1977=== modified file 'analytic/wizard/account_analytic_chart.py'
1978--- account/project/wizard/account_analytic_chart.py 2013-10-27 12:31:04 +0000
1979+++ analytic/wizard/account_analytic_chart.py 2014-05-16 11:21:01 +0000
1980@@ -35,7 +35,7 @@
1981 result_context = {}
1982 if context is None:
1983 context = {}
1984- result = mod_obj.get_object_reference(cr, uid, 'account', 'action_account_analytic_account_tree2')
1985+ result = mod_obj.get_object_reference(cr, uid, 'analytic', 'action_account_analytic_account_tree2')
1986 id = result and result[1] or False
1987 result = act_obj.read(cr, uid, [id], context=context)[0]
1988 data = self.read(cr, uid, ids, [])[0]
1989
1990=== modified file 'analytic/wizard/account_analytic_chart_view.xml'
1991--- account/project/wizard/account_analytic_chart_view.xml 2014-02-10 05:26:55 +0000
1992+++ analytic/wizard/account_analytic_chart_view.xml 2014-05-16 11:21:01 +0000
1993@@ -31,13 +31,5 @@
1994 <field name="target">new</field>
1995 </record>
1996
1997- <menuitem
1998- name="Chart of Analytic Accounts"
1999- parent="account.menu_finance_charts"
2000- action="action_account_analytic_chart"
2001- id="menu_action_analytic_account_tree2"
2002- icon="STOCK_INDENT"
2003- groups="analytic.group_analytic_accounting"/>
2004-
2005 </data>
2006 </openerp>
2007
2008=== modified file 'analytic/wizard/account_analytic_journal_report_view.xml'
2009--- account/project/wizard/account_analytic_journal_report_view.xml 2012-11-29 22:26:45 +0000
2010+++ analytic/wizard/account_analytic_journal_report_view.xml 2014-05-16 11:21:01 +0000
2011@@ -32,20 +32,13 @@
2012 </record>
2013
2014 <record model="ir.values" id="account_analytic_journal_values">
2015- <field name="model_id" ref="account.model_account_analytic_journal" />
2016+ <field name="model_id" ref="analytic.model_account_analytic_journal" />
2017 <field name="name">Account Analytic Journal</field>
2018 <field name="key2">client_print_multi</field>
2019 <field name="value" eval="'ir.actions.act_window,' + str(ref('action_account_analytic_journal'))" />
2020 <field name="key">action</field>
2021 <field name="model">account.analytic.journal</field>
2022 </record>
2023-
2024- <menuitem groups="analytic.group_analytic_accounting" id="next_id_40"
2025- name="Analytic" parent="account.menu_finance_generic_reporting"
2026- sequence="4"/>
2027- <menuitem groups="analytic.group_analytic_accounting"
2028- action="account.action_account_analytic_journal"
2029- id="account_analytic_journal_print" parent="account.next_id_40"/>
2030
2031 </data>
2032 </openerp>
2033
2034=== modified file 'hr_expense/hr_expense.py'
2035--- hr_expense/hr_expense.py 2014-03-10 14:36:00 +0000
2036+++ hr_expense/hr_expense.py 2014-05-16 11:21:01 +0000
2037@@ -141,6 +141,8 @@
2038
2039 def expense_confirm(self, cr, uid, ids, context=None):
2040 for expense in self.browse(cr, uid, ids):
2041+ if not expense.line_ids:
2042+ raise osv.except_osv(_('Error!'),_('You cannot submit an expense that has no expense line to the manager.'))
2043 if expense.employee_id and expense.employee_id.parent_id.user_id:
2044 self.message_subscribe_users(cr, uid, [expense.id], user_ids=[expense.employee_id.parent_id.user_id.id])
2045 return self.write(cr, uid, ids, {'state': 'confirm', 'date_confirm': time.strftime('%Y-%m-%d')}, context=context)
2046
2047=== modified file 'hr_expense/hr_expense_demo.xml'
2048--- hr_expense/hr_expense_demo.xml 2014-01-09 15:45:50 +0000
2049+++ hr_expense/hr_expense_demo.xml 2014-05-16 11:21:01 +0000
2050@@ -45,7 +45,7 @@
2051 <record id="expenses_line0" model="hr.expense.line">
2052 <field name="name">Travel Expenses</field>
2053 <field name="date_value" eval="time.strftime('%Y-08-10')"/>
2054- <field name="analytic_account" ref="account.analytic_consultancy"/>
2055+ <field name="analytic_account" ref="analytic.analytic_consultancy"/>
2056 <field name="expense_id" ref="expenses0"/>
2057 <field eval="200.0" name="unit_amount"/>
2058 <field name="uom_id" ref="product.product_uom_unit"/>
2059@@ -61,7 +61,7 @@
2060 <record id="travel_by_air_sep" model="hr.expense.line">
2061 <field name="name">Travel by Air</field>
2062 <field name="date_value" eval="time.strftime('%Y-09-03')"/>
2063- <field name="analytic_account" ref="account.analytic_consultancy"/>
2064+ <field name="analytic_account" ref="analytic.analytic_consultancy"/>
2065 <field name="product_id" ref="air_ticket"/>
2066 <field name="expense_id" ref="sep_expenses"/>
2067 <field eval="700.0" name="unit_amount"/>
2068@@ -72,7 +72,7 @@
2069 <record id="hotel_bill_sep" model="hr.expense.line">
2070 <field name="name">Hotel Expenses - Thymbra</field>
2071 <field name="date_value" eval="time.strftime('%Y-09-20')"/>
2072- <field name="analytic_account" ref="account.analytic_nebula"/>
2073+ <field name="analytic_account" ref="analytic.analytic_nebula"/>
2074 <field name="product_id" ref="hotel_rent"/>
2075 <field name="expense_id" ref="sep_expenses"/>
2076 <field eval="400.0" name="unit_amount"/>
2077@@ -83,7 +83,7 @@
2078 <record id="car_travel_sep" model="hr.expense.line">
2079 <field name="name">Bruxelles - Paris</field>
2080 <field name="date_value" eval="time.strftime('%Y-09-15')"/>
2081- <field name="analytic_account" ref="account.analytic_nebula"/>
2082+ <field name="analytic_account" ref="analytic.analytic_nebula"/>
2083 <field name="product_id" ref="car_travel"/>
2084 <field name="expense_id" ref="sep_expenses"/>
2085 <field eval="0.30" name="unit_amount"/>
2086
2087=== modified file 'hr_expense/hr_expense_view.xml'
2088--- hr_expense/hr_expense_view.xml 2014-04-11 13:18:42 +0000
2089+++ hr_expense/hr_expense_view.xml 2014-05-16 11:21:01 +0000
2090@@ -66,8 +66,8 @@
2091 <button name="validate" states="confirm" string="Approve" type="workflow" groups="base.group_hr_user" class="oe_highlight"/>
2092 <button name="refuse" states="confirm,accepted" string="Refuse" type="workflow" groups="base.group_hr_user" />
2093 <button name="draft" states="confirm,cancelled" string="Set to Draft" type="workflow" groups="base.group_hr_user" />
2094- <button name="done" states="accepted" string="Generate Accounting Entries" type="workflow" groups="account.group_account_invoice" class="oe_highlight"/>
2095- <button name="action_view_move" states="done" string="Open Accounting Entries" type="object" groups="account.group_account_invoice"/>
2096+ <button name="done" states="accepted" string="Generate Accounting Entries" type="workflow" groups="account.group_account_invoice,account.group_account_user" class="oe_highlight"/>
2097+ <button name="action_view_move" states="done" string="Open Accounting Entries" type="object" groups="account.group_account_invoice,account.group_account_user"/>
2098 <field name="state" widget="statusbar" statusbar_visible="draft,confirm,accepted,done,paid" statusbar_colors='{"confirm":"blue","cancelled":"red"}'/>
2099 </header>
2100 <sheet>
2101
2102=== modified file 'hr_expense/hr_expense_workflow.xml'
2103--- hr_expense/hr_expense_workflow.xml 2013-10-27 12:31:04 +0000
2104+++ hr_expense/hr_expense_workflow.xml 2014-05-16 11:21:01 +0000
2105@@ -84,7 +84,6 @@
2106 <field name="act_from" ref="act_accepted"/>
2107 <field name="act_to" ref="act_done"/>
2108 <field name="signal">done</field>
2109- <field name="group_id" ref="base.group_hr_user"/>
2110 </record>
2111
2112 <record id="t10" model="workflow.transition">
2113
2114=== modified file 'hr_expense/security/ir.model.access.csv'
2115--- hr_expense/security/ir.model.access.csv 2012-11-29 22:26:45 +0000
2116+++ hr_expense/security/ir.model.access.csv 2014-05-16 11:21:01 +0000
2117@@ -12,7 +12,7 @@
2118 access_account_journal_employee,account.journal.employee,account.model_account_journal,base.group_user,1,0,0,0
2119 access_account_invoice_user,account.invoice.user,account.model_account_invoice,base.group_hr_user,1,1,1,1
2120 access_account_invoice_line_user,account.invoice.line.user,account.model_account_invoice_line,base.group_hr_user,1,1,1,1
2121-access_account_analytic_journal_user,account.ianalytic.journal.user,account.model_account_analytic_journal,base.group_hr_user,1,1,1,1
2122+access_account_analytic_journal_user,account.ianalytic.journal.user,analytic.model_account_analytic_journal,base.group_hr_user,1,1,1,1
2123 access_account_invoice_tax_user,account.invoice.tax.user,account.model_account_invoice_tax,base.group_hr_user,1,1,1,1
2124 access_account_period_user,account.period.user,account.model_account_period,base.group_hr_user,1,1,1,1
2125 access_account_fiscalyear_user,account.fiscalyear.user,account.model_account_fiscalyear,base.group_hr_user,1,1,1,1
2126
2127=== modified file 'hr_timesheet/hr_timesheet_demo.xml'
2128--- hr_timesheet/hr_timesheet_demo.xml 2013-10-27 12:31:04 +0000
2129+++ hr_timesheet/hr_timesheet_demo.xml 2014-05-16 11:21:01 +0000
2130@@ -12,16 +12,16 @@
2131 <field name="product_id" ref="product.product_product_consultant"/>
2132 <field name="journal_id" ref="analytic_journal"/>
2133 </record>
2134- <record id="account.analytic_administratif" model="account.analytic.account">
2135- <field name="use_timesheets">True</field>
2136- </record>
2137- <record id="account.analytic_partners" model="account.analytic.account">
2138- <field name="use_timesheets">True</field>
2139- </record>
2140- <record id="account.analytic_consultancy" model="account.analytic.account">
2141- <field name="use_timesheets">True</field>
2142- </record>
2143- <record id="account.analytic_super_product_trainings" model="account.analytic.account">
2144+ <record id="analytic.analytic_administratif" model="account.analytic.account">
2145+ <field name="use_timesheets">True</field>
2146+ </record>
2147+ <record id="analytic.analytic_partners" model="account.analytic.account">
2148+ <field name="use_timesheets">True</field>
2149+ </record>
2150+ <record id="analytic.analytic_consultancy" model="account.analytic.account">
2151+ <field name="use_timesheets">True</field>
2152+ </record>
2153+ <record id="analytic.analytic_super_product_trainings" model="account.analytic.account">
2154 <field name="use_timesheets">True</field>
2155 </record>
2156
2157@@ -32,7 +32,7 @@
2158 <field eval="2.00" name="unit_amount"/>
2159 <field name="product_id" ref="product.product_product_consultant"/>
2160 <field name="product_uom_id" ref="product.product_uom_hour"/>
2161- <field name="account_id" ref="account.analytic_administratif"></field>
2162+ <field name="account_id" ref="analytic.analytic_administratif"></field>
2163 <field eval="-60.00" name="amount"/>
2164 <field name="general_account_id" ref="account.a_expense"/>
2165 <field name="journal_id" ref="analytic_journal"/>
2166@@ -45,7 +45,7 @@
2167 <field eval="1.00" name="unit_amount"/>
2168 <field name="product_id" ref="product.product_product_consultant"/>
2169 <field name="product_uom_id" ref="product.product_uom_hour"/>
2170- <field name="account_id" ref="account.analytic_administratif"></field>
2171+ <field name="account_id" ref="analytic.analytic_administratif"></field>
2172 <field eval="-30.00" name="amount"/>
2173 <field name="general_account_id" ref="account.a_expense"/>
2174 <field name="journal_id" ref="analytic_journal"/>
2175@@ -58,7 +58,7 @@
2176 <field eval="03.00" name="unit_amount"/>
2177 <field name="product_id" ref="product.product_product_consultant"/>
2178 <field name="product_uom_id" ref="product.product_uom_hour"/>
2179- <field name="account_id" ref="account.analytic_administratif"></field>
2180+ <field name="account_id" ref="analytic.analytic_administratif"></field>
2181 <field eval="-90.00" name="amount"/>
2182 <field name="general_account_id" ref="account.a_expense"/>
2183 <field name="journal_id" ref="analytic_journal"/>
2184@@ -71,7 +71,7 @@
2185 <field eval="01.00" name="unit_amount"/>
2186 <field name="product_id" ref="product.product_product_consultant"/>
2187 <field name="product_uom_id" ref="product.product_uom_hour"/>
2188- <field name="account_id" ref="account.analytic_administratif"></field>
2189+ <field name="account_id" ref="analytic.analytic_administratif"></field>
2190 <field eval="-30.00" name="amount"/>
2191 <field name="general_account_id" ref="account.a_expense"/>
2192 <field name="journal_id" ref="analytic_journal"/>
2193@@ -84,7 +84,7 @@
2194 <field eval="01.00" name="unit_amount"/>
2195 <field name="product_id" ref="product.product_product_consultant"/>
2196 <field name="product_uom_id" ref="product.product_uom_hour"/>
2197- <field name="account_id" ref="account.analytic_administratif"></field>
2198+ <field name="account_id" ref="analytic.analytic_administratif"></field>
2199 <field eval="-30.00" name="amount"/>
2200 <field name="general_account_id" ref="account.a_expense"/>
2201 <field name="journal_id" ref="analytic_journal"/>
2202
2203=== modified file 'hr_timesheet/security/ir.model.access.csv'
2204--- hr_timesheet/security/ir.model.access.csv 2012-11-29 22:26:45 +0000
2205+++ hr_timesheet/security/ir.model.access.csv 2014-05-16 11:21:01 +0000
2206@@ -3,10 +3,10 @@
2207 access_hr_analytic_timesheet_employee,hr.analytic.timesheet,model_hr_analytic_timesheet,base.group_user,1,1,1,1
2208 access_hr_account_analytic_line,account.account.analytic.line,account.model_account_analytic_line,base.group_hr_user,1,1,1,1
2209 access_hr_account_analytic_line_employee,account.account.analytic.line employee,account.model_account_analytic_line,base.group_user,1,1,1,1
2210-access_account_analytic_journal,account.account.analytic.journal,account.model_account_analytic_journal,base.group_hr_user,1,1,1,1
2211+access_account_analytic_journal,account.account.analytic.journal,analytic.model_account_analytic_journal,base.group_hr_user,1,1,1,1
2212 access_product_product_user,product.product user,product.model_product_product,base.group_hr_user,1,1,1,1
2213 access_product_template_hr_timesheet,product.template.hr.timesheet,product.model_product_template,base.group_hr_user,1,1,1,1
2214 access_product_uom_hr_timesheet,product.uom.hr.timesheet,product.model_product_uom,base.group_hr_user,1,1,1,1
2215 access_account_fiscalyear_hr_user,account.account.fiscalyear.user,account.model_account_fiscalyear,base.group_hr_user,1,1,1,1
2216 access_hr_analytic_timesheet_user,hr.analytic.timesheet.user,model_hr_analytic_timesheet,base.group_user,1,1,1,0
2217-access_account_analytic_journal_user,account.account.analytic.journal.user,account.model_account_analytic_journal,base.group_user,1,0,0,0
2218+access_account_analytic_journal_user,account.account.analytic.journal.user,analytic.model_account_analytic_journal,base.group_user,1,0,0,0
2219
2220=== modified file 'hr_timesheet/test/hr_timesheet_demo.yml'
2221--- hr_timesheet/test/hr_timesheet_demo.yml 2013-10-27 12:31:04 +0000
2222+++ hr_timesheet/test/hr_timesheet_demo.yml 2014-05-16 11:21:01 +0000
2223@@ -7,5 +7,5 @@
2224 !record {model: hr.analytic.timesheet, id: working_hours_coding, view: False}:
2225 user_id: base.user_demo
2226 date: !eval time.strftime('%Y-%m-%d')
2227- account_id: account.analytic_administratif
2228+ account_id: analytic.analytic_administratif
2229 unit_amount: 1.0
2230
2231=== modified file 'hr_timesheet/test/test_hr_timesheet.yml'
2232--- hr_timesheet/test/test_hr_timesheet.yml 2013-10-27 12:31:04 +0000
2233+++ hr_timesheet/test/test_hr_timesheet.yml 2014-05-16 11:21:01 +0000
2234@@ -42,7 +42,7 @@
2235 import time
2236 from datetime import datetime, date, timedelta
2237 uid = ref('base.user_demo')
2238- new_id = self.create(cr, uid, {'account_id': ref('account.analytic_nebula'),'analytic_amount': 7.0,
2239+ new_id = self.create(cr, uid, {'account_id': ref('analytic.analytic_nebula'),'analytic_amount': 7.0,
2240 'date': (datetime.now()+timedelta(1)).strftime('%Y-%m-%d %H:%M:%S') ,
2241 'date_start': time.strftime('%Y-%m-%d %H:%M:%S'), 'info': 'Create Yaml for hr module',
2242 'name': 'Gilles Gravie', 'server_date': time.strftime('%Y-%m-%d %H:%M:%S'), 'state': 'present'})
2243@@ -55,7 +55,7 @@
2244 import time
2245 from datetime import datetime, date, timedelta
2246 uid = ref('base.user_demo')
2247- new_id = self.create(cr, uid, {'account_id': ref('account.analytic_spark'), 'analytic_amount': 7.0,
2248+ new_id = self.create(cr, uid, {'account_id': ref('analytic.analytic_spark'), 'analytic_amount': 7.0,
2249 'date': (datetime.now()+timedelta(2)).strftime('%Y-%m-%d %H:%M:%S'),
2250 'date_start': time.strftime('%Y-%m-%d %H:%M:%S'), 'info': 'Create Yaml for hr module',
2251 'name': 'Gilles Gravie', 'server_date': time.strftime('%Y-%m-%d %H:%M:%S'), 'state': 'absent'})
2252
2253=== modified file 'hr_timesheet_invoice/hr_timesheet_invoice_demo.xml'
2254--- hr_timesheet_invoice/hr_timesheet_invoice_demo.xml 2012-12-08 13:21:56 +0000
2255+++ hr_timesheet_invoice/hr_timesheet_invoice_demo.xml 2014-05-16 11:21:01 +0000
2256@@ -11,13 +11,13 @@
2257 <field name="customer_name">Offered developments</field>
2258 <field name="factor">100.0</field>
2259 </record>
2260- <record id="account.analytic_spark" model="account.analytic.account">
2261- <field name="to_invoice" ref="timesheet_invoice_factor1"/>
2262- </record>
2263- <record id="account.analytic_nebula" model="account.analytic.account">
2264- <field name="to_invoice" ref="timesheet_invoice_factor1"/>
2265- </record>
2266- <record id="account.analytic_partners_camp_to_camp" model="account.analytic.account">
2267+ <record id="analytic.analytic_spark" model="account.analytic.account">
2268+ <field name="to_invoice" ref="timesheet_invoice_factor1"/>
2269+ </record>
2270+ <record id="analytic.analytic_nebula" model="account.analytic.account">
2271+ <field name="to_invoice" ref="timesheet_invoice_factor1"/>
2272+ </record>
2273+ <record id="analytic.analytic_partners_camp_to_camp" model="account.analytic.account">
2274 <field name="to_invoice" ref="timesheet_invoice_factor1"/>
2275 </record>
2276 </data>
2277
2278=== modified file 'hr_timesheet_invoice/hr_timesheet_invoice_view.xml'
2279--- hr_timesheet_invoice/hr_timesheet_invoice_view.xml 2014-02-05 16:03:47 +0000
2280+++ hr_timesheet_invoice/hr_timesheet_invoice_view.xml 2014-05-16 11:21:01 +0000
2281@@ -80,9 +80,9 @@
2282 <record id="view_account_analytic_line_search_inherit" model="ir.ui.view">
2283 <field name="name">account.analytic.line.search.to_invoice</field>
2284 <field name="model">account.analytic.line</field>
2285- <field name="inherit_id" ref="account.view_account_analytic_line_filter"/>
2286+ <field name="inherit_id" ref="analytic.view_account_analytic_line_filter"/>
2287 <field name="arch" type="xml">
2288- <xpath expr="//filter[@name='others']" position="after">
2289+ <xpath expr="//field[@name='date']" position="after">
2290 <separator/>
2291 <filter name="to_invoice" string="To Invoice" context="{'to_invoice': 1}" domain="[('invoice_id','=',False), ('to_invoice','&lt;&gt;',False)]" icon="terp-dolar"/>
2292 <filter name="invoiced" string="Invoiced" domain="[('invoice_id','!=',False), ('to_invoice','&lt;&gt;',False)]" icon="terp-dolar"/>
2293@@ -107,7 +107,7 @@
2294 <record id="view_account_analytic_line_tree_inherit" model="ir.ui.view">
2295 <field name="name">account.analytic.line.tree.to_invoice</field>
2296 <field name="model">account.analytic.line</field>
2297- <field name="inherit_id" ref="account.view_account_analytic_line_tree"/>
2298+ <field name="inherit_id" ref="analytic.view_account_analytic_line_tree"/>
2299 <field name="arch" type="xml">
2300 <field name="account_id" position="after">
2301 <field name="to_invoice"/>
2302@@ -117,7 +117,7 @@
2303 <record id="view_account_analytic_line_form_inherit" model="ir.ui.view">
2304 <field name="name">account.analytic.line.form.to_invoice</field>
2305 <field name="model">account.analytic.line</field>
2306- <field name="inherit_id" ref="account.view_account_analytic_line_form"/>
2307+ <field name="inherit_id" ref="analytic.view_account_analytic_line_form"/>
2308 <field name="arch" type="xml">
2309 <field name="amount" position="before">
2310 <field name="to_invoice"/>
2311
2312=== modified file 'hr_timesheet_invoice/report/hr_timesheet_invoice_report.py'
2313--- hr_timesheet_invoice/report/hr_timesheet_invoice_report.py 2013-10-27 12:31:04 +0000
2314+++ hr_timesheet_invoice/report/hr_timesheet_invoice_report.py 2014-05-16 11:21:01 +0000
2315@@ -35,7 +35,7 @@
2316 'cost': fields.float('Cost', readonly=True),
2317 'product_id': fields.many2one('product.product', 'Product',readonly=True),
2318 'account_id': fields.many2one('account.analytic.account', 'Analytic Account', readonly=True),
2319- 'general_account_id': fields.many2one('account.account', 'General Account', readonly=True),
2320+ 'general_account_id': fields.many2one('account.account', 'Financial Account', readonly=True),
2321 'invoice_id': fields.many2one('account.invoice', 'Invoiced', readonly=True),
2322 'month': fields.selection([('01','January'), ('02','February'), ('03','March'), ('04','April'), ('05','May'), ('06','June'),
2323 ('07','July'), ('08','August'), ('09','September'), ('10','October'), ('11','November'), ('12','December')],'Month',readonly=True),
2324
2325=== modified file 'hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml'
2326--- hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml 2013-10-27 12:31:04 +0000
2327+++ hr_timesheet_invoice/test/test_hr_timesheet_invoice.yml 2014-05-16 11:21:01 +0000
2328@@ -4,7 +4,7 @@
2329 I create an account analytic line.
2330 -
2331 !record {model: account.analytic.line, id: account_analytic_line_developyamlforhrmodule0 }:
2332- account_id: account.analytic_agrolait
2333+ account_id: analytic.analytic_agrolait
2334 amount: -1.0
2335 general_account_id: account.a_expense
2336 journal_id: hr_timesheet.analytic_journal
2337@@ -16,20 +16,20 @@
2338 -
2339 Assign partner name and price list in analytic account.
2340 -
2341- !record {model: account.analytic.account, id: account.analytic_agrolait}:
2342+ !record {model: account.analytic.account, id: analytic.analytic_agrolait}:
2343 partner_id: base.res_partner_2
2344 pricelist_id: product.list0
2345 -
2346 I open this account and make the state as pending.
2347 -
2348 !python {model: account.analytic.account}: |
2349- self.set_open(cr, uid, [ref('account.analytic_agrolait')], None)
2350- self.set_pending(cr, uid, [ref('account.analytic_agrolait')], None)
2351+ self.set_open(cr, uid, [ref('analytic.analytic_agrolait')], None)
2352+ self.set_pending(cr, uid, [ref('analytic.analytic_agrolait')], None)
2353 -
2354 I assign account on analytic account line.
2355 -
2356 !python {model: hr.analytic.timesheet}: |
2357- self.on_change_account_id(cr, uid, [ref('account_analytic_line_developyamlforhrmodule0')], ref('account.analytic_agrolait'))
2358+ self.on_change_account_id(cr, uid, [ref('account_analytic_line_developyamlforhrmodule0')], ref('analytic.analytic_agrolait'))
2359
2360 -
2361 I create a Tax Codes
2362
2363=== modified file 'hr_timesheet_invoice/test/test_hr_timesheet_invoice_no_prod_tax.yml'
2364--- hr_timesheet_invoice/test/test_hr_timesheet_invoice_no_prod_tax.yml 2013-10-27 12:31:04 +0000
2365+++ hr_timesheet_invoice/test/test_hr_timesheet_invoice_no_prod_tax.yml 2014-05-16 11:21:01 +0000
2366@@ -4,7 +4,7 @@
2367 I create an account analytic line.
2368 -
2369 !record {model: account.analytic.line, id: account_analytic_line_developyamlforhrmodule1 }:
2370- account_id: account.analytic_agrolait
2371+ account_id: analytic.analytic_agrolait
2372 amount: -1.0
2373 general_account_id: account.a_expense
2374 journal_id: hr_timesheet.analytic_journal
2375@@ -16,20 +16,20 @@
2376 -
2377 Assign partner name and price list in analytic account.
2378 -
2379- !record {model: account.analytic.account, id: account.analytic_agrolait}:
2380+ !record {model: account.analytic.account, id: analytic.analytic_agrolait}:
2381 partner_id: base.res_partner_2
2382 pricelist_id: product.list0
2383 -
2384 I open this account and make the state as pending.
2385 -
2386 !python {model: account.analytic.account}: |
2387- self.set_open(cr, uid, [ref('account.analytic_agrolait')], None)
2388- self.set_pending(cr, uid, [ref('account.analytic_agrolait')], None)
2389+ self.set_open(cr, uid, [ref('analytic.analytic_agrolait')], None)
2390+ self.set_pending(cr, uid, [ref('analytic.analytic_agrolait')], None)
2391 -
2392 I assign account on analytic account line.
2393 -
2394 !python {model: hr.analytic.timesheet}: |
2395- self.on_change_account_id(cr, uid, [ref('account_analytic_line_developyamlforhrmodule1')], ref('account.analytic_agrolait'))
2396+ self.on_change_account_id(cr, uid, [ref('account_analytic_line_developyamlforhrmodule1')], ref('analytic.analytic_agrolait'))
2397 -
2398 I create a Tax Code
2399 -
2400
2401=== modified file 'hr_timesheet_sheet/report/hr_timesheet_report.py'
2402--- hr_timesheet_sheet/report/hr_timesheet_report.py 2014-01-27 13:03:51 +0000
2403+++ hr_timesheet_sheet/report/hr_timesheet_report.py 2014-05-16 11:21:01 +0000
2404@@ -33,7 +33,7 @@
2405 'name': fields.char('Description', size=64,readonly=True),
2406 'product_id' : fields.many2one('product.product', 'Product',readonly=True),
2407 'journal_id' : fields.many2one('account.analytic.journal', 'Journal',readonly=True),
2408- 'general_account_id' : fields.many2one('account.account', 'General Account', readonly=True),
2409+ 'general_account_id' : fields.many2one('account.account', 'Financial Account', readonly=True),
2410 'user_id': fields.many2one('res.users', 'User',readonly=True),
2411 'account_id': fields.many2one('account.analytic.account', 'Analytic Account',readonly=True),
2412 'company_id': fields.many2one('res.company', 'Company',readonly=True),
2413
2414=== modified file 'hr_timesheet_sheet/report/hr_timesheet_report_view.xml'
2415--- hr_timesheet_sheet/report/hr_timesheet_report_view.xml 2014-01-30 13:17:37 +0000
2416+++ hr_timesheet_sheet/report/hr_timesheet_report_view.xml 2014-05-16 11:21:01 +0000
2417@@ -32,7 +32,7 @@
2418 <filter string="User" name="group_user_id" icon="terp-personal" context="{'group_by':'user_id'}"/>
2419 <filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
2420 <filter string="Analytic Account" icon="terp-folder-green" context="{'group_by':'account_id'}" groups="analytic.group_analytic_accounting"/>
2421- <filter string="General Account" icon="terp-folder-orange" context="{'group_by':'general_account_id'}"/>
2422+ <filter string="Financial Account" icon="terp-folder-orange" context="{'group_by':'general_account_id'}"/>
2423 <filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
2424 <filter string="Date (day)" context="{'group_by':'date:day'}" help="Group by day of date"/>
2425 <filter string="Date (month)" context="{'group_by':'date:month'}" help="Group by month of date"/>
2426
2427=== modified file 'hr_timesheet_sheet/report/timesheet_report.py'
2428--- hr_timesheet_sheet/report/timesheet_report.py 2013-11-27 15:32:57 +0000
2429+++ hr_timesheet_sheet/report/timesheet_report.py 2014-05-16 11:21:01 +0000
2430@@ -35,7 +35,7 @@
2431 'date': fields.date('Date', readonly=True),
2432 'name': fields.char('Description', size=64,readonly=True),
2433 'product_id' : fields.many2one('product.product', 'Product'),
2434- 'general_account_id' : fields.many2one('account.account', 'General Account', readonly=True),
2435+ 'general_account_id' : fields.many2one('account.account', 'Financial Account', readonly=True),
2436 'user_id': fields.many2one('res.users', 'User',readonly=True),
2437 'to_invoice': fields.many2one('hr_timesheet_invoice.factor', 'Type of Invoicing',readonly=True),
2438 'account_id': fields.many2one('account.analytic.account', 'Analytic Account',readonly=True),
2439
2440=== modified file 'hr_timesheet_sheet/report/timesheet_report_view.xml'
2441--- hr_timesheet_sheet/report/timesheet_report_view.xml 2014-01-30 13:20:07 +0000
2442+++ hr_timesheet_sheet/report/timesheet_report_view.xml 2014-05-16 11:21:01 +0000
2443@@ -41,7 +41,7 @@
2444 <filter string="Product" icon="terp-accessories-archiver" context="{'group_by':'product_id'}"/>
2445 <filter string="Type of Invoicing" icon="terp-stock_symbol-selection" context="{'group_by':'to_invoice'}"/>
2446 <filter string="Analytic Account" icon="terp-folder-green" context="{'group_by':'account_id'}"/>
2447- <filter string="General Account" icon="terp-folder-orange" context="{'group_by':'general_account_id'}"/>
2448+ <filter string="Financial Account" icon="terp-folder-orange" context="{'group_by':'general_account_id'}"/>
2449 <filter string="Status" icon="terp-stock_effects-object-colorize" context="{'group_by':'state'}"/>
2450 <filter string="Company" icon="terp-go-home" context="{'group_by':'company_id'}" groups="base.group_multi_company"/>
2451 <filter string="Day" icon="terp-go-today" context="{'group_by':'day'}" help="Group by day of date"/>
2452
2453=== modified file 'hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml'
2454--- hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml 2013-10-27 12:31:04 +0000
2455+++ hr_timesheet_sheet/test/test_hr_timesheet_sheet.yml 2014-05-16 11:21:01 +0000
2456@@ -45,7 +45,7 @@
2457 -
2458 !record {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}:
2459 timesheet_ids:
2460- - account_id: account.analytic_agrolait
2461+ - account_id: analytic.analytic_agrolait
2462 date: !eval time.strftime('%Y-%m-%d')
2463 name: 'Develop yaml for hr module'
2464 user_id: base.user_demo
2465@@ -74,7 +74,7 @@
2466 -
2467 !record {model: hr_timesheet_sheet.sheet, id: hr_timesheet_sheet_sheet_deddk0}:
2468 timesheet_ids:
2469- - account_id: account.analytic_agrolait
2470+ - account_id: analytic.analytic_agrolait
2471 date: !eval time.strftime('%Y-%m-%d')
2472 name: 'Develop yaml for hr module'
2473 unit_amount: 2.00
2474
2475=== modified file 'mrp/security/ir.model.access.csv'
2476--- mrp/security/ir.model.access.csv 2014-05-02 13:03:52 +0000
2477+++ mrp/security/ir.model.access.csv 2014-05-16 11:21:01 +0000
2478@@ -18,7 +18,7 @@
2479 access_stock_move_mrp_worker,stock.move mrp_worker,stock.model_stock_move,mrp.group_mrp_user,1,1,1,0
2480 access_stock_picking_mrp_worker,stock.picking mrp_worker,stock.model_stock_picking,mrp.group_mrp_user,1,1,1,1
2481 access_stock_warehouse,stock.warehouse mrp_worker,stock.model_stock_warehouse,mrp.group_mrp_user,1,0,0,0
2482-access_account_analytic_journal_mrp_worker,account.analytic.journal mrp_worker,account.model_account_analytic_journal,mrp.group_mrp_user,1,0,0,0
2483+access_account_analytic_journal_mrp_worker,account.analytic.journal mrp_worker,analytic.model_account_analytic_journal,mrp.group_mrp_user,1,0,0,0
2484 access_account_account,account.account mrp_worker,account.model_account_account,mrp.group_mrp_user,1,0,0,0
2485 access_hr_timesheet_group_mrp_worker,resource.calendar mrp_manager,resource.model_resource_calendar,mrp.group_mrp_manager,1,1,1,1
2486 access_procurement_user,procurement.order.user,model_procurement_order,base.group_user,1,1,1,1
2487
2488=== modified file 'multi_company/multi_company_demo.xml'
2489--- multi_company/multi_company_demo.xml 2014-05-07 18:29:17 +0000
2490+++ multi_company/multi_company_demo.xml 2014-05-16 11:21:01 +0000
2491@@ -143,7 +143,7 @@
2492 <field name="sequence_id" ref="account.sequence_sale_journal"/>
2493 <field name="default_credit_account_id" ref="account.a_sale"/>
2494 <field name="default_debit_account_id" ref="account.a_sale"/>
2495- <field name="analytic_journal_id" ref="account.cose_journal_sale"/>
2496+ <field name="analytic_journal_id" ref="analytic.cose_journal_sale"/>
2497 <field name="user_id" ref="base.user_root"/>
2498 <field name="company_id" ref="res_company_oerp_in"/>
2499 </record>
2500@@ -155,7 +155,7 @@
2501 <field name="sequence_id" ref="account.sequence_refund_sales_journal"/>
2502 <field name="default_credit_account_id" ref="account.a_sale"/>
2503 <field name="default_debit_account_id" ref="account.a_sale"/>
2504- <field name="analytic_journal_id" ref="account.cose_journal_sale"/>
2505+ <field name="analytic_journal_id" ref="analytic.cose_journal_sale"/>
2506 <field name="user_id" ref="base.user_root"/>
2507 <field name="company_id" ref="res_company_oerp_in"/>
2508 </record>
2509@@ -191,7 +191,7 @@
2510 <field name="sequence_id" ref="account.sequence_bank_journal"/>
2511 <field name="default_debit_account_id" ref="account.cash"/>
2512 <field name="default_credit_account_id" ref="account.cash"/>
2513- <field name="analytic_journal_id" ref="account.sit"/>
2514+ <field name="analytic_journal_id" ref="analytic.sit"/>
2515 <field name="user_id" ref="base.user_root"/>
2516 <field name="company_id" ref="res_company_oerp_in"/>
2517 </record>
2518@@ -203,7 +203,7 @@
2519 <field name="sequence_id" ref="account.sequence_check_journal"/>
2520 <field name="default_debit_account_id" ref="account.cash"/>
2521 <field name="default_credit_account_id" ref="account.cash"/>
2522- <field name="analytic_journal_id" ref="account.sit"/>
2523+ <field name="analytic_journal_id" ref="analytic.sit"/>
2524 <field name="user_id" ref="base.user_root"/>
2525 <field name="company_id" ref="res_company_oerp_in"/>
2526 </record>
2527@@ -215,7 +215,7 @@
2528 <field name="sequence_id" ref="account.sequence_cash_journal"/>
2529 <field name="default_debit_account_id" ref="account.cash"/>
2530 <field name="default_credit_account_id" ref="account.cash"/>
2531- <field name="analytic_journal_id" ref="account.sit"/>
2532+ <field name="analytic_journal_id" ref="analytic.sit"/>
2533 <field name="user_id" ref="base.user_root"/>
2534 <field name="company_id" ref="res_company_oerp_in"/>
2535 </record>
2536@@ -228,7 +228,7 @@
2537 <field name="sequence_id" ref="account.sequence_sale_journal"/>
2538 <field name="default_credit_account_id" ref="account.a_sale"/>
2539 <field name="default_debit_account_id" ref="account.a_sale"/>
2540- <field name="analytic_journal_id" ref="account.cose_journal_sale"/>
2541+ <field name="analytic_journal_id" ref="analytic.cose_journal_sale"/>
2542 <field name="user_id" ref="base.user_root"/>
2543 <field name="company_id" ref="res_company_oerp_us"/>
2544 </record>
2545@@ -240,7 +240,7 @@
2546 <field name="sequence_id" ref="account.sequence_refund_sales_journal"/>
2547 <field name="default_credit_account_id" ref="account.a_sale"/>
2548 <field name="default_debit_account_id" ref="account.a_sale"/>
2549- <field name="analytic_journal_id" ref="account.cose_journal_sale"/>
2550+ <field name="analytic_journal_id" ref="analytic.cose_journal_sale"/>
2551 <field name="user_id" ref="base.user_root"/>
2552 <field name="company_id" ref="res_company_oerp_us"/>
2553 </record>
2554@@ -276,7 +276,7 @@
2555 <field name="sequence_id" ref="account.sequence_bank_journal"/>
2556 <field name="default_debit_account_id" ref="account.cash"/>
2557 <field name="default_credit_account_id" ref="account.cash"/>
2558- <field name="analytic_journal_id" ref="account.sit"/>
2559+ <field name="analytic_journal_id" ref="analytic.sit"/>
2560 <field name="user_id" ref="base.user_root"/>
2561 <field name="company_id" ref="res_company_oerp_us"/>
2562 </record>
2563@@ -288,7 +288,7 @@
2564 <field name="sequence_id" ref="account.sequence_check_journal"/>
2565 <field name="default_debit_account_id" ref="account.cash"/>
2566 <field name="default_credit_account_id" ref="account.cash"/>
2567- <field name="analytic_journal_id" ref="account.sit"/>
2568+ <field name="analytic_journal_id" ref="analytic.sit"/>
2569 <field name="user_id" ref="base.user_root"/>
2570 <field name="company_id" ref="res_company_oerp_us"/>
2571 </record>
2572@@ -300,7 +300,7 @@
2573 <field name="sequence_id" ref="account.sequence_cash_journal"/>
2574 <field name="default_debit_account_id" ref="account.cash"/>
2575 <field name="default_credit_account_id" ref="account.cash"/>
2576- <field name="analytic_journal_id" ref="account.sit"/>
2577+ <field name="analytic_journal_id" ref="analytic.sit"/>
2578 <field name="user_id" ref="base.user_root"/>
2579 <field name="company_id" ref="res_company_oerp_us"/>
2580 </record>
2581@@ -314,7 +314,7 @@
2582 <field name="sequence_id" ref="account.sequence_sale_journal"/>
2583 <field name="default_credit_account_id" ref="account.a_sale"/>
2584 <field name="default_debit_account_id" ref="account.a_sale"/>
2585- <field name="analytic_journal_id" ref="account.cose_journal_sale"/>
2586+ <field name="analytic_journal_id" ref="analytic.cose_journal_sale"/>
2587 <field name="user_id" ref="base.user_root"/>
2588 <field name="company_id" ref="res_company_oerp_be"/>
2589 </record>
2590@@ -326,7 +326,7 @@
2591 <field name="sequence_id" ref="account.sequence_refund_sales_journal"/>
2592 <field name="default_credit_account_id" ref="account.a_sale"/>
2593 <field name="default_debit_account_id" ref="account.a_sale"/>
2594- <field name="analytic_journal_id" ref="account.cose_journal_sale"/>
2595+ <field name="analytic_journal_id" ref="analytic.cose_journal_sale"/>
2596 <field name="user_id" ref="base.user_root"/>
2597 <field name="company_id" ref="res_company_oerp_be"/>
2598 </record>
2599@@ -362,7 +362,7 @@
2600 <field name="sequence_id" ref="account.sequence_bank_journal"/>
2601 <field name="default_debit_account_id" ref="account.cash"/>
2602 <field name="default_credit_account_id" ref="account.cash"/>
2603- <field name="analytic_journal_id" ref="account.sit"/>
2604+ <field name="analytic_journal_id" ref="analytic.sit"/>
2605 <field name="user_id" ref="base.user_root"/>
2606 <field name="company_id" ref="res_company_oerp_be"/>
2607 </record>
2608@@ -374,7 +374,7 @@
2609 <field name="sequence_id" ref="account.sequence_check_journal"/>
2610 <field name="default_debit_account_id" ref="account.cash"/>
2611 <field name="default_credit_account_id" ref="account.cash"/>
2612- <field name="analytic_journal_id" ref="account.sit"/>
2613+ <field name="analytic_journal_id" ref="analytic.sit"/>
2614 <field name="user_id" ref="base.user_root"/>
2615 <field name="company_id" ref="res_company_oerp_be"/>
2616 </record>
2617@@ -386,7 +386,7 @@
2618 <field name="sequence_id" ref="account.sequence_cash_journal"/>
2619 <field name="default_debit_account_id" ref="account.cash"/>
2620 <field name="default_credit_account_id" ref="account.cash"/>
2621- <field name="analytic_journal_id" ref="account.sit"/>
2622+ <field name="analytic_journal_id" ref="analytic.sit"/>
2623 <field name="user_id" ref="base.user_root"/>
2624 <field name="company_id" ref="res_company_oerp_be"/>
2625 </record>
2626
2627=== modified file 'project/project.py'
2628--- project/project.py 2014-05-13 11:18:37 +0000
2629+++ project/project.py 2014-05-16 11:21:01 +0000
2630@@ -166,14 +166,19 @@
2631 def unlink(self, cr, uid, ids, context=None):
2632 alias_ids = []
2633 mail_alias = self.pool.get('mail.alias')
2634+ analytic_account_obj = self.pool.get('account.analytic.account')
2635+ analytic_account = False
2636 for proj in self.browse(cr, uid, ids, context=context):
2637 if proj.tasks:
2638 raise osv.except_osv(_('Invalid Action!'),
2639 _('You cannot delete a project containing tasks. You can either delete all the project\'s tasks and then delete the project or simply deactivate the project.'))
2640 elif proj.alias_id:
2641 alias_ids.append(proj.alias_id.id)
2642+ analytic_account = proj.analytic_account_id
2643 res = super(project, self).unlink(cr, uid, ids, context=context)
2644 mail_alias.unlink(cr, uid, alias_ids, context=context)
2645+ if not analytic_account.line_ids:
2646+ analytic_account_obj.unlink(cr, uid, [analytic_account.id], context=context)
2647 return res
2648
2649 def _get_attached_docs(self, cr, uid, ids, field_name, arg, context):
2650@@ -1225,13 +1230,21 @@
2651 vals_for_project['type'] = account.type
2652 self.project_create(cr, uid, account.id, vals_for_project, context=context)
2653 return super(account_analytic_account, self).write(cr, uid, ids, vals, context=context)
2654+
2655+ def _exist_project_documents(self, project, context=None):
2656+ if project.task_ids:
2657+ return True
2658+ return False
2659
2660- def unlink(self, cr, uid, ids, *args, **kwargs):
2661+ def unlink(self, cr, uid, ids, context=None):
2662 project_obj = self.pool.get('project.project')
2663- analytic_ids = project_obj.search(cr, uid, [('analytic_account_id','in',ids)])
2664- if analytic_ids:
2665- raise osv.except_osv(_('Warning!'), _('Please delete the project linked with this account first.'))
2666- return super(account_analytic_account, self).unlink(cr, uid, ids, *args, **kwargs)
2667+ proj_ids = project_obj.search(cr, uid, [('analytic_account_id', 'in', ids)])
2668+ for project in project_obj.browse(cr, uid, proj_ids, context=context):
2669+ if not self._exist_project_documents(project, context):
2670+ project_obj.unlink(cr, uid, proj_ids, context=context)
2671+ else:
2672+ raise osv.except_osv(_('Warning!'), _('Please delete the project linked with this account first.'))
2673+ return super(account_analytic_account, self).unlink(cr, uid, ids, context=context)
2674
2675 def name_search(self, cr, uid, name, args=None, operator='ilike', context=None, limit=100):
2676 if args is None:
2677
2678=== modified file 'project_issue/project_issue.py'
2679--- project_issue/project_issue.py 2014-05-08 15:25:36 +0000
2680+++ project_issue/project_issue.py 2014-05-16 11:21:01 +0000
2681@@ -516,6 +516,11 @@
2682 res = super(account_analytic_account, self)._trigger_project_creation(cr, uid, vals, context=context)
2683 return res or (vals.get('use_issues') and not 'project_creation_in_progress' in context)
2684
2685+ def _exist_project_documents(self, project, context=None):
2686+ res = super(account_analytic_account, self)._exist_project_documents(project, context)
2687+ if not res and not project.issue_ids:
2688+ return res
2689+ return True
2690
2691 class project_project(osv.Model):
2692 _inherit = 'project.project'
2693
2694=== modified file 'project_issue_sheet/security/ir.model.access.csv'
2695--- project_issue_sheet/security/ir.model.access.csv 2011-12-19 16:54:40 +0000
2696+++ project_issue_sheet/security/ir.model.access.csv 2014-05-16 11:21:01 +0000
2697@@ -4,12 +4,12 @@
2698 access_hr_analytic_timesheet_project_manager,hr_analytic_timesheet manager,hr_timesheet_sheet.model_hr_analytic_timesheet,project.group_project_manager,1,0,0,0
2699 access_hr_timesheet_sheet_sheet_project_manager,hr_timesheet_sheet.sheet manager,hr_timesheet_sheet.model_hr_timesheet_sheet_sheet,project.group_project_manager,1,0,0,0
2700 access_hr_analytic_timesheet_project_manager,account.analytic.line.timesheet.project.manager,account.model_account_analytic_line,project.group_project_manager,1,1,1,1
2701-access_account_analytic_journal_project_manager,account.analytic.journal.project.manager,account.model_account_analytic_journal,project.group_project_manager,1,1,1,1
2702+access_account_analytic_journal_project_manager,account.analytic.journal.project.manager,analytic.model_account_analytic_journal,project.group_project_manager,1,1,1,1
2703 access_account_fiscalyear_project_manager,account.fiscalyear.project.manager,account.model_account_fiscalyear,project.group_project_manager,1,1,1,1
2704 access_hr_timesheet_invoice_factor_project_manager,hr_timesheet_invoice.factor.project.manager,hr_timesheet_invoice.model_hr_timesheet_invoice_factor,project.group_project_manager,1,1,1,1
2705 access_account_invoice_project_manager,account.invoice.project.manager,account.model_account_invoice,project.group_project_manager,1,1,1,1
2706 access_analytic_account_line_project_user,analytic_account_line_timesheet user,analytic.model_account_analytic_line,project.group_project_user,1,1,1,0
2707-access_account_analytic_journal_project_user,account.analytic.journal.project.user,account.model_account_analytic_journal,project.group_project_user,1,1,1,0
2708+access_account_analytic_journal_project_user,account.analytic.journal.project.user,analytic.model_account_analytic_journal,project.group_project_user,1,1,1,0
2709 access_account_fiscalyear_project_user,account.fiscalyear.project.user,account.model_account_fiscalyear,project.group_project_user,1,1,1,0
2710 access_hr_timesheet_invoice_factor_project_user,hr_timesheet_invoice.factor.project.user,hr_timesheet_invoice.model_hr_timesheet_invoice_factor,project.group_project_user,1,1,1,0
2711 access_account_invoice_project_user,account.invoice.project.user,account.model_account_invoice,project.group_project_user,1,1,1,0
2712
2713=== modified file 'project_timesheet/project_timesheet_view.xml'
2714--- project_timesheet/project_timesheet_view.xml 2014-04-15 12:57:15 +0000
2715+++ project_timesheet/project_timesheet_view.xml 2014-05-16 11:21:01 +0000
2716@@ -49,7 +49,7 @@
2717 <record id="view_account_analytic_line_search_account_inherit" model="ir.ui.view">
2718 <field name="name">account.analytic.line.search.account_id</field>
2719 <field name="model">account.analytic.line</field>
2720- <field name="inherit_id" ref="account.view_account_analytic_line_filter"/>
2721+ <field name="inherit_id" ref="analytic.view_account_analytic_line_filter"/>
2722 <field name="arch" type="xml">
2723 <field name="account_id" position="replace">
2724 <field name="account_id" string="Analytic account/project"/>
2725@@ -59,7 +59,7 @@
2726 <record id="view_account_analytic_line_form_inherit_account_id" model="ir.ui.view">
2727 <field name="name">account.analytic.line.form.account_id</field>
2728 <field name="model">account.analytic.line</field>
2729- <field name="inherit_id" ref="account.view_account_analytic_line_form"/>
2730+ <field name="inherit_id" ref="analytic.view_account_analytic_line_form"/>
2731 <field name="arch" type="xml">
2732 <field name="account_id" position="replace">
2733 <field name="account_id" string="Analytic Account/Project" on_change="on_change_account_id(account_id)"/>
2734@@ -69,7 +69,7 @@
2735 <record id="view_account_analytic_line_tree_inherit_account_id" model="ir.ui.view">
2736 <field name="name">account.analytic.line.tree.account_id</field>
2737 <field name="model">account.analytic.line</field>
2738- <field name="inherit_id" ref="account.view_account_analytic_line_tree"/>
2739+ <field name="inherit_id" ref="analytic.view_account_analytic_line_tree"/>
2740 <field name="arch" type="xml">
2741 <field name="account_id" position="replace">
2742 <field name="account_id" string="Analytic account/project" on_change="on_change_account_id(account_id)"/>

Subscribers

People subscribed via source and target branches

to all changes: