[FIX] stock: quant_package unpack
When you unpack a quant package, you have to invalidate the reservation on the move lines reserved on this package and then remove the quants from it. We need to do it as sudo because, no one has rights on quants.
This commit is contained in:
@@ -386,7 +386,7 @@ class QuantPackage(models.Model):
|
||||
('product_qty', '!=', 0),
|
||||
])
|
||||
move_line_to_modify.write({'package_id': False})
|
||||
package.mapped('quant_ids').write({'package_id': False})
|
||||
package.mapped('quant_ids').sudo().write({'package_id': False})
|
||||
|
||||
def action_view_picking(self):
|
||||
action = self.env.ref('stock.action_picking_tree_all').read()[0]
|
||||
|
||||
Reference in New Issue
Block a user