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] purchase_default_terms_conditions: Migration to 18.0 #2490

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

Conversation

HeliconiaSolutions
Copy link

No description provided.

Copy link

@sebalix sebalix left a comment

Choose a reason for hiding this comment

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

Some remarks.
In fact, these remarks apply to previous version of this module as well, and some of them could be part of a separate commit so it'll be easier to backport.

@@ -0,0 +1,2 @@
This module allows purchase default terms & conditions from Suppler or
Copy link

Choose a reason for hiding this comment

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

Suggested change
This module allows purchase default terms & conditions from Suppler or
This module allows purchase default terms & conditions from Supplier or

Comment on lines 6 to 10
from odoo.addons.account.tests.common import AccountTestInvoicingCommon


@tagged("post_install", "-at_install")
class TestPurchase(AccountTestInvoicingCommon):
Copy link

Choose a reason for hiding this comment

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

We could probably be able to test this feature without depending on AccountTestInvoicingCommon. We could inherit from the new BaseCommon class so tracking_disable context key used in the test could be dropped.

Comment on lines 15 to 19
elif (
self.env["ir.config_parameter"]
.sudo()
.get_param("purchase.use_purchase_note")
):
Copy link

Choose a reason for hiding this comment

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

From what I see, the parameter should be named purchase.use_company_purchase_note.
Also, putting a value of 0 will still enable this feature, why not using odoo.tools.str2bool?

Comment on lines 58 to 64
)

self.partner_a.write({"purchase_note": False})

self.env["ir.config_parameter"].set_param("purchase.use_purchase_note", "Test")

purchase_order.onchange_partner_id()
Copy link

Choose a reason for hiding this comment

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

Nowhere we are testing the value of the notes field from the PO (no assert). IMO the test doesn't test anything, this has to be fixed.

To trigger automatically onchanges when encoding a record, better to use odoo.tests.common.Form class too.

marcelsavegnago and others added 29 commits December 18, 2024 15:21
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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

Translation: purchase-workflow-15.0/purchase-workflow-15.0-purchase_default_terms_conditions
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-15-0/purchase-workflow-15-0-purchase_default_terms_conditions/
Currently translated at 80.0% (8 of 10 strings)

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

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

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_default_terms_conditions
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_default_terms_conditions/es/
…hase_note on onchange of partner_id: this for manage case of purchase_note field on model partner that was deleted from backend but still evaluate <p><br></p> on db
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_default_terms_conditions
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_default_terms_conditions/it/
oca-ci and others added 13 commits December 18, 2024 15:21
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

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

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_default_terms_conditions
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_default_terms_conditions/it/
Currently translated at 100.0% (10 of 10 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_default_terms_conditions
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_default_terms_conditions/es/
Currently translated at 100.0% (10 of 10 strings)

Translation: purchase-workflow-16.0/purchase-workflow-16.0-purchase_default_terms_conditions
Translate-URL: https://translation.odoo-community.org/projects/purchase-workflow-16-0/purchase-workflow-16-0-purchase_default_terms_conditions/pt_BR/
@HeliconiaSolutions HeliconiaSolutions force-pushed the 18.0-mig-purchase_default_terms_conditions branch from 3960d5c to c86cc99 Compare December 18, 2024 09:51
@HeliconiaSolutions HeliconiaSolutions force-pushed the 18.0-mig-purchase_default_terms_conditions branch from c86cc99 to d9ab146 Compare December 19, 2024 05:03
@HeliconiaSolutions
Copy link
Author

@sebalix , Thank you for your insightful comment, which has helped improve the code. Could you kindly review it again?

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.