[FIX] [19.0] edi_core_oca: fix missing kw in super for _search(...) - #342
Conversation
|
/ocabot merge patch |
|
Thanks! |
|
On my way to merge this fine PR! |
|
@etobella @simahawk thank you for the quick review and merge 🚀 I don't know if these 2 lines should be fixed too: |
|
Congratulations, your PR was merged at b5aeb6e. Thanks a lot for contributing to OCA. ❤️ |
To have full ctx case 2 case 3 For case 2 if passing active_test through context is still working we can keep it that way but might be worth to keep it consistent. @etobella you might have a better picture on this part. I'll let you judge. |
Issue:
Missing
**kwgiven to thesupercall.How to reproduce:
Generate a edi.exchange.record with a parent and archive this parent.
When you try to open the form view of the child, you will have an
Access Errorbecause Odoo try to load the parent but as all args are not given to thesuper, the parent is not returned and Odoo perform this as a non-accessible record.Fix:Just give the
**kwduring call tosuper.In this case the
kw = {'active_test': False}This change comes from Odoo who give this as a parameter in v
19(it was in thecontextin previous version):19: https://github.com/odoo/odoo/blob/19.0/odoo/orm/models.py#L380218: https://github.com/odoo/odoo/blob/18.0/odoo/models.py#L4155