Merge lp:~openerp-commiter/openobject-addons/trunk-addons-aag into lp:openobject-addons

Proposed by Atik Agewan(OpenERP)
Status: Rejected
Rejected by: Rucha (Open ERP)
Proposed branch: lp:~openerp-commiter/openobject-addons/trunk-addons-aag
Merge into: lp:openobject-addons
Diff against target: 513 lines (+95/-74)
16 files modified
mrp/mrp.py (+20/-2)
mrp_operations/mrp_operations.py (+8/-2)
procurement/procurement_view.xml (+3/-2)
product/pricelist.py (+4/-4)
product/product.py (+3/-3)
product/report/pricelist.py (+1/-1)
product_margin/product_margin_view.xml (+3/-0)
project_mrp/project_procurement.py (+1/-1)
purchase/purchase.py (+8/-5)
purchase/purchase_view.xml (+6/-6)
stock/stock.py (+15/-13)
stock/wizard/stock_invoice_onshipping.py (+2/-2)
stock/wizard/stock_location_product.py (+1/-1)
stock/wizard/stock_move.py (+0/-28)
stock/wizard/stock_partial_picking.py (+19/-3)
stock/wizard/stock_return_picking.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-commiter/openobject-addons/trunk-addons-aag
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+48776@code.launchpad.net

Description of the change

changes in Read method of osv meme wiz

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mrp/mrp.py'
2--- mrp/mrp.py 2011-02-14 11:45:07 +0000
3+++ mrp/mrp.py 2011-02-16 05:24:17 +0000
4@@ -240,11 +240,29 @@
5 return False
6 level -= 1
7 return True
8+
9+ def _check_product(self, cr, uid, ids, context=None):
10+ all_prod = []
11+ bom_obj = self.pool.get('mrp.bom')
12+ boms = self.browse(cr, uid, ids, context=context)
13+ def check_bom(boms):
14+ res = True
15+ for bom in boms:
16+ if bom.product_id.id in all_prod:
17+ res = res and False
18+ all_prod.append(bom.product_id.id)
19+ lines = bom.bom_lines
20+ if lines:
21+ newboms = [a for a in lines if a not in boms]
22+ res = res and check_bom(newboms)
23+ return res
24+ return check_bom(boms)
25+
26 _constraints = [
27- (_check_recursion, 'Error ! You can not create recursive BoM.', ['parent_id'])
28+ (_check_recursion, 'Error ! You can not create recursive BoM.', ['parent_id']),
29+ (_check_product, 'BoM line product should not be same as BoM product.', ['product_id']),
30 ]
31
32-
33 def onchange_product_id(self, cr, uid, ids, product_id, name, context=None):
34 """ Changes UoM and name if product_id changes.
35 @param name: Name of the field
36
37=== modified file 'mrp_operations/mrp_operations.py'
38--- mrp_operations/mrp_operations.py 2011-01-14 00:11:01 +0000
39+++ mrp_operations/mrp_operations.py 2011-02-16 05:24:17 +0000
40@@ -119,11 +119,12 @@
41 @return: Nothing
42 """
43 wf_service = netsvc.LocalService("workflow")
44+ prod_obj_pool = self.pool.get('mrp.production')
45 oper_obj = self.browse(cr, uid, ids)[0]
46 prod_obj = oper_obj.production_id
47 if action == 'start':
48 if prod_obj.state =='confirmed':
49- self.pool.get('mrp.production').force_production(cr, uid, [prod_obj.id])
50+ prod_obj_pool.force_production(cr, uid, [prod_obj.id])
51 wf_service.trg_validate(uid, 'mrp.production', prod_obj.id, 'button_produce', cr)
52 elif prod_obj.state =='ready':
53 wf_service.trg_validate(uid, 'mrp.production', prod_obj.id, 'button_produce', cr)
54@@ -139,6 +140,9 @@
55 if line.state != 'done':
56 flag = False
57 if flag:
58+ for production in prod_obj_pool.browse(cr, uid, [prod_obj.id], context= None):
59+ if production.move_lines or production.move_created_ids:
60+ prod_obj_pool.action_produce(cr,uid, production.id, production.product_qty, 'consume_produce', context = None)
61 wf_service.trg_validate(uid, 'mrp.production', oper_obj.production_id.id, 'button_produce_done', cr)
62 return
63
64@@ -244,10 +248,12 @@
65 wf_service.trg_validate(uid, 'mrp.production.workcenter.line', workcenter_line.id, 'button_start_working', cr)
66 return super(mrp_production,self).action_in_production(cr, uid, ids)
67
68- def action_cancel(self, cr, uid, ids):
69+ def action_cancel(self, cr, uid, ids, context=None):
70 """ Cancels work order if production order is canceled.
71 @return: Super method
72 """
73+ if context is None:
74+ context = {}
75 obj = self.browse(cr, uid, ids)[0]
76 wf_service = netsvc.LocalService("workflow")
77 for workcenter_line in obj.workcenter_lines:
78
79=== modified file 'procurement/procurement_view.xml'
80--- procurement/procurement_view.xml 2011-01-17 13:55:22 +0000
81+++ procurement/procurement_view.xml 2011-02-16 05:24:17 +0000
82@@ -28,6 +28,7 @@
83 <field name="name">procurement.order.tree.board</field>
84 <field name="model">procurement.order</field>
85 <field name="type">tree</field>
86+ <field eval="20" name="priority"/>
87 <field name="arch" type="xml">
88 <tree string="Procurement Lines" colors="red:date_planned&lt;current_date and state in ('exception');black:state=='running';darkgreen:state=='confirmed';gray:state in ['done','cancel'];blue:state in ('ready')">
89 <field name="date_planned" widget="date"/>
90@@ -246,8 +247,8 @@
91 <act_window
92 context="{'search_default_warehouse_id': active_id}"
93 id="act_stock_warehouse_2_stock_warehouse_orderpoint"
94- name="Minimum Stock Rules"
95- res_model="stock.warehouse.orderpoint"
96+ name="Minimum Stock Rules"
97+ res_model="stock.warehouse.orderpoint"
98 src_model="stock.warehouse"
99 groups="stock.group_stock_user"/>
100
101
102=== modified file 'product/pricelist.py'
103--- product/pricelist.py 2011-01-17 08:00:48 +0000
104+++ product/pricelist.py 2011-02-16 05:24:17 +0000
105@@ -262,9 +262,9 @@
106 price = currency_obj.compute(cr, uid,
107 price_type.currency_id.id, res['currency_id'],
108 product_obj.price_get(cr, uid, [product_id],
109- price_type.field)[product_id], round=False, context=context)
110+ price_type.field, context=context)[product_id], round=False, context=context)
111
112- if price:
113+ if price >= 0.0:
114 price_limit = price
115
116 price = price * (1.0+(res['price_discount'] or 0.0))
117@@ -385,7 +385,7 @@
118 else:
119 price_tmp = self.price_get(cr, uid,
120 [res['base_pricelist_id']], prod_id,
121- qty)[res['base_pricelist_id']]
122+ qty, context=context)[res['base_pricelist_id']]
123 ptype_src = self.browse(cr, uid,
124 res['base_pricelist_id']).currency_id.id
125 price = currency_obj.compute(cr, uid, ptype_src,
126@@ -413,7 +413,7 @@
127 price = currency_obj.compute(cr, uid,
128 price_type.currency_id.id, res['currency_id'],
129 product_obj.price_get(cr, uid, [prod_id],
130- price_type.field)[prod_id], round=False, context=context)
131+ price_type.field, context=context)[prod_id], round=False, context=context)
132
133 if price:
134 price_limit = price
135
136=== modified file 'product/product.py'
137--- product/product.py 2011-02-01 12:34:28 +0000
138+++ product/product.py 2011-02-16 05:24:17 +0000
139@@ -139,7 +139,7 @@
140 context = {}
141 if from_unit.category_id.id <> to_unit.category_id.id:
142 if context.get('raise-exception', True):
143- raise osv.except_osv(_('Error !'), _('Conversion from Product UoM m to Default UoM PCE is not possible as they both belong to different Category!.'))
144+ raise osv.except_osv(_('Error !'), _('Conversion from Product UoM %s to Default UoM %s is not possible as they both belong to different Category!.') % (from_unit.name,to_unit.name,))
145 else:
146 return qty
147 amount = qty / from_unit.factor
148@@ -766,12 +766,12 @@
149 currency_id = self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.currency_id.id
150 for supplier in partner_pool.browse(cr, uid, supplier_ids, context=context):
151 # Compute price from standard price of product
152- price = product_pool.price_get(cr, uid, [product_id], 'standard_price')[product_id]
153+ price = product_pool.price_get(cr, uid, [product_id], 'standard_price', context=context)[product_id]
154
155 # Compute price from Purchase pricelist of supplier
156 pricelist_id = supplier.property_product_pricelist_purchase.id
157 if pricelist_id:
158- price = pricelist_pool.price_get(cr, uid, [pricelist_id], product_id, product_qty).setdefault(pricelist_id, 0)
159+ price = pricelist_pool.price_get(cr, uid, [pricelist_id], product_id, product_qty, context=context).setdefault(pricelist_id, 0)
160 price = currency_pool.compute(cr, uid, pricelist_pool.browse(cr, uid, pricelist_id).currency_id.id, currency_id, price)
161
162 # Compute price from supplier pricelist which are in Supplier Information
163
164=== modified file 'product/report/pricelist.py'
165--- product/report/pricelist.py 2011-01-14 00:11:01 +0000
166+++ product/report/pricelist.py 2011-02-16 05:24:17 +0000
167@@ -90,7 +90,7 @@
168 pro.append('<pro name="%s" >' % (x['name']))
169 temp = []
170 for q in qty:
171- price_dict = pool.get('product.pricelist').price_get(cr, uid, [price_list_id], x['id'], q)
172+ price_dict = pool.get('product.pricelist').price_get(cr, uid, [price_list_id], x['id'], q, context=context)
173 if price_dict[price_list_id]:
174 price = price_dict[price_list_id]
175 else:
176
177=== modified file 'product_margin/product_margin_view.xml'
178--- product_margin/product_margin_view.xml 2011-01-14 00:11:01 +0000
179+++ product_margin/product_margin_view.xml 2011-02-16 05:24:17 +0000
180@@ -80,6 +80,9 @@
181 <field name="expected_margin"/>
182 <field name="total_margin_rate" widget="progressbar"/>
183 <field name="expected_margin_rate" widget="progressbar"/>
184+ <field name="categ_id" invisible="1"/>
185+ <field name="uom_id" invisible="1"/>
186+ <field name="type" invisible="1"/>
187 </tree>
188 </field>
189 </record>
190
191=== modified file 'project_mrp/project_procurement.py'
192--- project_mrp/project_procurement.py 2011-01-14 00:11:01 +0000
193+++ project_mrp/project_procurement.py 2011-02-16 05:24:17 +0000
194@@ -37,7 +37,7 @@
195 self.write(cr, uid, [procurement.id], {'state': 'running'})
196 planned_hours = procurement.product_qty
197 task_id = self.pool.get('project.task').create(cr, uid, {
198- 'name': '%s:%s' % (procurement.origin or '', procurement.name),
199+ 'name': '%s:%s' % (procurement.origin or '', procurement.product_id.name),
200 'date_deadline': procurement.date_planned,
201 'planned_hours':planned_hours,
202 'remaining_hours': planned_hours,
203
204=== modified file 'purchase/purchase.py'
205--- purchase/purchase.py 2011-02-14 11:45:07 +0000
206+++ purchase/purchase.py 2011-02-16 05:24:17 +0000
207@@ -170,7 +170,7 @@
208 'partner_id':fields.many2one('res.partner', 'Supplier', required=True, states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]}, change_default=True),
209 'partner_address_id':fields.many2one('res.partner.address', 'Address', required=True,
210 states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]},domain="[('partner_id', '=', partner_id)]"),
211- 'dest_address_id':fields.many2one('res.partner.address', 'Destination Address',
212+ 'dest_address_id':fields.many2one('res.partner.address', 'Destination Address', domain="[('partner_id', '!=', False)]",
213 states={'confirmed':[('readonly',True)], 'approved':[('readonly',True)],'done':[('readonly',True)]},
214 help="Put an address if you want to deliver directly from the supplier to the customer." \
215 "In this case, it will remove the warehouse link and set the customer location."
216@@ -665,7 +665,6 @@
217 'notes': notes or'', 'product_uom' : uom or False}, 'domain':{'product_uom':[]}}
218 res = {}
219 prod= self.pool.get('product.product').browse(cr, uid, product)
220-
221 product_uom_pool = self.pool.get('product.uom')
222 lang=False
223 if partner_id:
224@@ -681,6 +680,11 @@
225 date_order = time.strftime('%Y-%m-%d')
226 qty = qty or 1.0
227 seller_delay = 0
228+ if uom:
229+ uom1_cat = prod.uom_id.category_id.id
230+ uom2_cat = product_uom_pool.browse(cr, uid, uom).category_id.id
231+ if uom1_cat != uom2_cat:
232+ uom = False
233
234 prod_name = self.pool.get('product.product').name_get(cr, uid, [prod.id], context=context)[0][1]
235 res = {}
236@@ -707,14 +711,13 @@
237 'taxes_id':map(lambda x: x.id, prod.supplier_taxes_id),
238 'date_planned': date_planned or dt,'notes': notes or prod.description_purchase,
239 'product_qty': qty,
240- 'product_uom': uom}})
241+ 'product_uom': prod.uom_id.id}})
242 domain = {}
243
244 taxes = self.pool.get('account.tax').browse(cr, uid,map(lambda x: x.id, prod.supplier_taxes_id))
245 fpos = fiscal_position and self.pool.get('account.fiscal.position').browse(cr, uid, fiscal_position) or False
246 res['value']['taxes_id'] = self.pool.get('account.fiscal.position').map_tax(cr, uid, fpos, taxes)
247-
248- res2 = self.pool.get('product.uom').read(cr, uid, [uom], ['category_id'])
249+ res2 = self.pool.get('product.uom').read(cr, uid, [prod.uom_id.id], ['category_id'])
250 res3 = prod.uom_id.category_id.id
251 domain = {'product_uom':[('category_id','=',res2[0]['category_id'][0])]}
252 if res2[0]['category_id'][0] != res3:
253
254=== modified file 'purchase/purchase_view.xml'
255--- purchase/purchase_view.xml 2011-01-18 13:33:35 +0000
256+++ purchase/purchase_view.xml 2011-02-16 05:24:17 +0000
257@@ -12,7 +12,7 @@
258 groups="group_purchase_manager"
259 parent="base.menu_purchase_root" sequence="100"/>
260
261- <menuitem
262+ <menuitem
263 id="menu_purchase_config_pricelist" name="Pricelists"
264 parent="menu_purchase_config_purchase" sequence="50"/>
265
266@@ -29,22 +29,22 @@
267 parent="menu_purchase_config_pricelist" sequence="2"
268 groups="base.group_extended"/>
269
270- <menuitem
271+ <menuitem
272 id="menu_product_in_config_purchase" name="Product"
273 parent="menu_purchase_config_purchase" sequence="30"/>
274
275 <menuitem
276 action="product.product_category_action_form" id="menu_product_category_config_purchase"
277 parent="purchase.menu_product_in_config_purchase" sequence="10"/>
278-
279- <menuitem
280+
281+ <menuitem
282 id="menu_purchase_unit_measure_purchase" name="Units of Measure"
283 parent="purchase.menu_product_in_config_purchase" sequence="20"/>
284
285 <menuitem
286 action="product.product_uom_categ_form_action" id="menu_purchase_uom_categ_form_action"
287 parent="menu_purchase_unit_measure_purchase" sequence="30"/>
288-
289+
290 <menuitem
291 action="product.product_uom_form_action" id="menu_purchase_uom_form_action"
292 parent="menu_purchase_unit_measure_purchase" sequence="30"/>
293@@ -216,7 +216,7 @@
294 <field name="date_approve"/>
295 <separator string="Invoices" colspan="4"/>
296 <newline/>
297- <field name="invoice_ids" groups="base.group_extended" nolabel="1" colspan="4"/>
298+ <field name="invoice_ids" groups="base.group_extended" nolabel="1" colspan="4" context="{'type':'in_invoice'}"/>
299 </page>
300 <page string="Notes">
301 <field colspan="4" name="notes" nolabel="1"/>
302
303=== modified file 'stock/stock.py'
304--- stock/stock.py 2011-01-24 16:13:46 +0000
305+++ stock/stock.py 2011-02-16 05:24:17 +0000
306@@ -1166,8 +1166,7 @@
307 for move in pick.move_lines:
308 if move.state in ('done', 'cancel'):
309 continue
310- partial_data = partial_datas.get('move%s'%(move.id), False)
311- assert partial_data, _('Missing partial picking data for move #%s') % (move.id)
312+ partial_data = partial_datas.get('move%s'%(move.id), {})
313 product_qty = partial_data.get('product_qty',0.0)
314 move_product_qty[move.id] = product_qty
315 product_uom = partial_data.get('product_uom',False)
316@@ -1248,9 +1247,9 @@
317
318 if new_picking:
319 move_obj.write(cr, uid, [c.id for c in complete], {'picking_id': new_picking})
320- for move in complete:
321- if prodlot_ids.get(move.id):
322- move_obj.write(cr, uid, move.id, {'prodlot_id': prodlot_ids[move.id]})
323+ for move in complete:
324+ if prodlot_ids.get(move.id):
325+ move_obj.write(cr, uid, move.id, {'prodlot_id': prodlot_ids[move.id]})
326 for move in too_many:
327 product_qty = move_product_qty[move.id]
328 defaults = {
329@@ -1463,7 +1462,7 @@
330 _description = "Stock Move"
331 _order = 'date_expected desc, id'
332 _log_create = False
333-
334+
335 def action_partial_move(self, cr, uid, ids, context=None):
336 if context is None: context = {}
337 partial_id = self.pool.get("stock.partial.move").create(
338@@ -1481,7 +1480,7 @@
339 'domain': '[]',
340 'context': context
341 }
342-
343+
344
345 def name_get(self, cr, uid, ids, context=None):
346 res = []
347@@ -1855,11 +1854,6 @@
348 """
349 moves = self.browse(cr, uid, ids, context=context)
350 self.write(cr, uid, ids, {'state': 'confirmed'})
351- res_obj = self.pool.get('res.company')
352- location_obj = self.pool.get('stock.location')
353- move_obj = self.pool.get('stock.move')
354- wf_service = netsvc.LocalService("workflow")
355-
356 self.create_chained_picking(cr, uid, moves, context)
357 return []
358
359@@ -1886,6 +1880,14 @@
360 @return: True
361 """
362 self.write(cr, uid, ids, {'state': 'confirmed'})
363+
364+ # fix for bug lp:707031
365+ # called write of related picking because changing move availability does
366+ # not trigger workflow of picking in order to change the state of picking
367+ wf_service = netsvc.LocalService('workflow')
368+ for move in self.browse(cr, uid, ids, context):
369+ if move.picking_id:
370+ wf_service.trg_write(uid, 'stock.picking', move.picking_id.id, cr)
371 return True
372
373 #
374@@ -2135,7 +2137,7 @@
375 prodlot_id = partial_datas and partial_datas.get('move%s_prodlot_id' % (move.id), False)
376 if prodlot_id:
377 self.write(cr, uid, [move.id], {'prodlot_id': prodlot_id}, context=context)
378- if move.state not in ('confirmed','done'):
379+ if move.state not in ('confirmed','done','assigned'):
380 self.action_confirm(cr, uid, move_ids, context=context)
381
382 self.write(cr, uid, move_ids, {'state': 'done', 'date_planned': time.strftime('%Y-%m-%d %H:%M:%S')}, context=context)
383
384=== modified file 'stock/wizard/stock_invoice_onshipping.py'
385--- stock/wizard/stock_invoice_onshipping.py 2011-01-17 08:00:48 +0000
386+++ stock/wizard/stock_invoice_onshipping.py 2011-02-16 05:24:17 +0000
387@@ -115,7 +115,7 @@
388 if context is None:
389 context = {}
390 picking_pool = self.pool.get('stock.picking')
391- onshipdata_obj = self.read(cr, uid, ids, ['journal_id', 'group', 'invoice_date'])
392+ onshipdata_obj = self.read(cr, uid, ids, ['journal_id', 'group', 'invoice_date'], context=context)
393 if context.get('new_picking', False):
394 onshipdata_obj['id'] = onshipdata_obj.new_picking
395 onshipdata_obj[ids] = onshipdata_obj.new_picking
396@@ -127,7 +127,7 @@
397 res = picking_pool.action_invoice_create(cr, uid, active_ids,
398 journal_id = onshipdata_obj[0]['journal_id'],
399 group = onshipdata_obj[0]['group'],
400- type = None,
401+ type = context.get('inv_type'),
402 context=context)
403 return res
404
405
406=== modified file 'stock/wizard/stock_location_product.py'
407--- stock/wizard/stock_location_product.py 2011-01-14 00:11:01 +0000
408+++ stock/wizard/stock_location_product.py 2011-02-16 05:24:17 +0000
409@@ -39,7 +39,7 @@
410 @return: Invoice type
411 """
412 mod_obj = self.pool.get('ir.model.data')
413- for location_obj in self.read(cr, uid, ids, ['from_date', 'to_date']):
414+ for location_obj in self.read(cr, uid, ids, ['from_date', 'to_date'], context=context):
415 return {
416 'name': False,
417 'view_type': 'form',
418
419=== modified file 'stock/wizard/stock_move.py'
420--- stock/wizard/stock_move.py 2011-01-14 00:11:01 +0000
421+++ stock/wizard/stock_move.py 2011-02-16 05:24:17 +0000
422@@ -21,34 +21,6 @@
423
424 from osv import fields, osv
425
426-class stock_move_track(osv.osv_memory):
427- _name = "stock.move.track"
428- _description = "Track moves"
429-
430- _columns = {
431- 'tracking_prefix': fields.char('Tracking prefix', size=64),
432- 'quantity': fields.float("Quantity per lot")
433- }
434-
435- _defaults = {
436- 'quantity': lambda *x: 1
437- }
438-
439- def track_lines(self, cr, uid, ids, context=None):
440- """ To track stock moves lines
441- @param self: The object pointer.
442- @param cr: A database cursor
443- @param uid: ID of the user currently logged in
444- @param ids: An ID or list of IDs if we want more than one
445- @param context: A standard dictionary
446- @return:
447- """
448- datas = self.read(cr, uid, ids)[0]
449- move_obj = self.pool.get('stock.move')
450- move_obj._track_lines(cr, uid, context['active_id'], datas, context=context)
451- return {'type': 'ir.actions.act_window_close'}
452-
453-stock_move_track()
454
455 class stock_move_consume(osv.osv_memory):
456 _name = "stock.move.consume"
457
458=== modified file 'stock/wizard/stock_partial_picking.py'
459--- stock/wizard/stock_partial_picking.py 2011-01-27 10:53:33 +0000
460+++ stock/wizard/stock_partial_picking.py 2011-02-16 05:24:17 +0000
461@@ -67,8 +67,9 @@
462 for m in pick.move_lines:
463 if m.state in ('done', 'cancel'):
464 continue
465- result.append(self.__create_partial_picking_memory(m, pick_type))
466-
467+ move_memory = self.__create_partial_picking_memory(m, pick_type)
468+ if move_memory:
469+ result.append(move_memory)
470 if 'product_moves_in' in fields:
471 res.update({'product_moves_in': result})
472 if 'product_moves_out' in fields:
473@@ -124,12 +125,27 @@
474 'prodlot_id' : picking.prodlot_id.id,
475 'move_id' : picking.id,
476 }
477-
478+
479 if pick_type == 'in':
480 move_memory.update({
481 'cost' : picking.product_id.standard_price,
482 'currency' : picking.product_id.company_id and picking.product_id.company_id.currency_id and picking.product_id.company_id.currency_id.id or False,
483 })
484+
485+ if pick_type == 'out':
486+ type = picking.picking_id.move_type
487+ qty_avl = picking.product_id.qty_available
488+ if type == 'direct' :
489+ if qty_avl <= 0.0 and picking.state != 'assigned':
490+ move_memory = {}
491+ if picking.product_qty > qty_avl and qty_avl > 0.0:
492+ move_memory.update({
493+ 'quantity' : qty_avl,
494+ })
495+ if picking.state == 'assigned':
496+ move_memory.update({
497+ 'quantity' : picking.product_qty,
498+ })
499 return move_memory
500
501 def do_partial(self, cr, uid, ids, context=None):
502
503=== modified file 'stock/wizard/stock_return_picking.py'
504--- stock/wizard/stock_return_picking.py 2011-01-18 13:41:41 +0000
505+++ stock/wizard/stock_return_picking.py 2011-02-16 05:24:17 +0000
506@@ -151,7 +151,7 @@
507 wf_service = netsvc.LocalService("workflow")
508
509 pick = pick_obj.browse(cr, uid, record_id, context=context)
510- data = self.read(cr, uid, ids[0])
511+ data = self.read(cr, uid, ids[0], context=context)
512 new_picking = None
513 date_cur = time.strftime('%Y-%m-%d %H:%M:%S')
514

Subscribers

People subscribed via source and target branches

to all changes: