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] delivery_carrier_warehouse: Migration to 18.0 #963

Merged
merged 24 commits into from
Dec 31, 2024

Conversation

chaule97
Copy link

  • Since the delivery module in version 15.0 depends on sale instead of sale_stock, I need to update the delivery_carrier_warehouse module to depend on stock_delivery instead of delivery.

grindtildeath and others added 23 commits December 23, 2024 15:46
Currently translated at 100.0% (7 of 7 strings)

Translation: wms-14.0/wms-14.0-delivery_carrier_warehouse
Translate-URL: https://translation.odoo-community.org/projects/wms-14-0/wms-14-0-delivery_carrier_warehouse/es_AR/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: wms-15.0/wms-15.0-delivery_carrier_warehouse
Translate-URL: https://translation.odoo-community.org/projects/wms-15-0/wms-15-0-delivery_carrier_warehouse/
Currently translated at 100.0% (4 of 4 strings)

Translation: wms-16.0/wms-16.0-delivery_carrier_warehouse
Translate-URL: https://translation.odoo-community.org/projects/wms-16-0/wms-16-0-delivery_carrier_warehouse/it/
delivery_carrier_id = fields.Many2one(
"delivery.carrier",
string="Delivery Method",
help="Default delivery method used in sales orders. Will be applied "

Choose a reason for hiding this comment

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

Could you add check_company=True here?

<field name="partner_id" position="after">
<field
name="delivery_carrier_id"
domain="[('company_id', 'in', (False, company_id))]"

Choose a reason for hiding this comment

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

Normally, if you use check_company=True on the field attribute, the domain is automatically set by the ORM

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 your knowledges

@chaule97 chaule97 force-pushed the 18.0-mig-delivery_carrier_warehouse branch from 56a5456 to 9de6366 Compare December 25, 2024 02:40
Comment on lines 3 to 8
from odoo.tests.common import Form, TransactionCase
from odoo.tests import Form

from odoo.addons.base.tests.common import BaseCommon

class TestSaleDeliveryCarrierPreference(TransactionCase):

class TestSaleDeliveryCarrierPreference(BaseCommon):
Copy link
Contributor

Choose a reason for hiding this comment

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

Why you changed TransactionCase to BaseCommon ?

The class name TestSaleDeliveryCarrierPreference looks like a wrong copy/paste

Copy link
Author

Choose a reason for hiding this comment

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

Why you changed TransactionCase to BaseCommon ?

BaseCommon inherrite TransactionCase, and we don't need to write cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True))

@chaule97 chaule97 force-pushed the 18.0-mig-delivery_carrier_warehouse branch from 9de6366 to b40b1f9 Compare December 31, 2024 10:34
@jbaudoux
Copy link
Contributor

/ocabot migration delivery_carrier_warehouse

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Dec 31, 2024
@OCA-git-bot OCA-git-bot mentioned this pull request Dec 31, 2024
3 tasks
@jbaudoux
Copy link
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 18.0-ocabot-merge-pr-963-by-jbaudoux-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 93eecd0 into OCA:18.0 Dec 31, 2024
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 21e0aea. 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.