diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2023-06-28 12:17:53 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2023-06-28 12:17:53 +0700 |
| commit | 4501a0a17ae56ca822827a7aa500ce269391ee78 (patch) | |
| tree | b184b0b071c1d458387393ed871b8add717ec5c5 | |
| parent | ecf9d25de623c5cef7f051b650c065c054a08a14 (diff) | |
bug fix
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index a15a2572..3b3ce13a 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -476,17 +476,17 @@ class SaleOrderLine(models.Model): def compute_vendor_subtotal(self): # self.vendor_subtotal = 1 for line in self: - if line.purchase_price: - product = line.product_id + if line.purchase_price > 0: + # product = line.product_id - if product: - vendor_price = line.purchase_price - if line.purchase_tax_id.price_include: - vendor_price = line.purchase_price - else: - vendor_price = line.purchase_price + (line.purchase_price*11/100) + # if product: + # vendor_price = line.purchase_price + # if line.purchase_tax_id.price_include: + # vendor_price = line.purchase_price + # else: + # vendor_price = line.purchase_price + (line.purchase_price*11/100) - line.vendor_subtotal = vendor_price * line.product_uom_qty + line.vendor_subtotal = line.purchase_price * line.product_uom_qty def compute_item_margin(self): for line in self: |
