summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorMartin Trigaux <mat@odoo.com>2020-03-16 09:06:16 +0000
committerMartin Trigaux <mat@odoo.com>2020-03-24 20:53:36 +0000
commitb51129bd304e74a5eef94fcabca915aedf56e5ad (patch)
tree5be9c0c512d6f03f5b8d3376f075af552b06a689 /addons/web/static/src/js/fields/basic_fields.js
parent7da747c6272d502ee3d235ca471b8d411cc43fc1 (diff)
[FIX] base: proper unlink of abtract model
Context: Since 7593b887dff4f an entry of ir.model.fields.selection is created for each entry in a selection field. This allow a more modular approach of tagging entries with an external id and translating selections in the module that defined the selection (and not the one that defined the field) Problem: When removing a selection, every record that used this selection is updated with a 'set null'. This was also intented on abstract models that do not have a table. To reproduce: 1. create two models: class ModelA(models.Abstract): _name = 'abstract.a' select = fields.Selection([ ('foo', 'Foo'), ('bar', 'Bar'), ]) class ModelB(models.Model): _name = 'model.b' _inherit = 'abstract.a' 2. update code and removes the key 'foo' 3. update the module -> error psycopg2.errors.UndefinedTable: relation "abstract_a" does not exist LINE 1: UPDATE "abstract_a" SET "select"=NULL WHERE "re... When updating the values in db, only update on real models closes odoo/odoo#48288 X-original-commit: 6b20a8241300ebfc185500eb64e210db755574a8 Signed-off-by: Martin Trigaux (mat) <mat@odoo.com> Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions