Merge lp:~vauxoo/addons-vauxoo/account_analytic_for_analytics-dev-yani into lp:~vauxoo/addons-vauxoo/addons-vauxoo-cicsa

Proposed by Yanina Aular (Vauxoo)
Status: Merged
Merged at revision: 1065
Proposed branch: lp:~vauxoo/addons-vauxoo/account_analytic_for_analytics-dev-yani
Merge into: lp:~vauxoo/addons-vauxoo/addons-vauxoo-cicsa
Diff against target: 94 lines (+9/-22)
3 files modified
purchase_requisition_line_plan/__openerp__.py (+1/-2)
purchase_requisition_line_plan/model/purchase_requisition.py (+4/-16)
purchase_requisition_line_plan/view/purchase_requisition_view.xml (+4/-4)
To merge this branch: bzr merge lp:~vauxoo/addons-vauxoo/account_analytic_for_analytics-dev-yani
Reviewer Review Type Date Requested Status
Yanina Aular (Vauxoo) Approve
Review via email: mp+225007@code.launchpad.net

Description of the change

Analytic Distribution name is changed

To post a comment you must log in.
Revision history for this message
Yanina Aular (Vauxoo) (yanina-aular) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'purchase_requisition_line_plan/__openerp__.py'
2--- purchase_requisition_line_plan/__openerp__.py 2014-06-27 13:36:27 +0000
3+++ purchase_requisition_line_plan/__openerp__.py 2014-06-30 13:53:26 +0000
4@@ -36,11 +36,10 @@
5 the account analytic value from the purchase requisition.
6 ''',
7 'depends': [
8- 'account_analytic_plans',
9 'purchase_requisition',
10 'purchase_requisition_line_view',
11+ 'purchase_analytic_plans',
12 'pr_line_related_po_line',
13- 'purchase_analytic_plans',
14 ],
15 'data': [
16 'view/purchase_requisition_view.xml',
17
18=== modified file 'purchase_requisition_line_plan/model/purchase_requisition.py'
19--- purchase_requisition_line_plan/model/purchase_requisition.py 2014-06-13 13:25:35 +0000
20+++ purchase_requisition_line_plan/model/purchase_requisition.py 2014-06-30 13:53:26 +0000
21@@ -28,27 +28,15 @@
22 from openerp.tools.translate import _
23 import openerp.addons.decimal_precision as dp
24 from openerp import tools
25-
26-class purchase_order_line(osv.Model):
27- _inherit = "purchase.order.line"
28-
29- _columns = {
30- 'account_analytic_plan_id': fields.many2one(
31- 'account.analytic.plan.instance', 'Analytic Distribution',
32- help='This field is used to assign the selected'\
33- ' analytic account to the line of the purchase order'),
34-
35- }
36-
37
38 class purchase_requisition_line(osv.Model):
39 _inherit = "purchase.requisition.line"
40
41 _columns = {
42- 'account_analytic_plan_id': fields.many2one(
43+ 'analytics_id': fields.many2one(
44 'account.analytic.plan.instance', 'Analytic Distribution',
45 help='This field is used to assign the selected'\
46- ' analytic account to the line of the purchase order'),
47+ ' analytic distribution to the line of the purchase requisition'),
48 }
49
50 class purchase_requisition(osv.Model):
51@@ -70,6 +58,6 @@
52 pol_ids = pol_obj.search(cr, uid, [('order_id','=',po_id)])
53 for pol_id in pol_ids:
54 pol_brw = pol_obj.browse(cr, uid, pol_id)
55- pol_obj.write(cr, uid, [pol_brw.id], {'account_analytic_plan_id':
56- pol_brw.purchase_requisition_line_id.account_analytic_plan_id.id}, context=context)
57+ pol_obj.write(cr, uid, [pol_brw.id], {'analytics_id':
58+ pol_brw.purchase_requisition_line_id.analytics_id.id}, context=context)
59 return res
60
61=== modified file 'purchase_requisition_line_plan/view/purchase_requisition_view.xml'
62--- purchase_requisition_line_plan/view/purchase_requisition_view.xml 2014-06-13 13:25:35 +0000
63+++ purchase_requisition_line_plan/view/purchase_requisition_view.xml 2014-06-30 13:53:26 +0000
64@@ -7,10 +7,10 @@
65 <field name="inherit_id" ref="purchase_requisition.view_purchase_requisition_form"/>
66 <field name="arch" type="xml">
67 <xpath expr="//field[@name='line_ids']//form//field[@name='product_qty']" position="after">
68- <field name="account_analytic_plan_id"/>
69+ <field name="analytics_id"/>
70 </xpath>
71 <xpath expr="//field[@name='line_ids']//tree//field[@name='product_qty']" position="after">
72- <field name="account_analytic_plan_id"/>
73+ <field name="analytics_id"/>
74 </xpath>
75 </field>
76 </record>
77@@ -21,7 +21,7 @@
78 <field name="inherit_id" ref="purchase_requisition_line_view.view_purchase_requisition_line_form"/>
79 <field name="arch" type="xml">
80 <xpath expr="//field[@name='product_qty']" position="after">
81- <field name="account_analytic_plan_id"/>
82+ <field name="analytics_id"/>
83 </xpath>
84 </field>
85 </record>
86@@ -32,7 +32,7 @@
87 <field name="inherit_id" ref="purchase_requisition_line_view.view_purchase_requisition_line_tree"/>
88 <field name="arch" type="xml">
89 <xpath expr="//field[@name='product_qty']" position="after">
90- <field name="account_analytic_plan_id" groups="purchase.group_analytic_accounting"/>
91+ <field name="analytics_id" groups="purchase.group_analytic_accounting"/>
92 </xpath>
93 </field>
94 </record>

Subscribers

People subscribed via source and target branches

to all changes: