Merge lp:~credativ/ocb-addons/7.0-ocb-lp1164572 into lp:ocb-addons

Proposed by Craig Gowing (credativ)
Status: Rejected
Rejected by: Holger Brunn (Therp)
Proposed branch: lp:~credativ/ocb-addons/7.0-ocb-lp1164572
Merge into: lp:ocb-addons
Diff against target: 64 lines (+8/-5)
4 files modified
sale/sale.py (+4/-1)
sale/sale_view.xml (+1/-1)
sale_analytic_plans/sale_analytic_plans.py (+2/-2)
sale_stock/sale_stock_view.xml (+1/-1)
To merge this branch: bzr merge lp:~credativ/ocb-addons/7.0-ocb-lp1164572
Reviewer Review Type Date Requested Status
Holger Brunn (Therp) Disapprove
Review via email: mp+217564@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Holger Brunn (Therp) (hbrunn) wrote :

Development for 7.0 has moved to github on https://github.com/OCA/ocb - please move your merge proposal there if it is still valid.

(I close and reject this in order to have a cleaner overview for 6.1 MPs which indeed have to be done on launchpad)

review: Disapprove

Unmerged revisions

10152. By Craig Gowing (credativ)

[FIX] Sale order Pricelist Flow corrected (<email address hidden>)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sale/sale.py'
2--- sale/sale.py 2014-03-25 10:32:26 +0000
3+++ sale/sale.py 2014-04-29 10:03:45 +0000
4@@ -56,7 +56,7 @@
5 },
6 }
7
8- def onchange_shop_id(self, cr, uid, ids, shop_id, context=None):
9+ def onchange_shop_id(self, cr, uid, ids, shop_id, partner_id=None, context=None):
10 v = {}
11 if shop_id:
12 shop = self.pool.get('sale.shop').browse(cr, uid, shop_id, context=context)
13@@ -64,6 +64,9 @@
14 v['project_id'] = shop.project_id.id
15 if shop.pricelist_id.id:
16 v['pricelist_id'] = shop.pricelist_id.id
17+ if partner_id:
18+ partner=self.pool.get('res.partner').browse(cr, uid,partner_id, context=context)
19+ v['pricelist_id'] = partner.property_product_pricelist and partner.property_product_pricelist.id or False
20 return {'value': v}
21
22 def copy(self, cr, uid, id, default=None, context=None):
23
24=== modified file 'sale/sale_view.xml'
25--- sale/sale_view.xml 2014-04-22 15:07:10 +0000
26+++ sale/sale_view.xml 2014-04-29 10:03:45 +0000
27@@ -160,7 +160,7 @@
28 </group>
29 <group>
30 <field name="date_order"/>
31- <field name="shop_id" groups="base.group_no_one" on_change="onchange_shop_id(shop_id, context)" widget="selection"/>
32+ <field name="shop_id" groups="base.group_no_one" on_change="onchange_shop_id(shop_id, partner_id,context)" widget="selection"/>
33 <field name="client_order_ref"/>
34 <field domain="[('type','=','sale')]" name="pricelist_id" groups="product.group_sale_pricelist" on_change="onchange_pricelist_id(pricelist_id,order_line)"/>
35 <field name="currency_id" invisible="1"/>
36
37=== modified file 'sale_analytic_plans/sale_analytic_plans.py'
38--- sale_analytic_plans/sale_analytic_plans.py 2014-03-10 08:54:20 +0000
39+++ sale_analytic_plans/sale_analytic_plans.py 2014-04-29 10:03:45 +0000
40@@ -42,9 +42,9 @@
41 class sale_order(osv.osv):
42 _inherit = "sale.order"
43
44- def onchange_shop_id(self, cr, uid, ids, shop_id, context=None):
45+ def onchange_shop_id(self, cr, uid, ids, shop_id, partner_id=None, context=None):
46 # Remove the project_id from the result of super() call, if any, as this field is not in the view anymore
47- res = super(sale_order, self).onchange_shop_id(cr, uid, ids, shop_id, context=context)
48+ res = super(sale_order, self).onchange_shop_id(cr, uid, ids, shop_id, partner_id, context=context)
49 if res.get('value',{}).get('project_id'):
50 del(res['value']['project_id'])
51 return res
52
53=== modified file 'sale_stock/sale_stock_view.xml'
54--- sale_stock/sale_stock_view.xml 2014-03-10 08:54:20 +0000
55+++ sale_stock/sale_stock_view.xml 2014-04-29 10:03:45 +0000
56@@ -49,7 +49,7 @@
57 <attribute name="statusbar_colors">{"shipping_except":"red","invoice_except":"red","waiting_date":"blue"}</attribute>
58 </field>
59 <field name="shop_id" position="replace">
60- <field name="shop_id" on_change="onchange_shop_id(shop_id)" widget="selection" groups="stock.group_locations"/>
61+ <field name="shop_id" on_change="onchange_shop_id(shop_id, partner_id)" widget="selection" groups="stock.group_locations"/>
62 </field>
63 <field name="product_id" position="replace">
64 <field name="product_id"