summaryrefslogtreecommitdiff
path: root/addons/stock_landed_costs/models/purchase.py
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
committerstephanchrst <stephanchrst@gmail.com>2022-05-10 21:51:50 +0700
commit3751379f1e9a4c215fb6eb898b4ccc67659b9ace (patch)
treea44932296ef4a9b71d5f010906253d8c53727726 /addons/stock_landed_costs/models/purchase.py
parent0a15094050bfde69a06d6eff798e9a8ddf2b8c21 (diff)
initial commit 2
Diffstat (limited to 'addons/stock_landed_costs/models/purchase.py')
-rw-r--r--addons/stock_landed_costs/models/purchase.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/addons/stock_landed_costs/models/purchase.py b/addons/stock_landed_costs/models/purchase.py
new file mode 100644
index 00000000..369dea03
--- /dev/null
+++ b/addons/stock_landed_costs/models/purchase.py
@@ -0,0 +1,9 @@
+from odoo import api,models
+
+class PurchaseOrderLine(models.Model):
+ _inherit = 'purchase.order.line'
+
+ def _prepare_account_move_line(self, move=False):
+ res = super()._prepare_account_move_line(move)
+ res.update({'is_landed_costs_line': self.product_id.landed_cost_ok})
+ return res