diff options
| author | Christophe Simonis <chs@odoo.com> | 2019-01-09 19:59:27 +0100 |
|---|---|---|
| committer | Christophe Simonis <chs@odoo.com> | 2019-01-09 19:59:27 +0100 |
| commit | d7c5bc02cc2b27442f0d4c8aca70266762be2a32 (patch) | |
| tree | 3a675d15b539a4474be38704405b318bebecdce7 /odoo/fields.py | |
| parent | 37b518f1749aff3d6ffb2246c32f2aa1e67d9067 (diff) | |
| parent | 8aa8548d8ab68feb13f3bde51c557db84877e809 (diff) | |
[MERGE] forward port branch saas-12.1 up to 8aa8548d8ab
Diffstat (limited to 'odoo/fields.py')
| -rw-r--r-- | odoo/fields.py | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/odoo/fields.py b/odoo/fields.py index 014f658f3b9..e9a8d49d725 100644 --- a/odoo/fields.py +++ b/odoo/fields.py @@ -773,16 +773,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 @@ -1726,6 +1716,7 @@ class Datetime(Field): def convert_to_export(self, value, record): if not value: return '' + value = self.convert_to_display_name(value, record) return self.from_string(value) if record._context.get('export_raw_data') else ustr(value) def convert_to_display_name(self, value, record): @@ -2553,6 +2544,8 @@ class Many2many(_RelationalMulti): self.column2 = '%s_id' % comodel._table # check validity of table name check_pg_name(self.relation) + else: + self.relation = self.column1 = self.column2 = None def _setup_regular_full(self, model): super(Many2many, self)._setup_regular_full(model) |
