Skip to content

[19.0][MIG] sale_margin_security: Migration to version 19.0 - #285

Open
carlos-lopez-tecnativa wants to merge 26 commits into
OCA:19.0from
Tecnativa:19.0-mig-sale_margin_security
Open

[19.0][MIG] sale_margin_security: Migration to version 19.0#285
carlos-lopez-tecnativa wants to merge 26 commits into
OCA:19.0from
Tecnativa:19.0-mig-sale_margin_security

Conversation

@carlos-lopez-tecnativa

@carlos-lopez-tecnativa carlos-lopez-tecnativa commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Supersedes #253
TT64205
@Tecnativa @pedrobaeza @sergio-teruel @dreispt @cormaza could you please review this?

chienandalu and others added 26 commits September 8, 2026 11:13
In sale_margin, when the line already exists, the purchase_price
is computed with the product onchange method, so if the user doesn't
have the field available in the view it's not going to get the right
price. This should be fixed in v13 with the new compute fields
possibilities.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: margin-analysis-15.0/margin-analysis-15.0-sale_margin_security
Translate-URL: https://translation.odoo-community.org/projects/margin-analysis-15-0/margin-analysis-15-0-sale_margin_security/
Currently translated at 100.0% (3 of 3 strings)

Translation: margin-analysis-16.0/margin-analysis-16.0-sale_margin_security
Translate-URL: https://translation.odoo-community.org/projects/margin-analysis-16-0/margin-analysis-16-0-sale_margin_security/es/
Set group_sale_margin_security in all sensible fields.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: margin-analysis-16.0/margin-analysis-16.0-sale_margin_security
Translate-URL: https://translation.odoo-community.org/projects/margin-analysis-16-0/margin-analysis-16-0-sale_margin_security/
Currently translated at 85.7% (6 of 7 strings)

Translation: margin-analysis-16.0/margin-analysis-16.0-sale_margin_security
Translate-URL: https://translation.odoo-community.org/projects/margin-analysis-16-0/margin-analysis-16-0-sale_margin_security/es/
Both modules do essentially the same thing: apply a restriction over product costs. Thus, it makes sense to share the same permission groups.

This refactor, that depends on OCA/product-attribute#1538, improves the module readme and makes `sale_margin_security` auto-installable addon when `product_cost_security` is found.

A migration script is provided to make sure the same users still retain the same permissions.

@moduon MT-5158
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: margin-analysis-16.0/margin-analysis-16.0-sale_margin_security
Translate-URL: https://translation.odoo-community.org/projects/margin-analysis-16-0/margin-analysis-16-0-sale_margin_security/
Currently translated at 100.0% (7 of 7 strings)

Translation: margin-analysis-16.0/margin-analysis-16.0-sale_margin_security
Translate-URL: https://translation.odoo-community.org/projects/margin-analysis-16-0/margin-analysis-16-0-sale_margin_security/it/
@pedrobaeza

Copy link
Copy Markdown
Member

/ocabot migration sale_margin_security

@pedrobaeza

Copy link
Copy Markdown
Member

CI is red.

@carlos-lopez-tecnativa

Copy link
Copy Markdown
Contributor Author

CI is red.

Yes, I created a PR to Odoo: odoo/odoo#287257. With this fix, the CI passes locally. I think this is an issue in the framework. I'm waiting to see whether Odoo merges this or how I can reference this PR here. Is it possible to use git-aggregate here, or not?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:sale_margin_security Module sale_margin_security series:19.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.