summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorRishabh Jadia <rja@odoo.com>2019-06-06 09:03:32 +0000
committerRishabh Jadia <rja@odoo.com>2019-06-06 11:47:19 +0000
commit7746621b92c27f6250c0895b0c54b501097e05bb (patch)
tree59b39e845355bc5ba647ff77fab0b65630825de0 /addons/web/static/src/js/fields/basic_fields.js
parentf7b870ca1b8aeda8946990920c4c51f1abb37712 (diff)
[FIX] base: prevent renaming the column for non stored field
Before this task, when creating the related field from the studio, it is by default stored. When we change the field name in 'ir.model.fields' using ORM's write method, it also renames the column in the table associated with the field's model. This is the expected behavior. But when someone tries to change the 'name' of a non stored field, the column is not available in the associated model, and so trying to rename the column results into traceback. This issue was probably there for a while but came into light with the task 1985710. More info can be found on the chatter of the task. This commit fixes the issue by adding an extra check before renaming the table column. The query will be executed only when the field is stored and thus exists in the table. closes odoo/odoo#33944 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions