[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:
Denis Ledoux
2016-06-23 10:52:58 +02:00
parent 7ed73b6d62
commit ff090ab23d
+1 -1
View File
@@ -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