Skip to content

Conversation

@Andrii9090
Copy link
Contributor

@Andrii9090 Andrii9090 commented Nov 24, 2025

Straightforward migration to v18

https://www.loom.com/share/cd61599fbe834ce8ae79431960dcb935

@moduon MT-11820

legalsylvain and others added 8 commits November 24, 2025 13:27
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/
@Andrii9090 Andrii9090 marked this pull request as draft November 24, 2025 13:14
@Andrii9090 Andrii9090 marked this pull request as ready for review November 24, 2025 13:55
@Andrii9090 Andrii9090 force-pushed the 18.0-mig-sale_margin_delivered_security branch from f62bca2 to 6f0896b Compare November 24, 2025 16:00
Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

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

Thanks :)

Copy link

@Gelojr Gelojr left a 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.

@rafaelbn
Copy link
Member

/ocabot migration sale_margin_delivered_security

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Nov 27, 2025
@OCA-git-bot OCA-git-bot mentioned this pull request Nov 27, 2025
8 tasks
Copy link
Member

@rafaelbn rafaelbn left a 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

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 18.0-ocabot-merge-pr-252-by-rafaelbn-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit ae1f27b into OCA:18.0 Nov 27, 2025
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 077474e. Thanks a lot for contributing to OCA. ❤️

@Andrii9090 Andrii9090 deleted the 18.0-mig-sale_margin_delivered_security branch November 28, 2025 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants