diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2024-11-14 11:16:07 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2024-11-14 11:16:07 +0700 |
| commit | 3f5eec5331b216911d911c230ea64538588b65c0 (patch) | |
| tree | 7b5e60b7dcfbb120849c731de7630b7c0242648d /indoteknik_custom/models | |
| parent | f6df2ccfde5b45d018c8d7b11203429b5f39ebfc (diff) | |
add free bu
Diffstat (limited to 'indoteknik_custom/models')
| -rw-r--r-- | indoteknik_custom/models/sale_order_line.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/indoteknik_custom/models/sale_order_line.py b/indoteknik_custom/models/sale_order_line.py index f4469117..04fafa69 100644 --- a/indoteknik_custom/models/sale_order_line.py +++ b/indoteknik_custom/models/sale_order_line.py @@ -37,6 +37,11 @@ class SaleOrderLine(models.Model): weight = fields.Float(string='Weight') md_vendor_id = fields.Many2one('res.partner', string='MD Vendor', readonly=True) margin_md = fields.Float(string='Margin MD') + qty_free_bu = fields.Float(string='Free BU', compute='_get_qty_free_bandengan') + + def _get_qty_free_bandengan(self): + for line in self: + line.qty_free_bu = line.product_id.qty_free_bandengan @api.constrains('note_procurement') def note_procurement_to_apo(self): |
