[FIX] delivery: order delivery line creation with inventory users
When processing the delivery order coming from a sale order, the delivery line must be created as sudo, as the user processing the picking could not have the access rights to create the extra line on the sale order (e.g. for users being inventory users but not sales users). opw-677628
This commit is contained in:
@@ -94,7 +94,7 @@ class SaleOrder(models.Model):
|
||||
}
|
||||
if self.order_line:
|
||||
values['sequence'] = self.order_line[-1].sequence + 1
|
||||
sol = SaleOrderLine.create(values)
|
||||
sol = SaleOrderLine.sudo().create(values)
|
||||
return sol
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user