diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2026-01-14 03:32:56 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2026-01-14 03:32:56 +0000 |
| commit | d7cafd5a4db30b08dceabf8999a0903b6871368d (patch) | |
| tree | a464c57c47fa80101933faaec0b7458cba605d8a /fixco_custom/models/purchase_order_line.py | |
| parent | 7eb25a9ae2ef304503749f8023b8d2f5e2a2e58f (diff) | |
| parent | c4a4653e4065789a9c1baa97e91709ea52a6131e (diff) | |
Merged in bills_add_item_po (pull request #3)
Bills add item po
Diffstat (limited to 'fixco_custom/models/purchase_order_line.py')
| -rw-r--r-- | fixco_custom/models/purchase_order_line.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fixco_custom/models/purchase_order_line.py b/fixco_custom/models/purchase_order_line.py index 53a5eba..bdd729c 100644 --- a/fixco_custom/models/purchase_order_line.py +++ b/fixco_custom/models/purchase_order_line.py @@ -38,6 +38,13 @@ class PurchaseOrderLine(models.Model): original_price_subtotal = fields.Float(string='Original Subtotal', readonly=True) description = fields.Text(string='Description', readonly=True, copy=False) docstatus_altama = fields.Text(string='Status Altama', readonly=True, copy=False) + bill_remain = fields.Float(string='Bill Remain', readonly=True, copy=False, tracking=True, compute='_compute_bill_remain') + + @api.depends('qty_invoiced', 'product_qty') + def _compute_bill_remain(self): + for line in self: + line.bill_remain = line.product_qty - line.qty_invoiced + @api.constrains('product_id', 'price_unit', 'product_qty') def _store_original_price(self): |
