-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
[13.0] Add delivery_carrier_pricelist #279
[13.0] Add delivery_carrier_pricelist #279
Conversation
I think this should be integrated with the existing 12.0 module |
Thanks @pedrobaeza, the field
As forcing a price from a fixed price, from rules or a pricelist on providers doesn't make sense with either "estimate" or "real", I think it makes sense to add new options in "invoice policy" rather than adding a new field. So |
Thanks for the pointer, @guewen, I didn't know that new option. I have being toying with it in the enterprise runbot (where there are more providers), and that field seems to be not optimal for adding the pricelist as it's not shown unless you select a provider different from fixed price or based on rules, so you can't use pricelists unless you have one of that providers and select it (which seems cumbersome). About deprecating What do you think? |
Which is why I added a "pricelist" provider: When an external provider is used, as you can't anymore select a fixed price/rule/pricelist cost, the option is moved to the "Invoicing Policy" (the issue really comes from odoo that mixes the providers with how we compute the prices...). We put a lot of thoughts with @jgrandguillaume to find the least bad solution. We considered adding a new field (alike the
Indeed, my phrasing was not correct. The field "pricing_method" could be deprecated. But the module could still be needed to add the options for fixed prices or rules in the providers invoicing policies. That being said, I'm not sure we want to merge the "pricelist feature" with the one adding the support of fixed and rules prices for external providers, because:
I can imagine that we in many scenarios, we only want 1. |
Note that it would be easy for me to add these 2 possibilities in my current module... let me know what you think. |
The problem I see putting pricelist as a provider is that you can't use pricelists then with a real provider (like SEUR, DHL, etc), and that can be interesting IMO. That's why I told you about the other module that separates the provider from the pricing method. Standard messes up this definitively, and each version includes improvements, but without fine-graining it. What you can do? Show always the When migrating
That way, both can be compatible (taking one path or the other). |
I think I should be missing your point, because it's exactly what I explain having solved using the "Invoice Policy".
No, it doesn't make sense to have the options "estimate" and "real" for fixed price and rules based. Also, if we have the "fixed price" and "rules price" as a provider, it makes sense to have the "pricelist price" as a provider too.
We considered this with @jgrandguillaume, but discarded it because using pricelists never makes sense with a fixed price (well, kind of, or it should hide the fixed amount field anyway) or rule based, it only makes sense "as a provider" by itself or when using an external service such as DHL. And in the latter case, it doesn't make sense to use an "estimate" or "real" invoicing policy, so it really IS a third option to "invoice policy" when using an external service.
But then the options of "invoice policy" doesn't make sense anymore when you select "fixed" or "rule based" in |
What I'm saying here is that you can need simultaneously:
Putting the pricelist as provider, you are losing the first possibility.
I think it still makes sense, as you can estimate on order, where you can have approximate variables for computing the price (like volume, weight, etc), or make it real and recompute when validating the picking, where you have put exact data for that computation. |
But I put it both as a provider and as invoicing policy! I would need to put it both as a provider and as a "price_method", the same way you have "fixed" both in providers and "price_method"! I need it as provider in any case...
For the pricelist, it doesn't |
And that's not the behavior of the invoice policy |
OK, I think I don't know enough v13 yet. Proceed as you think it's the best. |
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.
f8a17b1
to
498fde6
Compare
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.
LG
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.
LG, and is working on prod since a long time.
/ocabot merge nobump |
On my way to merge this fine PR! |
Congratulations, your PR was merged at f67ac02. Thanks a lot for contributing to OCA. ❤️ |
New module allowing to compute a delivery cost based on the sales order
pricelist.
It allows to have different pricing per customer, prices depending on dates, ...
The pricelist based cost is computed from the shipping method's product and the
sales order's pricelist.
It supports the following use cases:
"Based on Product Pricelist" is available.
selection, named "Pricelist Cost", overrides the provider's cost by the
pricelist based cost.