summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/sale_order_line.py
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-09-30 15:24:37 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-09-30 15:24:37 +0700
commitcb81068b8b695eaf8de5c0ba6b0951bae436626e (patch)
treefd4ce5250bc2e56e91e4ce394365438854909b42 /indoteknik_custom/models/sale_order_line.py
parent90a29846ae6008b3152d495f2e83a5d00cfdd438 (diff)
parent3b83868fbdb29e8f5208035e5166a13e5d24f382 (diff)
Merge branch 'production' into iman/switch-account
Diffstat (limited to 'indoteknik_custom/models/sale_order_line.py')
-rw-r--r--indoteknik_custom/models/sale_order_line.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/indoteknik_custom/models/sale_order_line.py b/indoteknik_custom/models/sale_order_line.py
index 50438dbe..0ea6a2cc 100644
--- a/indoteknik_custom/models/sale_order_line.py
+++ b/indoteknik_custom/models/sale_order_line.py
@@ -31,6 +31,7 @@ class SaleOrderLine(models.Model):
qty_reserved = fields.Float(string='Qty Reserved', compute='_compute_qty_reserved')
reserved_from = fields.Char(string='Reserved From', copy=False)
item_percent_margin_without_deduction = fields.Float('%Margin', compute='_compute_item_margin_without_deduction')
+ weight = fields.Float(string='Weight')
@api.constrains('note_procurement')
def note_procurement_to_apo(self):
@@ -244,6 +245,7 @@ class SaleOrderLine(models.Model):
# 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_id = vendor_id
+ line.weight = line.product_id.weight
line.tax_id = line.order_id.sales_tax_id
# price, taxes = line._get_valid_purchase_price(purchase_price)
line.purchase_price = price