diff options
| author | Raphael Collet <rco@odoo.com> | 2020-04-07 13:51:30 +0000 |
|---|---|---|
| committer | Raphael Collet <rco@odoo.com> | 2020-05-18 09:51:43 +0000 |
| commit | ea3e39506a2b360545ec0cd1d3235e69ad16ea6c (patch) | |
| tree | 9d103c7a40911c988e1a3cbecfd8d6a76a3a9a85 /addons/stock_dropshipping | |
| parent | 2e56191c8b86d05bbce17790de8a4732c0478013 (diff) | |
[IMP] models: use slots for BaseModel
This restricts the attributes of a BaseModel instance to `env`, `_ids`
and `_prefetch_ids`. This way, one can only assign fields on a record;
other assignments are programming errors.
This also reduces the memory footprint of records from 168 to 64 bytes
(-62%), and makes their instanciation faster.
closes odoo/odoo#51075
Related: odoo/enterprise#10529
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Diffstat (limited to 'addons/stock_dropshipping')
| -rw-r--r-- | addons/stock_dropshipping/tests/test_stockvaluation.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/stock_dropshipping/tests/test_stockvaluation.py b/addons/stock_dropshipping/tests/test_stockvaluation.py index 6292cf7b88f..f6988a3b783 100644 --- a/addons/stock_dropshipping/tests/test_stockvaluation.py +++ b/addons/stock_dropshipping/tests/test_stockvaluation.py @@ -183,7 +183,7 @@ class TestStockValuation(StockAccountTestCommon): def test_dropship_fifo_perpetual_continental_ordered(self): self.env.company.anglo_saxon_accounting = False - self.product1.product_tmpl_id.categ_id.proprty_cost_method = 'fifo' + self.product1.product_tmpl_id.categ_id.property_cost_method = 'fifo' self.product1.product_tmpl_id.standard_price = 10 self.product1.product_tmpl_id.categ_id.property_valuation = 'real_time' self.product1.product_tmpl_id.invoice_policy = 'order' |
