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

[17.0][MIG] product_cost_security: Migration to version 17.0 #1883

Open
wants to merge 36 commits into
base: 17.0
Choose a base branch
from

Conversation

carlos-lopez-tecnativa
Copy link

Supersedes #1596
TT52439

@Tecnativa @pedrobaeza @rousseldenis @antonioburic @dreispt could you please review this.

sergio-teruel and others added 30 commits February 10, 2025 12:35
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: product-attribute-12.0/product-attribute-12.0-product_cost_security
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-12-0/product-attribute-12-0-product_cost_security/
Currently translated at 80.0% (4 of 5 strings)

Translation: product-attribute-14.0/product-attribute-14.0-product_cost_security
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-14-0/product-attribute-14-0-product_cost_security/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: product-attribute-15.0/product-attribute-15.0-product_cost_security
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-15-0/product-attribute-15-0-product_cost_security/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: product-attribute-15.0/product-attribute-15.0-product_cost_security
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-15-0/product-attribute-15-0-product_cost_security/
[MIG] product_cost_security: Migration to 16.0

[MIG] product_cost_security: Migration to 16.0

[MIG] product_cost_security: Migration to 16.0

[MIG] product_cost_security: Migration to 16.0

Updated test scripts
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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

Translation: product-attribute-16.0/product-attribute-16.0-product_cost_security
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_cost_security/it/
Currently translated at 100.0% (7 of 7 strings)

Translation: product-attribute-16.0/product-attribute-16.0-product_cost_security
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_cost_security/es/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: product-attribute-16.0/product-attribute-16.0-product_cost_security
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_cost_security/
Before this patch, inheriting modules had to manually add some logic related to guessing wether the user can access cost information. Also, smartypants users could still obtain the desired information through API calls.

Now:
- You can't read/write cost fields via API anymore.
- Views automatically set those fields to readonly if the user has only read permissions (and the model inherits from the new mixin).
- You don't need to enable debug mode anymore to follow configuration instructions.
- Instructions improved.

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

Translation: product-attribute-16.0/product-attribute-16.0-product_cost_security
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_cost_security/
Currently translated at 100.0% (10 of 10 strings)

Translation: product-attribute-16.0/product-attribute-16.0-product_cost_security
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_cost_security/it/
…ssions

As seen in OCA/margin-analysis#198 (review), a user needs some other group that grants them permissions for editing products, apart from this one that allows them to edit product cost.

This might not seem obvious to the user, so it's better to document it.

Btw, I renamed the groups to be shorter. Still easy to understand, now that groups are grouped (🥁).

@moduon MT-5158
Currently translated at 100.0% (10 of 10 strings)

Translation: product-attribute-16.0/product-attribute-16.0-product_cost_security
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_cost_security/es/
oca-ci and others added 5 commits February 10, 2025 12:41
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: product-attribute-16.0/product-attribute-16.0-product_cost_security
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_cost_security/
Currently translated at 100.0% (10 of 10 strings)

Translation: product-attribute-16.0/product-attribute-16.0-product_cost_security
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_cost_security/it/
@pedrobaeza
Copy link
Member

/ocabot migration product_cost_security

Please check CI

@OCA-git-bot OCA-git-bot added this to the 17.0 milestone Feb 10, 2025
@OCA-git-bot
Copy link
Contributor

The migration issue (#1446) has not been updated to reference the current pull request because a previous pull request (#1596) is not closed.
Perhaps you should check that there is no duplicate work.
CC @MarioLM-23

@pedrobaeza
Copy link
Member

/ocabot migration product_cost_security

@OCA-git-bot OCA-git-bot mentioned this pull request Feb 10, 2025
63 tasks
@carlos-lopez-tecnativa carlos-lopez-tecnativa force-pushed the 17.0-mig-product_cost_security branch from 402feeb to 077e33b Compare February 10, 2025 18:56
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.