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] product_packaging_level: Preserve sequence order #1518

Closed
wants to merge 1 commit into from

Conversation

p-tombez
Copy link
Contributor

@p-tombez p-tombez commented Feb 14, 2024

Restore original order to prevent altering behavior when packaging is reordered in the view.
(see explanation here : OCA/sale-workflow#2939 )


sequence = fields.Integer(compute="_compute_sequence", store=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

why not related as the prev field?

@simahawk
Copy link
Contributor

Tests fail unrelated on product_abc_classification
https://github.com/OCA/product-attribute/actions/runs/7899614130/job/21559449400?pr=1518#step:8:518


sequence = fields.Integer(compute="_compute_sequence", store=True)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
sequence = fields.Integer(compute="_compute_sequence", store=True)
sequence = fields.Integer(compute="_compute_sequence", store=True, readonly=False)

readonly=False is need otherwise is not possible to edit the field.

Copy link
Contributor

@santostelmo santostelmo left a comment

Choose a reason for hiding this comment

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

We need to assign readonly=False in sequence field otherwise field value can't be changed in the interface.

@santostelmo
Copy link
Contributor

@p-tombez I created another PR with the fix mentioned above #1525

@simahawk simahawk closed this Mar 6, 2024
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.

5 participants