diff options
| author | Martin Trigaux <mat@odoo.com> | 2020-05-19 10:29:16 +0200 |
|---|---|---|
| committer | Martin Trigaux <mat@odoo.com> | 2020-05-26 15:50:11 +0200 |
| commit | 6db2a81ea2578615ccc17199dfc488745b2fc596 (patch) | |
| tree | 0e0d8fc185987117922285f360b0728c5ae2cb95 /addons/stock_landed_costs | |
| parent | 2f26eee981e6857fc0d9aeebe53ec85939bebfb2 (diff) | |
[IMP] *: use specific ir.property methods
Do not make direct CRUD to ir.property records, use appropriate
methods for that
Diffstat (limited to 'addons/stock_landed_costs')
| -rw-r--r-- | addons/stock_landed_costs/models/stock_landed_cost.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/addons/stock_landed_costs/models/stock_landed_cost.py b/addons/stock_landed_costs/models/stock_landed_cost.py index 66f5a6e9a45..63222bc1385 100644 --- a/addons/stock_landed_costs/models/stock_landed_cost.py +++ b/addons/stock_landed_costs/models/stock_landed_cost.py @@ -28,12 +28,7 @@ class StockLandedCost(models.Model): if self.env.company.lc_journal_id: lc_journal = self.env.company.lc_journal_id else: - ir_property = self.env['ir.property'].search([ - ('name', '=', 'property_stock_journal'), - ('company_id', '=', self.env.company.id) - ], limit=1) - if ir_property: - lc_journal = ir_property.get_by_record() + lc_journal = self.env['ir.property']._get("property_stock_journal", "product.category") return lc_journal name = fields.Char( |
