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

[16.0][IMP]product_packaging_level: recover name_get policy flow #1527

Merged
merged 1 commit into from
Mar 27, 2024

Conversation

sonhd91
Copy link

@sonhd91 sonhd91 commented Feb 27, 2024

As suggested in: #1427 (comment)

No need to update _onchange_package_type so I keep it

@sonhd91 sonhd91 changed the title [IMP]product_packaging_level: recover name_get policy flow [16.0][IMP]product_packaging_level: recover name_get policy flow Feb 27, 2024
@sonhd91 sonhd91 force-pushed the 16.0-imp-product_packaging_level branch from 414f7e2 to 2e4e169 Compare February 27, 2024 12:00
@sonhd91 sonhd91 marked this pull request as draft February 27, 2024 12:08
@sonhd91 sonhd91 marked this pull request as ready for review February 27, 2024 12:53
@sonhd91 sonhd91 force-pushed the 16.0-imp-product_packaging_level branch 4 times, most recently from 13d8943 to ea55c00 Compare March 5, 2024 10:41
Copy link
Contributor

@lmignon lmignon left a comment

Choose a reason for hiding this comment

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

@sonhd91 A minor comment...

Since the name is mandatory and not translatable, to avoid mismatch according to the user language when the package level is created, you should maybe add an additional parameter to select the language to use to compute the name.

@sonhd91
Copy link
Author

sonhd91 commented Mar 12, 2024

@sonhd91 A minor comment...

Since the name is mandatory and not translatable, to avoid mismatch according to the user language when the package level is created, you should maybe add an additional parameter to select the language to use to compute the name.

Hello @lmignon, the _get_name_from_policy calculates the name packaging by using the display_name which include language context for computation, so it will take the value in the user's language context at the packaging creation step

@simahawk
Copy link
Contributor

simahawk commented Mar 13, 2024

@sonhd91 A minor comment...
Since the name is mandatory and not translatable, to avoid mismatch according to the user language when the package level is created, you should maybe add an additional parameter to select the language to use to compute the name.

Hello @lmignon, the _get_name_from_policy calculates the name packaging by using the display_name which include language context for computation, so it will take the value in the user's language context at the packaging creation step

yeah but then you should use @api.depends_context("lang") no? (even if only to document it)

@lmignon
Copy link
Contributor

lmignon commented Mar 13, 2024

@sonhd91 A minor comment...
Since the name is mandatory and not translatable, to avoid mismatch according to the user language when the package level is created, you should maybe add an additional parameter to select the language to use to compute the name.

Hello @lmignon, the _get_name_from_policy calculates the name packaging by using the display_name which include language context for computation, so it will take the value in the user's language context at the packaging creation step

yeah but then you should use @api.depends_context("lang") no? (even if only to document it)

My main concern is to ensure to store into the database the value always in the same language..

@sonhd91 sonhd91 force-pushed the 16.0-imp-product_packaging_level branch from ea55c00 to 88ea86e Compare March 14, 2024 04:09
@sonhd91
Copy link
Author

sonhd91 commented Mar 14, 2024

@sonhd91 A minor comment...
Since the name is mandatory and not translatable, to avoid mismatch according to the user language when the package level is created, you should maybe add an additional parameter to select the language to use to compute the name.

Hello @lmignon, the _get_name_from_policy calculates the name packaging by using the display_name which include language context for computation, so it will take the value in the user's language context at the packaging creation step

yeah but then you should use @api.depends_context("lang") no? (even if only to document it)

Hello, I just updated the branch please checked again

@sonhd91 sonhd91 requested review from simahawk and lmignon March 14, 2024 04:10
@sonhd91 sonhd91 force-pushed the 16.0-imp-product_packaging_level branch 2 times, most recently from 6e8fb8b to 61707b3 Compare March 14, 2024 10:59
@sonhd91 sonhd91 requested a review from lmignon March 14, 2024 11:01
@cyrilmanuel
Copy link

@lmignon little ping, is it good for you ?

@sonhd91 sonhd91 force-pushed the 16.0-imp-product_packaging_level branch from 61707b3 to 9ae4216 Compare March 27, 2024 03:07
@sonhd91 sonhd91 force-pushed the 16.0-imp-product_packaging_level branch from 9ae4216 to 1ef9ea2 Compare March 27, 2024 07:21
@sonhd91 sonhd91 requested a review from simahawk March 27, 2024 07:22
@simahawk
Copy link
Contributor

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 16.0-ocabot-merge-pr-1527-by-simahawk-bump-minor, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 2b3ef6a into OCA:16.0 Mar 27, 2024
8 of 9 checks passed
@OCA-git-bot
Copy link
Contributor

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

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.

5 participants