Merge lp:~savoirfairelinux-openerp/openerp-construction/7.0-fix-1193292 into lp:openerp-construction

Status: Merged
Merged at revision: 12
Proposed branch: lp:~savoirfairelinux-openerp/openerp-construction/7.0-fix-1193292
Merge into: lp:openerp-construction
Diff against target: 330 lines (+58/-125)
7 files modified
sale_insulation/__openerp__.py (+2/-2)
sale_insulation/sale_insulation.py (+3/-10)
sale_insulation/sale_insulation_view.xml (+50/-106)
stock_picking_delivery_insulation/__openerp__.py (+1/-1)
stock_picking_delivery_insulation/stock_picking_delivery_insulation_view.xml (+0/-1)
stock_picking_delivery_users/__openerp__.py (+1/-1)
stock_picking_delivery_users/stock_picking_delivery_users_view.xml (+1/-4)
To merge this branch: bzr merge lp:~savoirfairelinux-openerp/openerp-construction/7.0-fix-1193292
Reviewer Review Type Date Requested Status
Maxime Chambreuil (http://www.savoirfairelinux.com) Approve
Joao Alfredo Gama Batista code review. no test Approve
Review via email: mp+176074@code.launchpad.net

Description of the change

[FIX] lp:1193292
[IMP] by Vishal Jadav <email address hidden>

To post a comment you must log in.
15. By Maxime Chambreuil (http://www.savoirfairelinux.com)

[FIX] Remaining conflict of the merge

Revision history for this message
Joao Alfredo Gama Batista (joao-gama) wrote :

lgtm.

review: Approve (code review. no test)
Revision history for this message
Maxime Chambreuil (http://www.savoirfairelinux.com) (max3903) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sale_insulation/__openerp__.py'
2--- sale_insulation/__openerp__.py 2012-06-20 22:01:03 +0000
3+++ sale_insulation/__openerp__.py 2013-07-21 19:20:32 +0000
4@@ -21,7 +21,7 @@
5
6 {
7 "name" : "Sale Insulation",
8- "version" : "0.1",
9+ "version" : "1.0",
10 "author" : "Savoir-faire Linux",
11 "website" : "http://www.savoirfairelinux.com",
12 "license" : "AGPL-3",
13@@ -31,7 +31,7 @@
14 for insulation products.
15 """,
16 "depends" : [
17- "sale",
18+ "sale_stock",
19 "product_insulation",
20 "procurement_insulation",
21 "stock_picking_delivery_insulation",
22
23=== modified file 'sale_insulation/sale_insulation.py'
24--- sale_insulation/sale_insulation.py 2012-07-31 19:50:48 +0000
25+++ sale_insulation/sale_insulation.py 2013-07-21 19:20:32 +0000
26@@ -26,7 +26,6 @@
27 from tools.translate import _
28
29 class sale_order(osv.osv):
30- _name = 'sale.order'
31 _inherit = 'sale.order'
32
33 def _amount_line_tax(self, cr, uid, line, context=None):
34@@ -65,12 +64,10 @@
35 res['surface'] = line.surface
36 return res
37
38-
39 sale_order()
40
41
42 class sale_order_line(osv.osv):
43- _name = 'sale.order.line'
44 _inherit = 'sale.order.line'
45
46 def _amount_line(self, cr, uid, ids, field_name, arg, context=None):
47@@ -123,7 +120,7 @@
48 }
49
50 def create(self, cr, uid, vals, context=None):
51- if vals['product_sprayfoam']:
52+ if 'product_sprayfoam' in vals:
53 try:
54 vals.update({
55 'product_uos_qty': vals['surface'] * vals['rvalue'] / vals['product_rvalue']
56@@ -131,7 +128,7 @@
57 except ZeroDivisionError:
58 pass
59 else:
60- if vals['product_insulation']:
61+ if 'product_insulation' in vals:
62 vals.update({
63 'surface': vals['product_uos_qty']
64 })
65@@ -218,8 +215,6 @@
66 uos = False
67 else:
68 uos = False
69- if product_obj.description_sale:
70- result['notes'] = product_obj.description_sale
71 fpos = fiscal_position and self.pool.get('account.fiscal.position').browse(cr, uid, fiscal_position) or False
72 if update_tax: #The quantity only have changed
73 result['delay'] = (product_obj.sale_delay or 0.0)
74@@ -324,8 +319,7 @@
75 if line.product_uos:
76 return line.product_uos_qty or 0.0
77 return line.product_uom_qty
78- else:
79- return self.pool.get('procurement.order').quantity_get(cr, uid,
80+ return self.pool.get('procurement.order').quantity_get(cr, uid,
81 line.procurement_id.id, context=context)
82
83 def _get_line_uom(line):
84@@ -373,7 +367,6 @@
85 'uos_id': uos_id,
86 'product_id': line.product_id.id or False,
87 'invoice_line_tax_id': [(6, 0, [x.id for x in line.tax_id])],
88- 'note': line.notes,
89 'account_analytic_id': line.order_id.project_id and line.order_id.project_id.id or False,
90 'rvalue': line.rvalue,
91 'surface': line.surface,
92
93=== modified file 'sale_insulation/sale_insulation_view.xml'
94--- sale_insulation/sale_insulation_view.xml 2012-06-20 22:01:03 +0000
95+++ sale_insulation/sale_insulation_view.xml 2013-07-21 19:20:32 +0000
96@@ -1,111 +1,55 @@
97 <?xml version="1.0" encoding="utf-8"?>
98 <openerp>
99 <data>
100- <record id="view_sale_order_insulation" model="ir.ui.view">
101- <field name="name">sale.order.form.insulation</field>
102- <field name="model">sale.order</field>
103- <field name="inherit_id" ref="sale.view_order_form"/>
104- <field name="type">form</field>
105- <field name="arch" type="xml">
106- <data>
107-
108- <xpath
109- expr="//field[@name='order_line']/tree[@string='Sales Order Lines']"
110- position="replace">
111- <tree string="Sales Order Lines">
112- <field colspan="4" name="name"/>
113- <field name="surface"/>
114- <field name="rvalue"/>
115- <field groups="product.group_uos" name="product_uos_qty" string="Qty(UoS)"/>
116- <field groups="product.group_uos" name="product_uos" string="UoS"/>
117- <field name="price_unit"/>
118- <field name="product_uom_qty" string="Qty(UoM)"/>
119- <field name="product_uom" string="UoM"/>
120- <field name="price_subtotal"/>
121- </tree>
122- </xpath>
123-
124- <xpath
125- expr="//field[@name='order_line']/form/notebook/page/group/field[@name='product_uos_qty']"
126- position="replace">
127- </xpath>
128-
129- <xpath
130- expr="//field[@name='order_line']/form/notebook/page/group/field[@name='product_uos']"
131- position="replace">
132- </xpath>
133-
134- <xpath
135- expr="//field[@name='order_line']/form/notebook/page/group/field[@name='product_uom_qty']"
136- position="replace">
137- </xpath>
138-
139- <xpath
140- expr="//field[@name='order_line']/form/notebook/page/group/field[@name='product_uom']"
141- position="replace">
142- </xpath>
143-
144- <xpath
145- expr="//field[@name='order_line']/form/notebook/page/group/field[@name='name']"
146- position="after">
147- <field name="product_rvalue" invisible="True"/>
148- <field name="product_insulation" invisible="True"/>
149- <field name="product_sprayfoam" invisible="True" />
150- <field name="surface" on_change="surface_or_rvalue_change(surface, rvalue, product_rvalue, product_id, context)" attrs="{'invisible':[('product_sprayfoam', '=', False)]}"/>
151- <newline/>
152- <field name="rvalue" on_change="surface_or_rvalue_change(surface, rvalue, product_rvalue, product_id, context)" attrs="{'invisible':[('product_insulation', '=', False)]} "/>
153- <newline/>
154- <field groups="product.group_uos" name="product_uos_qty" attrs="{'readonly':[('product_sprayfoam', '==', True)]}" on_change="uos_change(product_uos, product_uos_qty, product_id)"/>
155- <field groups="product.group_uos" name="product_uos" nolabel="1" on_change="uos_change(product_uos, product_uos_qty, product_id)"/>
156- <newline/>
157- <field name="product_uom_qty"
158- context="{'partner_id':parent.partner_id, 'quantity':product_uom_qty, 'pricelist':parent.pricelist_id, 'shop':parent.shop_id, 'uom':product_uom}"
159- on_change="product_id_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, False, parent.date_order, product_packaging, parent.fiscal_position, True, context)"
160- attrs="{'invisible':[('product_insulation','=',True)]}"/>
161- <field name="product_uom"
162- on_change="product_uom_change(parent.pricelist_id,product_id,product_uom_qty,product_uom,product_uos_qty,product_uos,name,parent.partner_id, False, False, parent.date_order, context)"
163- nolabel="1"
164- attrs="{'invisible':[('product_insulation','=',True)]}"/>
165- <newline/>
166- </xpath>
167-
168- <xpath
169- expr="//field[@name='order_line']/form/notebook/page/group/field[@name='discount']"
170- position="replace">
171- <field name="discount" invisible="True"/>
172- </xpath>
173-
174- <xpath
175- expr="//field[@name='order_line']/form/notebook/page/group/field[@name='product_packaging']"
176- position="replace">
177- <field name="product_packaging" invisible="True"/>
178- </xpath>
179-
180- <xpath
181- expr="//button[@string='Print Quotation']"
182- position="replace">
183- <button
184- name="%(report_sale_order_quotation)d"
185- string="Print Quotation"
186- type="action"
187- icon="gtk-print"
188- states="draft"/>
189- </xpath>
190- <xpath
191- expr="//button[@string='Print Order']"
192- position="replace">
193- <button
194- name="%(report_sale_order_quotation)d"
195- string="Print Order"
196- type="action"
197- icon="gtk-print"
198- states="waiting_date,manual,progress,done,shipping_except,invoice_except"/>
199- </xpath>
200-
201-
202-
203- </data>
204- </field>
205- </record>
206+
207+ <record id="view_sale_order_insulation" model="ir.ui.view">
208+ <field name="name">sale.order.form.insulation</field>
209+ <field name="model">sale.order</field>
210+ <field name="inherit_id" ref="sale.view_order_form"/>
211+ <field name="arch" type="xml">
212+ <data>
213+
214+ <xpath
215+ expr="//field[@name='order_line']/tree[@string='Sales Order Lines']/field[@name='product_uos_qty']"
216+ position="before">
217+ <field name="surface"/>
218+ <field name="rvalue"/>
219+ </xpath>
220+
221+ <field name="product_uos_qty" position="replace">
222+ <field groups="product.group_uos" name="product_uos_qty" attrs="{'readonly':[('product_sprayfoam', '==', True)]}" on_change="uos_change(product_uos, product_uos_qty, product_id)"/>
223+ </field>
224+
225+ <field name="product_uos" position="replace">
226+ <field groups="product.group_uos" name="product_uos" nolabel="1" on_change="uos_change(product_uos, product_uos_qty, product_id)"/>
227+ </field>
228+
229+ <xpath
230+ expr="//field[@name='order_line']/form/group/group/field[@name='product_id']"
231+ position="after">
232+ <field name="product_rvalue" invisible="True"/>
233+ <field name="product_insulation" invisible="True"/>
234+ <field name="product_sprayfoam" invisible="True" />
235+ <label for="surface" attrs="{'invisible':[('product_insulation', '=', False)]}"/>
236+ <div>
237+ <field name="surface" on_change="surface_or_rvalue_change(surface, rvalue, product_rvalue, product_id, context)" attrs="{'invisible':[('product_sprayfoam', '=', False)]}" class="oe_inline"/>
238+ </div>
239+ <label for="rvalue" attrs="{'invisible':[('product_insulation', '=', False)]}"/>
240+ <div>
241+ <field name="rvalue" on_change="surface_or_rvalue_change(surface, rvalue, product_rvalue, product_id, context)" attrs="{'invisible':[('product_insulation', '=', False)]}" class="oe_inline"/>
242+ </div>
243+ </xpath>
244+
245+ <xpath
246+ expr="//form/header/button[@string='Print']"
247+ position="attributes">
248+ <attribute name="name">%(report_sale_order_quotation)d</attribute>
249+ <attribute name="type">action</attribute>
250+ </xpath>
251+
252+ </data>
253+ </field>
254+ </record>
255+
256 </data>
257 </openerp>
258
259=== modified file 'stock_picking_delivery_insulation/__openerp__.py'
260--- stock_picking_delivery_insulation/__openerp__.py 2012-07-31 19:54:06 +0000
261+++ stock_picking_delivery_insulation/__openerp__.py 2013-07-21 19:20:32 +0000
262@@ -21,7 +21,7 @@
263
264 {
265 "name" : "Stock Picking Delivery Order Insulation",
266- "version" : "0.1",
267+ "version" : "1.0",
268 "author" : "Savoir-faire Linux",
269 "website" : "http://www.savoirfairelinux.com",
270 "license" : "AGPL-3",
271
272=== modified file 'stock_picking_delivery_insulation/stock_picking_delivery_insulation_view.xml'
273--- stock_picking_delivery_insulation/stock_picking_delivery_insulation_view.xml 2012-06-20 22:01:03 +0000
274+++ stock_picking_delivery_insulation/stock_picking_delivery_insulation_view.xml 2013-07-21 19:20:32 +0000
275@@ -6,7 +6,6 @@
276 <field name="name">stock.picking.delivery.insulation.form</field>
277 <field name="model">stock.picking</field>
278 <field name="inherit_id" ref="stock.view_picking_out_form"/>
279- <field name="type">form</field>
280 <field name="arch" type="xml">
281 <data>
282
283
284=== modified file 'stock_picking_delivery_users/__openerp__.py'
285--- stock_picking_delivery_users/__openerp__.py 2012-07-31 19:51:47 +0000
286+++ stock_picking_delivery_users/__openerp__.py 2013-07-21 19:20:32 +0000
287@@ -21,7 +21,7 @@
288
289 {
290 "name" : "Stock Picking Delivery Users",
291- "version" : "0.1",
292+ "version" : "1.0",
293 "author" : "Savoir-faire Linux",
294 "website" : "http://www.savoirfairelinux.com",
295 "license" : "AGPL-3",
296
297=== modified file 'stock_picking_delivery_users/stock_picking_delivery_users_view.xml'
298--- stock_picking_delivery_users/stock_picking_delivery_users_view.xml 2012-07-31 19:51:47 +0000
299+++ stock_picking_delivery_users/stock_picking_delivery_users_view.xml 2013-07-21 19:20:32 +0000
300@@ -6,7 +6,6 @@
301 <field name="name">stock.picking.delivery.form</field>
302 <field name="model">stock.picking</field>
303 <field name="inherit_id" ref="stock.view_picking_out_form"/>
304- <field name="type">form</field>
305 <field name="arch" type="xml">
306 <data>
307
308@@ -28,7 +27,6 @@
309 <field name="name">stock.picking.delivery.tree</field>
310 <field name="model">stock.picking</field>
311 <field name="inherit_id" ref="stock.view_picking_out_tree"/>
312- <field name="type">tree</field>
313 <field name="arch" type="xml">
314 <field name="state" position="before">
315 <field name="user_id"/>
316@@ -40,13 +38,12 @@
317 <field name="name">stock.picking.delivery.calendar</field>
318 <field name="model">stock.picking</field>
319 <field name="inherit_id" ref="stock.stock_picking_calendar"/>
320- <field name="type">calendar</field>
321 <field name="arch" type="xml">
322 <data>
323 <xpath expr="//calendar[@string='Calendar View']" position="replace">
324 <calendar string="Calendar View" date_start="min_date" date_stop="max_date" color="user_id">
325 <field name="origin"/>
326- <field name="address_id"/>
327+ <field name="partner_id"/>
328 </calendar>
329 </xpath>
330 </data>

Subscribers

People subscribed via source and target branches