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

[16.0][FIX] base_tier_validation: Field merge in view #846

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

houzefa-abba
Copy link
Member

Previous implementation was losing fields in some cases; new one properly merges dicts/tuples.

This fixes odd "Missing field string information" errors in form-embedded lists.

This cset also removes an obsolete base_model_name context key no longer used in Odoo 16.

This cset adds a test_get_view test which checks for that need_validation field; it was failing with the previous impl.

Fixes #825.

Previous implementation was losing fields in some cases; new one
properly merges dicts/tuples.

This fixes odd "Missing field string information" errors in
form-embedded lists.

This cset also removes an obsolete `base_model_name` context key no
longer used in Odoo 16.

This cset adds a `test_get_view` test which checks for that
`need_validation` field; it was failing with the previous impl.

Fixes OCA#825.
@OCA-git-bot
Copy link
Contributor

Hi @LoisRForgeFlow,
some modules you are maintaining are being modified, check this out!

@rrebollo
Copy link

@houzefa-abba I was testing sale_tier_validation and experienced a bug where all reviews where accepted (with sequence approve enabled) but confirm action in sale order keep raising "The operation is under validation". After applied this PR to my code everything worked as expected. Any thoughts???

@houzefa-abba
Copy link
Member Author

houzefa-abba commented Mar 18, 2024

@houzefa-abba I was testing sale_tier_validation and experienced a bug where all reviews where accepted (with sequence approve enabled) but confirm action in sale order keep raising "The operation is under validation". After applied this PR to my code everything worked as expected. Any thoughts???

O that's good to know!

Well I haven't heavily configured / used tier validations so far so I'll take your word for it.
It doesn't surprise me though; with the previous implementation, some fields (such as those in test_get_view) could go missing, and since Odoo's view cache system is also involved here, results were not always predictable.

Copy link

@AnizR AnizR left a comment

Choose a reason for hiding this comment

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

Code review: LGTM
It solved an issue I had in a tree view of purchase orders due to purchase_validation_tier.

Thanks!

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.

base_tier_validation: Missing field "need_validation" in form-embedded lists
4 participants