Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] sale_substate: fix inheritance order #3483

Open
wants to merge 4 commits into
base: 17.0
Choose a base branch
from

Conversation

len-foss
Copy link

@len-foss len-foss commented Dec 12, 2024

With the current order, the super to _track_template from the mixin was never called. Which was a good thing since it was also buggy;
however the override in this model was removed on the assumption that it was.

Depends on OCA/server-ux#982 since the super function is actually borked.

(it's therefore expected tests crash before the dependencies are updated)

Also, the problem is present in other substate modules like purchase_substate but their migration is in limbo so it's all good.

With the current order, the super to _track_template from the mixin was never called.
Which was a good thing since it was also buggy;
however the override in this model was removed on the assumption that it was.
@len-foss
Copy link
Author

Hello @rousseldenis
This fixes comment #3072 (comment)

Copy link
Member

@StefanRijnhart StefanRijnhart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can fix the tests by adding your version of base_substate in test-requirements.txt

Something like

git+https://github.com/lambdao-dev/server-ux@17.0-fxsbsttmx-len#subdirectory=base_substate

Would it be possible to add a test to validate that tracking has taken place, so that it is signalled when this goes wrong again after some future Odoo internal refactoring or so.

@len-foss
Copy link
Author

Working test added, it should be the same for other repair_substate or purchase_substate modules.

Copy link
Member

@StefanRijnhart StefanRijnhart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on the test! One more suggestion.

sale_substate/models/sale_order.py Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants