Skip to content

[18.0][MIG] delivery_carrier_pricelist: Migration to 18.0#920

Merged
OCA-git-bot merged 16 commits intoOCA:18.0from
chaule97:18.0-mig-delivery_carrier_pricelist
Dec 31, 2024
Merged

[18.0][MIG] delivery_carrier_pricelist: Migration to 18.0#920
OCA-git-bot merged 16 commits intoOCA:18.0from
chaule97:18.0-mig-delivery_carrier_pricelist

Conversation

@chaule97
Copy link
Contributor

@chaule97 chaule97 commented Dec 25, 2024

  • Since the current delivery module depends on sale instead of sale_stock, I need to update the delivery_carrier_pricelist module to depend on stock_delivery instead of delivery.

Guewen Baconnier and others added 15 commits December 24, 2024 15:38
New module allowing to compute a delivery cost based on the sales order
pricelist.

Most of the code of the module is to update the many 'attrs' of the
'delivery' module which have domains based on the "delivery_type" field
and cannot be extended in XML without breaking compatibility.

When using an external provider (such as DHL, UPS), the "Pricelist"
provider cannot be used. In this case, the invoice policy, which is by
default "Estimate" or "Real" has a third option "Pricelist Cost". This
option would not make sense with "Estimate" or "Real", which is why this
field is used.
Previous implementation was writing _every_ time on the carrier for _every_ price compute request.
This was causing many write conflicts.
Currently translated at 100.0% (12 of 12 strings)

Translation: delivery-carrier-14.0/delivery-carrier-14.0-delivery_carrier_pricelist
Translate-URL: https://translation.odoo-community.org/projects/delivery-carrier-14-0/delivery-carrier-14-0-delivery_carrier_pricelist/es/
@chaule97 chaule97 closed this Dec 25, 2024
@chaule97 chaule97 reopened this Dec 25, 2024
@chaule97 chaule97 marked this pull request as draft December 25, 2024 11:29
@chaule97 chaule97 changed the title [18.0][MIG] delivery_package_fee: Migration to 18.0 [18.0][MIG] delivery_carrier_pricelist: Migration to 18.0 Dec 25, 2024
@chaule97 chaule97 force-pushed the 18.0-mig-delivery_carrier_pricelist branch 3 times, most recently from 311f11b to 6bff3f5 Compare December 27, 2024 05:12
@chaule97 chaule97 marked this pull request as ready for review December 27, 2024 05:13
Copy link
Contributor

@jbaudoux jbaudoux left a comment

Choose a reason for hiding this comment

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

Some rewording

# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Shipping Method Pricelist",
"summary": "Compute method method fees based on the product's pricelist.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"summary": "Compute method method fees based on the product's pricelist.",
"summary": "Compute delivery method price based on the product's pricelist.",

@@ -0,0 +1,13 @@
Compute shipping methods fees based on Product Pricelists.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Compute shipping methods fees based on Product Pricelists.
Compute the delivery method price based on its related delivery product price according to the sales order pricelist.

Compute shipping methods fees based on Product Pricelists.

It allows to have different pricing per customer, prices depending on
dates, ... The pricelist based cost is computed from the shipping
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
dates, ... The pricelist based cost is computed from the shipping
dates, ... The pricelist based cost is computed from the delivery

Comment on lines 15 to 24
selection_add=[("pricelist", "Pricelist Cost")],
ondelete={"pricelist": "set default"},
help="Estimated Cost: the customer will be invoiced the estimated"
" cost of the shipping.\n"
"Real Cost: the customer will be invoiced the real cost of the"
" shipping, the cost of the shipping will be updated on the"
" SO after the delivery.\n"
"Pricelist Cost: the customer will be invoiced the price of the "
"product based on the pricelist of the sales order. The provider's "
"cost is ignored.",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
selection_add=[("pricelist", "Pricelist Cost")],
ondelete={"pricelist": "set default"},
help="Estimated Cost: the customer will be invoiced the estimated"
" cost of the shipping.\n"
"Real Cost: the customer will be invoiced the real cost of the"
" shipping, the cost of the shipping will be updated on the"
" SO after the delivery.\n"
"Pricelist Cost: the customer will be invoiced the price of the "
"product based on the pricelist of the sales order. The provider's "
"cost is ignored.",
selection_add=[("pricelist", "Delivery Product Price")],
ondelete={"pricelist": "set default"},
help="Estimated Cost: the customer will be invoiced the estimated"
" cost of the shipping.\n"
"Real Cost: the customer will be invoiced the real cost of the"
" shipping, the cost of the shipping will be updated on the"
" SO after the delivery.\n"
"Delivery Product Price: the customer will be invoiced the price of the "
"related delivery product based on the pricelist of the sales order. The provider's "
"cost is ignored.",

# Copyright 2020 Camptocamp
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Shipping Method Pricelist",
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"name": "Shipping Method Pricelist",
"name": "Delivery Method Pricelist",

@chaule97 chaule97 force-pushed the 18.0-mig-delivery_carrier_pricelist branch from 6bff3f5 to 3868e22 Compare December 31, 2024 02:09
@chaule97 chaule97 requested a review from jbaudoux December 31, 2024 02:12
@jbaudoux
Copy link
Contributor

/ocabot migration delivery_carrier_pricelist

@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
42 tasks
@jbaudoux
Copy link
Contributor

/ocabot merge nobump

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 18.0-ocabot-merge-pr-920-by-jbaudoux-bump-nobump, awaiting test results.

OCA-git-bot added a commit that referenced this pull request Dec 31, 2024
Signed-off-by jbaudoux
@OCA-git-bot
Copy link
Contributor

It looks like something changed on 18.0 in the meantime.
Let me try again (no action is required from you).
Prepared branch 18.0-ocabot-merge-pr-920-by-jbaudoux-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit d9049f6 into OCA:18.0 Dec 31, 2024
4 of 6 checks passed
@OCA-git-bot
Copy link
Contributor

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

10 participants