stock.picking unlink() regression due to context update
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
High
|
gpa(OpenERP) |
Bug Description
In stock module, stock.picking unlink() function has been changed in revision 2529 introducing a regression if context is not specified. The following diff fixes the problem.
Also note that I created a new context called "ctx" instead of using "context" itself. Modifying the original context is not a good idea because it may have undesired consequences very difficult to track.
def unlink(self, cr, uid, ids, context=None):
+ if context is None:
+ context = {}
for pick in self.browse(cr, uid, ids, context=context):
if pick.state in ['done','cancel']:
elif pick.state in ['confirmed'
- context.
- self.pool.
+ ctx = context.copy()
+ ctx['call_unlink'] = True
+ self.pool.
else:
return super(stock_
Related branches
Changed in openobject-addons: | |
assignee: | nobody → gpa(Open ERP) (gpa-openerp) |
Changed in openobject-addons: | |
importance: | Undecided → High |
It has been fixed by revision 2642 <email address hidden>.
Thanks.