summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/purchase_order_line.py
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/models/purchase_order_line.py')
-rwxr-xr-xindoteknik_custom/models/purchase_order_line.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/indoteknik_custom/models/purchase_order_line.py b/indoteknik_custom/models/purchase_order_line.py
index 1b5bba3a..450d3430 100755
--- a/indoteknik_custom/models/purchase_order_line.py
+++ b/indoteknik_custom/models/purchase_order_line.py
@@ -30,15 +30,15 @@ class PurchaseOrderLine(models.Model):
suggest = fields.Char(string='Suggest')
price_vendor = fields.Float(string='Price Vendor', compute='compute_price_vendor')
-
def compute_price_vendor(self):
for line in self:
purchase_pricelist = self.env['purchase.pricelist'].search([
('product_id', '=', line.product_id.id),
- ('vendor_id', '=', line.partner_id.id)
+ ('vendor_id', '=', line.order_id.partner_id.id)
], limit=1)
- price_vendor = purchase_pricelist.product_price
+ price_vendor = format(purchase_pricelist.product_price, ".2f")
+ price_vendor = float(price_vendor)
line.price_vendor = price_vendor
def compute_qty_stock(self):