sale line price update

This commit is contained in:
raman 2025-11-06 10:03:12 +05:30
parent 74c29ffc45
commit 005bfe16c5
1 changed files with 2 additions and 0 deletions

View File

@ -97,5 +97,7 @@ class SaleOrderLine(models.Model):
@api.depends('product_id', 'product_uom', 'product_uom_qty') @api.depends('product_id', 'product_uom', 'product_uom_qty')
def _compute_price_unit(self): def _compute_price_unit(self):
for line in self: for line in self:
if line.order_id and line.order_id.state == 'sale':
continue
line.price_unit = 0.0 line.price_unit = 0.0