diff options
| -rwxr-xr-x | indoteknik_custom/models/purchase_order.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index 5e4617d4..59d5ac3e 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -56,6 +56,14 @@ class PurchaseOrder(models.Model): def add_product_to_pricelist(self): for line in self.order_line: current_time = datetime.utcnow() + 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: + price_unit = price_unit + (price_unit * tax_amt / 100) purchase_pricelist = self.env['purchase.pricelist'].search([ ('product_id', '=', line.product_id.id), |
