-
-
Notifications
You must be signed in to change notification settings - Fork 366
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
[MIG] delivery_price_method: Migration to 14.0 #486
Conversation
- Add default price_method called "Carrier obtained price", for being more explicit and avoid user confusions. - Shipment rate: Make it compatible with upstream code tricking the delivery_type field. - Shipping sending: Call upstream carrier sending routine + call standard one, and merge results (excluding the tracking_number). - Tests: * Make them more resilient (fixing the pricelist). * Use SavepointCase for executing setup only once. * Fine tune some code - Improve README
If a user don't have the necessary permissions for writing in the `delivery.carrier` model (like a low range salesman) he won't be able to choose a carrier wich uses the rate shipment override. TT31627
/ocabot migration delivery_price_method |
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.
Works properly
This PR has the |
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.
And please squash both migration commits together.
self.pricelist = self.env["product.pricelist"].create( | ||
{ | ||
"name": "Test pricelist", | ||
"item_ids": [], |
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.
This was populated on purpose. Why are you removing it?
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.
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.
This pricelist is put for avoiding weird behaviors when data pricelist has its currency changed (which happened in the past according to the installed modules). Thus, you should adjust the rest of the test code instead of removing this line.
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.
I think it works properly now, thank you.
abb6b25
to
546c5fc
Compare
[FIX] delivery_price_method: fix test Update delivery_price_method/__manifest__.py Co-authored-by: Pedro M. Baeza <pedro.baeza@tecnativa.com> [FIX] delivery_price_method: test correction
546c5fc
to
4a8d04f
Compare
@@ -58,34 +58,35 @@ def _add_delivery(self): | |||
|
|||
def test_delivery_price_fixed(self): | |||
sale = self.sale | |||
self.pricelist.item_ids[0].write({"fixed_price": 99.99}) |
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.
I still don't understand why is this needed, being the rule to use public price. Shouldn't you put instead this price in the product or see if the pricelist item structure is different?
Superseed by: #518 |
Migration to 14.0