Merge lp:~matjaz-6/openerpsl/openerpsl_01_25 into lp:openerpsl/7.0

Proposed by Matjaz Kalic
Status: Merged
Merged at revision: 306
Proposed branch: lp:~matjaz-6/openerpsl/openerpsl_01_25
Merge into: lp:openerpsl/7.0
Diff against target: 25 lines (+8/-5)
1 file modified
m_web_api/m_web.py (+8/-5)
To merge this branch: bzr merge lp:~matjaz-6/openerpsl/openerpsl_01_25
Reviewer Review Type Date Requested Status
Mentis Pending
Review via email: mp+203247@code.launchpad.net

Description of the change

[FIX] m_web_api/m_web.py (if sale_line_id == False)

To post a comment you must log in.
306. By Dušan Laznik (Mentis)

[FIX] m_web_api/m_web.py (if sale_line_id == False)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'm_web_api/m_web.py'
--- m_web_api/m_web.py 2014-01-26 16:55:10 +0000
+++ m_web_api/m_web.py 2014-01-26 18:08:54 +0000
@@ -185,13 +185,16 @@
185 if 'sale_line_id' not in vals:185 if 'sale_line_id' not in vals:
186 vals['basket_status'] = 2186 vals['basket_status'] = 2
187 else:187 else:
188 sale_line = self.pool.get('sale.order.line').browse(cr, user, [vals['sale_line_id']])[0]188 if vals['sale_line_id']:
189 if sale_line.order_id.shop_id.shop_production:189 sale_line = self.pool.get('sale.order.line').browse(cr, user, [vals['sale_line_id']])[0]
190 vals['basket_status'] = 3190 if sale_line.order_id.shop_id.shop_production:
191 vals['product_qty_returned'] = sale_line.product_qty_returned191 vals['basket_status'] = 3
192 vals['product_qty_returned'] = sale_line.product_qty_returned
193 else:
194 vals['basket_status'] = 2
195 vals['basket_deliverd'] = sale_line.product_uom_qty
192 else:196 else:
193 vals['basket_status'] = 2197 vals['basket_status'] = 2
194 vals['basket_deliverd'] = sale_line.product_uom_qty
195 198
196 res = super(stock_move_basket, self).create(cr, user, vals, context=context)199 res = super(stock_move_basket, self).create(cr, user, vals, context=context)
197 return res200 return res

Subscribers

People subscribed via source and target branches