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
=== modified file 'sale/sale.py'
--- sale/sale.py 2014-03-25 10:32:26 +0000
+++ sale/sale.py 2014-04-29 10:03:45 +0000
@@ -56,7 +56,7 @@
56 },56 },
57 }57 }
5858
59 def onchange_shop_id(self, cr, uid, ids, shop_id, context=None):59 def onchange_shop_id(self, cr, uid, ids, shop_id, partner_id=None, context=None):
60 v = {}60 v = {}
61 if shop_id:61 if shop_id:
62 shop = self.pool.get('sale.shop').browse(cr, uid, shop_id, context=context)62 shop = self.pool.get('sale.shop').browse(cr, uid, shop_id, context=context)
@@ -64,6 +64,9 @@
64 v['project_id'] = shop.project_id.id64 v['project_id'] = shop.project_id.id
65 if shop.pricelist_id.id:65 if shop.pricelist_id.id:
66 v['pricelist_id'] = shop.pricelist_id.id66 v['pricelist_id'] = shop.pricelist_id.id
67 if partner_id:
68 partner=self.pool.get('res.partner').browse(cr, uid,partner_id, context=context)
69 v['pricelist_id'] = partner.property_product_pricelist and partner.property_product_pricelist.id or False
67 return {'value': v}70 return {'value': v}
6871
69 def copy(self, cr, uid, id, default=None, context=None):72 def copy(self, cr, uid, id, default=None, context=None):
7073
=== modified file 'sale/sale_view.xml'
--- sale/sale_view.xml 2014-04-22 15:07:10 +0000
+++ sale/sale_view.xml 2014-04-29 10:03:45 +0000
@@ -160,7 +160,7 @@
160 </group>160 </group>
161 <group>161 <group>
162 <field name="date_order"/>162 <field name="date_order"/>
163 <field name="shop_id" groups="base.group_no_one" on_change="onchange_shop_id(shop_id, context)" widget="selection"/>163 <field name="shop_id" groups="base.group_no_one" on_change="onchange_shop_id(shop_id, partner_id,context)" widget="selection"/>
164 <field name="client_order_ref"/>164 <field name="client_order_ref"/>
165 <field domain="[('type','=','sale')]" name="pricelist_id" groups="product.group_sale_pricelist" on_change="onchange_pricelist_id(pricelist_id,order_line)"/>165 <field domain="[('type','=','sale')]" name="pricelist_id" groups="product.group_sale_pricelist" on_change="onchange_pricelist_id(pricelist_id,order_line)"/>
166 <field name="currency_id" invisible="1"/>166 <field name="currency_id" invisible="1"/>
167167
=== modified file 'sale_analytic_plans/sale_analytic_plans.py'
--- sale_analytic_plans/sale_analytic_plans.py 2014-03-10 08:54:20 +0000
+++ sale_analytic_plans/sale_analytic_plans.py 2014-04-29 10:03:45 +0000
@@ -42,9 +42,9 @@
42class sale_order(osv.osv):42class sale_order(osv.osv):
43 _inherit = "sale.order"43 _inherit = "sale.order"
4444
45 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 anymore46 # 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)47 res = super(sale_order, self).onchange_shop_id(cr, uid, ids, shop_id, partner_id, context=context)
48 if res.get('value',{}).get('project_id'):48 if res.get('value',{}).get('project_id'):
49 del(res['value']['project_id'])49 del(res['value']['project_id'])
50 return res50 return res
5151
=== modified file 'sale_stock/sale_stock_view.xml'
--- sale_stock/sale_stock_view.xml 2014-03-10 08:54:20 +0000
+++ sale_stock/sale_stock_view.xml 2014-04-29 10:03:45 +0000
@@ -49,7 +49,7 @@
49 <attribute name="statusbar_colors">{"shipping_except":"red","invoice_except":"red","waiting_date":"blue"}</attribute>49 <attribute name="statusbar_colors">{"shipping_except":"red","invoice_except":"red","waiting_date":"blue"}</attribute>
50 </field>50 </field>
51 <field name="shop_id" position="replace">51 <field name="shop_id" position="replace">
52 <field name="shop_id" on_change="onchange_shop_id(shop_id)" widget="selection" groups="stock.group_locations"/>52 <field name="shop_id" on_change="onchange_shop_id(shop_id, partner_id)" widget="selection" groups="stock.group_locations"/>
53 </field>53 </field>
54 <field name="product_id" position="replace">54 <field name="product_id" position="replace">
55 <field name="product_id"55 <field name="product_id"