Skip to content

Commit

Permalink
[IMP] purchase_sale_container_deposit_inter_company allow_update_lock…
Browse files Browse the repository at this point in the history
…ed_sales
  • Loading branch information
santostelmo committed Sep 23, 2024
1 parent 565b007 commit c013dde
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,13 @@ def write(self, vals):
if self.env.context.get("update_order_container_deposit_quantity", False):
self = self.with_context(allow_update_locked_sales=True)
return super().write(vals)


class PurchaseOrderLine(models.Model):
_inherit = "purchase.order.line"

def write(self, vals):
# Allow update of locked sales while updating container deposit quantity
if self.env.context.get("update_order_container_deposit_quantity", False):
self = self.with_context(allow_update_locked_sales=True)
return super().write(vals)

0 comments on commit c013dde

Please sign in to comment.