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/point_of_sale/tests | |
| 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/point_of_sale/tests')
| -rw-r--r-- | addons/point_of_sale/tests/test_anglo_saxon.py | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/addons/point_of_sale/tests/test_anglo_saxon.py b/addons/point_of_sale/tests/test_anglo_saxon.py index d6cf96843ea..aed16559189 100644 --- a/addons/point_of_sale/tests/test_anglo_saxon.py +++ b/addons/point_of_sale/tests/test_anglo_saxon.py @@ -51,7 +51,6 @@ class TestAngloSaxonCommon(common.TransactionCase): self.cash_journal = self.env['account.journal'].create({'name': 'CASH journal', 'type': 'cash', 'code': 'CSH00'}) self.sale_journal = self.env['account.journal'].create({'name': 'SALE journal', 'type': 'sale', 'code': 'INV00'}) self.pos_config.invoice_journal_id = self.sale_journal - self.pos_config.journal_ids = [self.cash_journal.id] self.cash_payment_method = self.env['pos.payment.method'].create({ 'name': 'Cash Test', 'is_cash_count': True, |
