From 79416ba6c4afa3cacdd1d820c277fe066a7a286a Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Thu, 20 Dec 2018 12:26:10 +0000 Subject: [IMP] api: gain some memory by not creating the cache_key tuple multiple times --- odoo/fields.py | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'odoo/fields.py') diff --git a/odoo/fields.py b/odoo/fields.py index 7561d6551a0..326b3dc15a3 100644 --- a/odoo/fields.py +++ b/odoo/fields.py @@ -748,16 +748,6 @@ class Field(MetaField('DummyField', (object,), {})): # Conversion of values # - def cache_key(self, record): - """ Return the key to get/set the value of ``self`` on ``record`` in - cache, the full cache key being ``(self, record.id, key)``. - """ - env = record.env - # IMPORTANT: odoo.api.Cache.get_records() depends on the fact that the - # result does not depend on record.id. If you ever make the following - # dependent on record.id, don't forget to fix the other method! - return env if self.context_dependent else (env.cr, env.uid) - def null(self, record): """ Return the null value for this field in the record format. """ return False -- cgit v1.2.3