summaryrefslogtreecommitdiff
path: root/addons/account/models
diff options
context:
space:
mode:
authorRaphael Collet <rco@odoo.com>2020-04-07 13:51:30 +0000
committerRaphael Collet <rco@odoo.com>2020-05-18 09:51:43 +0000
commitea3e39506a2b360545ec0cd1d3235e69ad16ea6c (patch)
tree9d103c7a40911c988e1a3cbecfd8d6a76a3a9a85 /addons/account/models
parent2e56191c8b86d05bbce17790de8a4732c0478013 (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/account/models')
-rw-r--r--addons/account/models/account_bank_statement.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/account/models/account_bank_statement.py b/addons/account/models/account_bank_statement.py
index 461b40b33e8..7607712215e 100644
--- a/addons/account/models/account_bank_statement.py
+++ b/addons/account/models/account_bank_statement.py
@@ -1252,7 +1252,7 @@ class AccountBankStatementLine(models.Model):
# Update the payment date to match the current bank statement line's date.
if counterpart_line.payment_id:
- counterpart_line.payment_id.payment_date = self.date
+ counterpart_line.payment_id.date = self.date
# -------------------------------------------------------------------------
# BUSINESS METHODS