diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2026-01-02 10:53:32 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2026-01-02 10:53:32 +0700 |
| commit | b821d978d026c1e1f28438eae5af059924e49270 (patch) | |
| tree | 66f305930e126bf0fe3d1b50898cd343f6941b7d /fixco_custom/models | |
| parent | d2ec851d598466fa37c5cd8acad942a98913b9e9 (diff) | |
| parent | 20a17a725aa9f3ff3d94c9405042f924101a3d13 (diff) | |
Merge branch 'main' of bitbucket.org:altafixco/fixco-addons
pull
Diffstat (limited to 'fixco_custom/models')
| -rw-r--r-- | fixco_custom/models/purchase_order.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fixco_custom/models/purchase_order.py b/fixco_custom/models/purchase_order.py index cf8945e..f2a6c3e 100644 --- a/fixco_custom/models/purchase_order.py +++ b/fixco_custom/models/purchase_order.py @@ -55,6 +55,7 @@ class PurchaseOrder(models.Model): soo_price = fields.Float('SOO Price', copy=False) soo_discount = fields.Float('SOO Discount', copy=False) soo_tax = fields.Float('SOO Tax', copy=False) + discount_total = fields.Float('Discount Total', help = 'Total Discount for Each Product') def _get_fixco_token(self, source='auto'): ICP = self.env['ir.config_parameter'].sudo() @@ -422,12 +423,12 @@ class PurchaseOrder(models.Model): 'domain': [('id', 'in', journals.ids)], } - @api.depends('order_line.price_total', 'biaya_lain_lain') + @api.depends('order_line.price_total', 'biaya_lain_lain', 'discount_total') def _amount_all(self): super(PurchaseOrder, self)._amount_all() for order in self: - amount_total = order.amount_untaxed + order.amount_tax - order.biaya_lain_lain + amount_total = order.amount_untaxed + order.amount_tax + order.biaya_lain_lain - order.discount_total order.amount_total = order.currency_id.round(amount_total) @api.depends('order_line.discount_amount') |
