diff --git a/odoo/api.py b/odoo/api.py index ab96c9f64fd..432d5c5875d 100644 --- a/odoo/api.py +++ b/odoo/api.py @@ -448,7 +448,6 @@ class Environment(Mapping): self.cache = envs.cache self._cache_key = (cr, uid, su) self._protected = StackMap() # {field: ids, ...} - self.dirty = defaultdict(set) # {record: set(field_name), ...} self.all = envs envs.add(self) return self @@ -570,7 +569,6 @@ class Environment(Mapping): yield finally: self.all.in_draft = False - self.dirty.clear() @property def in_draft(self): diff --git a/odoo/fields.py b/odoo/fields.py index 02d1e3ea21b..3e529c8f26f 100644 --- a/odoo/fields.py +++ b/odoo/fields.py @@ -1029,8 +1029,6 @@ class Field(MetaField('DummyField', (object,), {})): if inv_recs: for invf in record._field_inverses[self]: invf._update(inv_recs, record) - # mark field as dirty - env.dirty[record].add(self.name) # determine more dependent fields, and invalidate them if self.relational: diff --git a/odoo/models.py b/odoo/models.py index e9c09e5625f..c71cebd2fd4 100644 --- a/odoo/models.py +++ b/odoo/models.py @@ -5042,26 +5042,6 @@ Fields: prefetch_ids = IterableGenerator(origin_ids, self._prefetch_ids) return self._browse(self.env, ids, prefetch_ids) - # - # Dirty flags, to mark record fields modified (in draft mode) - # - - def _is_dirty(self): - """ Return whether any record in ``self`` is dirty. """ - dirty = self.env.dirty - return any(record in dirty for record in self) - - def _get_dirty(self): - """ Return the list of field names for which ``self`` is dirty. """ - dirty = self.env.dirty - return list(dirty.get(self, ())) - - def _set_dirty(self, field_name): - """ Mark the records in ``self`` as dirty for the given ``field_name``. """ - dirty = self.env.dirty - for record in self: - dirty[record].add(field_name) - # # "Dunder" methods #