[T-3579] [IMP] Add invoiced_minus_received to search view

Merged Facundo Barral requested to merge T-3579 into 15.0-stage
Compare and
2 files
+ 15
3
Preferences
File browser
Compare changes
@@ -21,7 +21,7 @@ class PurchaseOrderLine(models.Model):
deliveries_ids = fields.Char(compute="_get_associated_deliveries")
invoiced_minus_received = fields.Float(
compute="_compute_invoiced_minus_received", string="QFact.-QRecv."
compute="_compute_invoiced_minus_received", string="QFact.-QRecv.", store=True
)
name = fields.Text(string="Description", required=True)
@@ -36,6 +36,7 @@ class PurchaseOrderLine(models.Model):
self.price_unit = 0 # Set price_unit to 0 on new purchase order line
return
@api.depends("qty_invoiced", "qty_received")
def _compute_invoiced_minus_received(self):
for rec in self:
rec.invoiced_minus_received = rec.qty_invoiced - rec.qty_received