diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2024-01-10 11:11:40 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2024-01-10 11:11:40 +0700 |
| commit | 3e557f7009393710e425044c8991d7140b30d0da (patch) | |
| tree | ec69a997cd1147879e5b1a33476dfeb04bfc1fc9 | |
| parent | 5005eebb8fdd82db1e65a1d3de715d8bb5a63b32 (diff) | |
| parent | 25748d7a8d537ffe6a3e905f59f05a4d737499d9 (diff) | |
Merge branch 'production' of bitbucket.org:altafixco/indoteknik-addons into production
| -rwxr-xr-x | indoteknik_custom/models/purchase_order.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index b1dde1d5..910b694d 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -102,15 +102,19 @@ class PurchaseOrder(models.Model): for line in self.order_line: i += 1 current_time = datetime.utcnow() - print(i, len(self.order_line)) + # print(i, len(self.order_line)) price_unit = line.price_unit taxes = line.taxes_id for tax in taxes: tax_include = tax.price_include tax_amt = tax.amount if taxes: - if not tax_include: + if tax_include: price_unit = price_unit + (price_unit * tax_amt / 100) + else: + price_unit = price_unit + (price_unit * 11 / 100) + else: + price_unit = price_unit + (price_unit * 11 / 100) purchase_pricelist = self.env['purchase.pricelist'].search([ ('product_id', '=', line.product_id.id), |
