summaryrefslogtreecommitdiff
path: root/addons/purchase/data/mail_template_data.xml
diff options
context:
space:
mode:
authorAdrian Torres <adt@odoo.com>2018-06-01 10:55:35 +0200
committerGitHub <noreply@github.com>2018-06-01 10:55:35 +0200
commita5ccc1b6b528d3daa2a8ae9933466803b0dbf597 (patch)
tree7e1d06cddc38ec7062f3cb98fd01dbf152ab60cf /addons/purchase/data/mail_template_data.xml
parent195c2fc05f2a2ff4f80bd49066803974519d5a9b (diff)
[FIX] orm: re-create constraints of extended fields
Before this commit: * Module A defines a field X of model M * Module B inherits from model M without touching field X * Module C inherits from model M and extends field X by giving an INDEX / NOT NULL constraint. * Module B and C depend from Module A, but not each other If all three modules are installed and Module B is updated, the INDEX / NOT NULL constraint could be dropped. This happens because Module B can be loaded before Module C is loaded, if that's the case, then after the upgrade of Module B, during the schema checking, we verify that the field object we have and the field on the DB are the same, since Module B doesn't introduce the index then this check is false and we drop the index. When we get to loading Module C, we do not do any schema checking because the module is not marked as `to upgrade`, therefore the index is lost forever. To solve this, we re-init the models that belong to the set of the intersection between upgraded and modified models and loaded and modified models. Fixes #24958
Diffstat (limited to 'addons/purchase/data/mail_template_data.xml')
0 files changed, 0 insertions, 0 deletions