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][MIG] sale_order_line_description #3070

Open
wants to merge 46 commits into
base: 16.0
Choose a base branch
from

Conversation

MarioLM-23
Copy link

@MarioLM-23 MarioLM-23 commented Apr 11, 2024

Last PR of migration module in open stage: #2450

tafaRU and others added 30 commits April 10, 2024 08:47
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: sale-workflow-11.0/sale-workflow-11.0-sale_order_line_description
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-11-0/sale-workflow-11-0-sale_order_line_description/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_order_line_description
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_order_line_description/
Currently translated at 100.0% (7 of 7 strings)

Translation: sale-workflow-12.0/sale-workflow-12.0-sale_order_line_description
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_order_line_description/zh_CN/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: sale-workflow-14.0/sale-workflow-14.0-sale_order_line_description
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_order_line_description/
Currently translated at 100.0% (7 of 7 strings)

Translation: sale-workflow-14.0/sale-workflow-14.0-sale_order_line_description
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_order_line_description/de/
Yvesldff and others added 14 commits April 10, 2024 08:47
Currently translated at 85.7% (6 of 7 strings)

Translation: sale-workflow-14.0/sale-workflow-14.0-sale_order_line_description
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_order_line_description/fr/
Currently translated at 60.0% (6 of 10 strings)

Translation: sale-workflow-14.0/sale-workflow-14.0-sale_order_line_description
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-14-0/sale-workflow-14-0-sale_order_line_description/fr_FR/
Currently translated at 14.2% (1 of 7 strings)

Translation: sale-workflow-15.0/sale-workflow-15.0-sale_order_line_description
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_order_line_description/it/
Currently translated at 100.0% (7 of 7 strings)

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

Translation: sale-workflow-15.0/sale-workflow-15.0-sale_order_line_description
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_order_line_description/
@MarioLM-23 MarioLM-23 mentioned this pull request Apr 11, 2024
91 tasks
@MarioLM-23 MarioLM-23 marked this pull request as ready for review April 15, 2024 06:58
@rousseldenis
Copy link
Sponsor Contributor

/ocabot migration sale_order_line_description

Copy link
Sponsor Contributor

@rousseldenis rousseldenis left a comment

Choose a reason for hiding this comment

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

@mariobinhex Thanks for this.

Usually, it's fair to base your PR on other one to integrate the previous work (from #2450).

Moreover, his code was better than this one.

Could you change ? Thanks

@@ -8,8 +8,8 @@ class SaleOrderLine(models.Model):
_inherit = "sale.order.line"

@api.onchange("product_id")
def product_id_change(self):
res = super(SaleOrderLine, self).product_id_change()
def _onchange_product_id_warning(self):
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

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

Please use _compute_name() function instead.

@@ -57,6 +58,7 @@ def test_check_sale_order_line_description(self):
sale_order_line = self.sale_order_line_model.with_user(self.user_1).create(
line_values.copy()
)
sale_order_line._onchange_product_id_warning()
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

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

After having changed to _compute_name() override, you don't need this anymore

Copy link
Author

Choose a reason for hiding this comment

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

@rousseldenis Hi and thanks for the review
Pls check my changes and let me know if any further changes are needed.
Greetings!

class SaleOrderLine(models.Model):
_inherit = "sale.order.line"

@api.onchange("product_id")
Copy link
Contributor

Choose a reason for hiding this comment

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

It should be @api.depends.

Copy link
Author

Choose a reason for hiding this comment

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

@AungKoKoLin1997 Thanks for the review
Done!

Copy link

@Jaimermaccione Jaimermaccione left a comment

Choose a reason for hiding this comment

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

LGTM! Functional review on runboat.

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.

None yet