[FIX] util/orm: don't mark inherited field manual for custom - #418
[FIX] util/orm: don't mark inherited field manual for custom#418sagu-odoo wants to merge 1 commit into
Conversation
0f12608 to
bd59ab3
Compare
|
The |
|
Besides what @KangOl mentioned I want to point out that the description in the PR is quite ambiguous. Please clarify what you meant. The query you modified mark all fields that weren't loaded as manual, this is important to avoid other errors. It doesn't make sense to disable this without a clear description of the setup such that we know if it is really safe to do so. Regarding the linked patch. If you need something to "get applied" maybe there are other ways to achieve that. Hence, once more, a detailed setup is important. |
The issue related to computation being triggered on inherited fields, which caused blocking especially for non-stored fields Many2Many fields linked with The intention of the fix is to ensure that inherited fields are not marked as manual fields. Only fields created via the UI or explicitly through There is no issue with stored field computation; the problem specifically occurs with inherited (non-stored) fields. This has been addressed in the following PR, which resolves the blocking of upgrade requests for almost: Related fixes to address the traceback but not for 19.0 version |
|
this isssue mostly limited to custom module fields only as of now. |
|
upgradeci retry with always only crm |
|
for mentioned traceback, I think we can backport something like this fix not exact to 19.0 odoo/odoo#246333 . So, group by feature on |
bd59ab3 to
f678dce
Compare
f678dce to
a4bc288
Compare
|
Hello @aj-fuentes and @KangOl , can i get your opinion on this ?. Thanks in advance |
|
Hello @aj-fuentes and @KangOl ,Gentle reminder! can i get your opinion on this ?. Thanks in advance |
|
Hllo @aj-fuentes , Gentle reminder!, can i get review on this ?. Thanks in advance. |
a4bc288 to
cf89594
Compare
cf89594 to
bbdc619
Compare
404a071 to
4975541
Compare
During the upgrade process, inherited fields were incorrectly marked as `manual`, whereas they should retain their original `base` state. like Fields created through Studio or `ir.model.fields` are expected to have `state = manual`, while inherited fields are set up by the ORM with `state = base` [1]. Marking inherited fields as `manual` makes the ORM treat them as independently created fields, which can trigger unnecessary computations, e.g for non-stored fields and `Many2many` fields related to `ir.attachment`. This change ensures that: * inherited fields retain `state = base` * only fields created from `ir.model.fields` or coming from custom module will have the state `manual` not the inherited one. * field setup remains consistent with the ORM behavior This prevents inherited fields from being treated as independent fields and avoids unwanted computations during mock crawl. [1]: https://github.com/odoo/odoo/blob/d58f4ed332af35f6de26a93f07adf05368731e20/odoo/orm/model_classes.py#L493-L508
4975541 to
762aa33
Compare
|
Hello @KangOl , could you please have another look ?. Thanks in advance |

During the upgrade process, inherited fields were incorrectly marked as
manual, whereas they should retain their originalbasestate.like Fields created through Studio or
ir.model.fieldsare expected to havestate = manual, while inherited fields are set up by the ORM withstate = base1.Marking inherited fields as
manualmakes the ORM treat them as independently created fields, which can trigger unnecessary computations, e.g for non-stored fields andMany2manyfields related toir.attachment.This change ensures that:
state = baseir.model.fieldsor coming from custom module will have the statemanualnot the inherited one.This prevents inherited fields from being treated as independent fields and avoids unwanted computations during mock crawl without marking as inhertied field.