summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2019-01-08 09:16:49 +0000
committerMartin Trigaux <mat@odoo.com>2019-01-08 15:21:27 +0000
commit91882dd97238a006ef711b33a96ba88acb862847 (patch)
tree35e4d3f722432e32da6d8d33a4d0f1f0dbb52feb /addons/web/static/src/js/fields/basic_fields.js
parent8322c7c7316a25025ab10827b3ae96f6a1851c48 (diff)
[FIX] base: delete linked record only if last external id
In case a record is no longer referenced in the updated module, its external id is deleted. If the linked record still exists, it is deleted as well. This last clause was incorrect as the record may still be referenced in other modules. If a field is declared in module A class FooA(models.Model): _name = 'foo' bar = fields.Char() and overriden in module B class FooB(models.Model: _inherit = 'foo' bar = fields.Char(translate=True) In case the field is no longer inherited in module B (code change, moved to another module,...), the ir.model.field record for bar was deleted. Two external ids are linked to field bar: A.field_foo__bar B.field_foo__bar The ir.model.field record should be dropped only if both ir.model.data entries are no longer loaded. Otherwise, only the ir.model.data entry should be deleted (i.e. B.field_foo__bar in the above example). Fixes odoo/odoo#29820 closes odoo/odoo#30018
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions