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

[18.0][MIG] product_state: Migration to 18.0 #1795

Open
wants to merge 37 commits into
base: 18.0
Choose a base branch
from

Conversation

natuan9
Copy link

@natuan9 natuan9 commented Dec 3, 2024

No description provided.

Cédric Pigeon (ACSONE) and others added 30 commits November 27, 2024 18:50
* [10.0] re-introduce state field on product

* [ADD] add setup for product state
I've added both field content and help to ease understand the possibilities (draft and sellable have different meaning than In Development and Normal
Currently translated at 100.0% (6 of 6 strings)

Translation: product-attribute-12.0/product-attribute-12.0-product_state
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-12-0/product-attribute-12-0-product_state/pt/
Currently translated at 100.0% (29 of 29 strings)

Translation: product-attribute-13.0/product-attribute-13.0-product_state
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-13-0/product-attribute-13-0-product_state/de/
Currently translated at 100.0% (29 of 29 strings)

Translation: product-attribute-13.0/product-attribute-13.0-product_state
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-13-0/product-attribute-13-0-product_state/fr/

Translated using Weblate (French)

Currently translated at 55.2% (16 of 29 strings)

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

Translation: product-attribute-13.0/product-attribute-13.0-product_state
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-13-0/product-attribute-13-0-product_state/

[MIG] product_state: Migration to 14.0
Application: False
Currently translated at 93.1% (27 of 29 strings)

Translation: product-attribute-14.0/product-attribute-14.0-product_state
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-14-0/product-attribute-14-0-product_state/nl/
As fields are on the form view, a write is called with them. This
is an unwanted behaviour.
* Fix bug when inverting non-exist new state
* Show default and active fields in product state form
* Refactor inverse state to use with variant state
Translated using Weblate (Catalan)

Currently translated at 93.7% (30 of 32 strings)

Translation: product-attribute-15.0/product-attribute-15.0-product_state
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-15-0/product-attribute-15-0-product_state/ca/
[UPD] Update product_state.pot

[UPD] README.rst
Translated using Weblate (Italian)

Currently translated at 100.0% (32 of 32 strings)

Translation: product-attribute-16.0/product-attribute-16.0-product_state
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_state/it/
Translated using Weblate (Italian)

Currently translated at 100.0% (32 of 32 strings)

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

Translated using Weblate (Italian)

Currently translated at 100.0% (32 of 32 strings)

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

Translated using Weblate (Spanish)

Currently translated at 100.0% (33 of 33 strings)

Translation: product-attribute-16.0/product-attribute-16.0-product_state
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_state/es/

[UPD] README.rst

Update translation files

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

Translation: product-attribute-16.0/product-attribute-16.0-product_state
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_state/

Translated using Weblate (Spanish)

Currently translated at 100.0% (32 of 32 strings)

Translation: product-attribute-16.0/product-attribute-16.0-product_state
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_state/es/

Translated using Weblate (Italian)

Currently translated at 100.0% (32 of 32 strings)

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

Translated using Weblate (Italian)

Currently translated at 100.0% (32 of 32 strings)

Translation: product-attribute-16.0/product-attribute-16.0-product_state
Translate-URL: https://translation.odoo-community.org/projects/product-attribute-16-0/product-attribute-16-0-product_state/it/
Copy link
Contributor

@ajaniszewska-dev ajaniszewska-dev left a comment

Choose a reason for hiding this comment

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

LG

@rousseldenis
Copy link
Contributor

/ocabot migration product_state

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Dec 10, 2024
@OCA-git-bot OCA-git-bot mentioned this pull request Dec 10, 2024
25 tasks
@@ -55,10 +55,10 @@ def _set_product_state_id(self, record):
ProductState = record.env["product.state"]
product_state = ProductState.search([("code", "=", record.state)], limit=1)
if record.state and not product_state:
msg = _("The product state code %s could not be found.")
msg = self.env._("The product state code %s could not be found.")
Copy link
Contributor

Choose a reason for hiding this comment

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

Use the translation function arguments instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

"license": "AGPL-3",
"depends": ["product", "sale"],
"depends": ["product", "sale", "stock"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Why adding this new dependency ?

Copy link
Contributor

Choose a reason for hiding this comment

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

this sounds wrong

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for review, adding this new dependency because the ir.model.access.csv file references the stock.group_stock_manager group.
This access was added in 14.0 by aleuffre (#1124)
I have also asked him why the dependency on the stock module was not added (#1124 (comment))

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for the reference. Although that sounds wrong :/

Copy link
Contributor

Choose a reason for hiding this comment

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

@natuan9 I'd remove it and fix it w/ a glue module. Then they'll have to fix the module on v14 by backporting the work from v18. See my proposal on the PR on v14.

@rousseldenis WDYT?

Copy link
Author

@natuan9 natuan9 Dec 12, 2024

Choose a reason for hiding this comment

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

thanks for your proposal, and I will implement it in a fix commit

Copy link
Author

Choose a reason for hiding this comment

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

Should I create a new PR for adding a glue module?

Copy link
Contributor

@rousseldenis rousseldenis Dec 12, 2024

Choose a reason for hiding this comment

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

Yes, add a separate commit here to remove dependency (to be backported) and entry in security.

Then, add a new PR to add product_state_stock

Copy link
Contributor

Choose a reason for hiding this comment

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

hmm not sure if that's a good name... we already have https://github.com/OCA/product-attribute/tree/14.0/product_stock_state 😵

What about product_state_stock_security or product_state_stock_base?

Copy link
Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@simahawk simahawk left a comment

Choose a reason for hiding this comment

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

dependency to fix

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.