-
-
Notifications
You must be signed in to change notification settings - Fork 177
[18.0][MIG] sale_margin_delivered_security: Migration to 18 #252
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
[18.0][MIG] sale_margin_delivered_security: Migration to 18 #252
Conversation
…_margin_delivered_security
Following OCA/product-attribute#1538, the security is now done via mixin and the view can be removed. @moduon MT-5158
Currently translated at 100.0% (5 of 5 strings) Translation: margin-analysis-16.0/margin-analysis-16.0-sale_margin_delivered_security Translate-URL: https://translation.odoo-community.org/projects/margin-analysis-16-0/margin-analysis-16-0-sale_margin_delivered_security/it/
…elds The fields to secure are defined on the sale.order.line model not on sale.order
Currently translated at 100.0% (8 of 8 strings) Translation: margin-analysis-16.0/margin-analysis-16.0-sale_margin_delivered_security Translate-URL: https://translation.odoo-community.org/projects/margin-analysis-16-0/margin-analysis-16-0-sale_margin_delivered_security/it/
f62bca2 to
6f0896b
Compare
chienandalu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks :)
Gelojr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Congratulations for the work on this module @Andrii9090 , the PR is approved.
The following functional tests were executed:
- Test 1: A user with cost-view permissions successfully viewed the delivered-margin fields on a sales order line after delivery; all values were correctly computed and displayed.
- Test 2: A user without cost permissions could not see any cost or margin fields, including both the delivered-margin fields added by the module and the standard Odoo cost and margin fields; all of them were correctly hidden.
- Test 3: A user without cost permissions could not access the delivered-margin fields even in developer mode; the fields were not available in the view definition.
- Test 4: Delivered-margin values were correctly computed after a partial delivery and were only visible to users with cost-view permissions; users without permissions did not see any margin-related fields.
- Test 5: After removing cost-view permissions, the user no longer saw any delivered-margin fields on existing sales order lines, confirming that visibility reacts immediately to permission changes.
- Test 6: A user with cost-view permissions could see the product cost on the product form and the delivered-margin fields on sales order lines, all correctly shown as read-only.
- Test 7: Editing the standard cost on the sales order line after delivery may cause inconsistencies.
A user with cost-edit permissions can correctly modify the product cost on the product form, and new sales orders will use that updated value. However, this user can also manually edit the standard Odoo cost field on the sales order line itself. If a delivery has already been completed, changing this cost afterwards creates an inconsistency because the delivered-margin values were calculated using the previous cost. As an improvement, it would be helpful for Odoo to automatically log a message in the chatter whenever the standard cost on the sales order line is manually modified, so that any post-delivery cost changes remain traceable.
|
/ocabot migration sale_margin_delivered_security |
rafaelbn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Functional review 👍🏼
/ocabot merge patch
|
What a great day to merge this nice PR. Let's do it! |
|
Congratulations, your PR was merged at 077474e. Thanks a lot for contributing to OCA. ❤️ |
Straightforward migration to v18
https://www.loom.com/share/cd61599fbe834ce8ae79431960dcb935
@moduon MT-11820