-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[18.0][MIG] product_price_category #3618
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
base: 18.0
Are you sure you want to change the base?
Conversation
e9feec7 to
e86a5ed
Compare
7e05e71 to
59bf845
Compare
|
Just tested, fix done by @florian-dacosta works nicely I approve it |
|
FYI as last contributor / reviewers, it may be of your interest |
|
/ocabot migration product_price_category |
| selection_add=[("2b_product_price_category", "Price Category")], | ||
| ondelete={"2b_product_price_category": "set default"}, | ||
| ) | ||
| display_applied_on = fields.Selection( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bealdav No need of migration script for this ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum, true, it is for a new project, and I did not even think about it...
I'll provide one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your vigilance @rousseldenis
I've added a migration script.I could not test it on a real migrated database though, but I did test that it runs without crashing
|
|
||
| def _compute_name_and_price(self): | ||
| result = super()._compute_name_and_price() | ||
| def _compute_name(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
api.depends should be maintained from the original method
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did the change.
I hardly believed it was not necessary although it does not hurt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JordiMForgeFlow For depends(), Odoo will append new dependencies in further modules that decorates same function. That's why you don't need to put original fields in it. @florian-dacosta This is why it worked without. This is not necessary.
I'm wondering if price_category_id should not be in depends ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just rebased this old PR.
@rousseldenis , concerning if price_category_id should trigger this method, on my side I think not.
I've tested here
On save computed name is refreshed when you change the price category
It seems to me we have answered all questions.
A merge can be done ?
e0a4997 to
355c4e7
Compare
[UPD] Update product_price_category.pot [ADD] icon.png
Currently translated at 73.3% (11 of 15 strings) Translation: sale-workflow-10.0/sale-workflow-10.0-product_price_category Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-10-0/sale-workflow-10-0-product_price_category/it/
Currently translated at 100.0% (15 of 15 strings) Translation: sale-workflow-10.0/sale-workflow-10.0-product_price_category Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-10-0/sale-workflow-10-0-product_price_category/ca/
Currently translated at 100.0% (15 of 15 strings) Translation: sale-workflow-10.0/sale-workflow-10.0-product_price_category Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-10-0/sale-workflow-10-0-product_price_category/es/ [UPD] Switch to Github Actions / Copier update
[FIX] - fix ui Co-authored-by: Laurent Mignon (ACSONE) <[email protected]>
Prior to this commit `name` was not correctly computed when `applied_on` value is `2b_product_price_category`.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-16.0/sale-workflow-16.0-product_price_category Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-product_price_category/
355c4e7 to
812cb68
Compare
No description provided.