Closed joao-p-marques closed 3 years ago
make sense, but it is weird that this bug has not been discovered before. (this module is used on OCA instance...)
Yes, I was thinking the same, but the new SQL query will always fail as the column doesn't exist on the related table.
The problem only occurs when installing or updating the module, so maybe that's why the problem hasn't shown up yet...
This should be fixed in core indeed. @legalsylvain this didn't arise in OCA instance because it's not updated regularly.
Written a comment on https://github.com/odoo/odoo/pull/65232#issuecomment-773298323
The PR is only 7 days old, so that's why we haven't had the problem till now.
Written a comment on odoo/odoo#65232 (comment)
Thanks @pedrobaeza ! I didn't know that new optimization.
So what is the strategy ? accept this PR or wait for a fix in core ? I'm not sure.
So what is the strategy ? accept this PR or wait for a fix in core ? I'm not sure
I guess waiting for the core fix would be better. However, this wouldn't harm, I think, and if the fix takes too long, maybe go for this. @pedrobaeza WDYT?
There's already a PR for fixing it: https://github.com/odoo/odoo/pull/65535, so let's wait a bit, as not sure if this can have another side effect (double attachment).
IMO it's not necessary now because odoo solved it.
Yes, closing this :+1:
After https://github.com/odoo/odoo/commit/82644c3ea20f7b5748f92ce4d0f4585335995d29, a related field is updated through SQL, which raises the need to indicate the appropiate relation that comes from the related table.
The related field
image_small
hasattachment=True
, meaning it is not in theres_partner
table, causing the following install error:Indicating
attachment=True
also in the related field solves the issue.@Tecnativa TT28141
ping @victoralmau @pedrobaeza