diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2024-10-11 10:52:56 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2024-10-11 10:52:56 +0700 |
| commit | 58892a2e250d317e03ceddfb9517988525fc1f64 (patch) | |
| tree | 5bcb5f0f5956eac604c86d4b592abf4ec38161c7 | |
| parent | 1cdb32893afe7b8360f488f58d46f71745bf7691 (diff) | |
fix bug md vendor
| -rw-r--r-- | indoteknik_custom/models/sale_order_line.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indoteknik_custom/models/sale_order_line.py b/indoteknik_custom/models/sale_order_line.py index 59ac1ad4..5e01067a 100644 --- a/indoteknik_custom/models/sale_order_line.py +++ b/indoteknik_custom/models/sale_order_line.py @@ -251,14 +251,14 @@ class SaleOrderLine(models.Model): # purchase_price = self.env['purchase.pricelist'].search( # query, limit=1, order='count_trx_po desc, count_trx_po_vendor desc') price, taxes, vendor_id = self._get_purchase_price(line.product_id) + line.vendor_md_id = vendor_id line.vendor_id = vendor_id - line.md_vendor_id = vendor_id line.margin_md = line.item_percent_margin line.tax_id = line.order_id.sales_tax_id # price, taxes = line._get_valid_purchase_price(purchase_price) line.purchase_price_md = price line.purchase_price = price - line.purchase_tax_id = taxes + line.purchase_tax_id = taxes attribute_values = line.product_id.product_template_attribute_value_ids.mapped('name') attribute_values_str = ', '.join(attribute_values) if attribute_values else '' |
