[18.0] [MIG] sale_blanket_order: migration to 18.0#3892
Closed
[18.0] [MIG] sale_blanket_order: migration to 18.0#3892
Conversation
mdurepos
commented
Sep 11, 2025
When duplicating a confirmed blanket order, the new copy shouldn't keep the state nor the sequence number (name).
Steps to reproduce: * create and confirm a blanket order (BO) with (product A, qty 30) and (product B, qty 20) * from the BO create a SO with (product A, qty 10) and (product B, qty 10) * from the BO create a SO with (product A, qty 20) and (product B, qty 0) * from the BO create another SO with (product B, qty 10) Current behavior: It raises the exception "The sale has already been completed.". Expected behavior: No exception is raised.
Currently translated at 7.1% (11 of 154 strings) Translation: sale-workflow-12.0/sale-workflow-12.0-sale_blanket_order Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-12-0/sale-workflow-12-0-sale_blanket_order/de/
exactly like in sales orders.
* Allow to select an analitic account in the blanket order. It will be passed on to the SO. * Allow to select analytic tags on blanket order lines. They will be passed to the SO lines. * Source document was not being filled in SO created from a blanket order.
…dy set Otherwise use case same as that one written in https://github.com/OCA/sale-workflow/blob/14.0/sale_shipping_info_helper/tests/test_sale_shipping_info_helper.py#L22 fails See https://app.travis-ci.com/github/OCA/sale-workflow/jobs/555432793#L3103-L3107 as reference
Currently translated at 100.0% (161 of 161 strings) Translation: sale-workflow-15.0/sale-workflow-15.0-sale_blanket_order Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_blanket_order/fr_FR/
Currently translated at 100.0% (162 of 162 strings) Translation: sale-workflow-15.0/sale-workflow-15.0-sale_blanket_order Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_blanket_order/fr_FR/
Currently translated at 100.0% (172 of 172 strings) Translation: sale-workflow-15.0/sale-workflow-15.0-sale_blanket_order Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_blanket_order/fr_FR/
Currently translated at 100.0% (172 of 172 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_blanket_order Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_blanket_order/es/
Currently translated at 100.0% (170 of 170 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_blanket_order Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_blanket_order/it/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-17.0/sale-workflow-17.0-sale_blanket_order Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_blanket_order/
Currently translated at 100.0% (169 of 169 strings) Translation: sale-workflow-17.0/sale-workflow-17.0-sale_blanket_order Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_blanket_order/it/
Currently translated at 100.0% (171 of 171 strings) Translation: sale-workflow-17.0/sale-workflow-17.0-sale_blanket_order Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_blanket_order/it/
Currently translated at 100.0% (171 of 171 strings) Translation: sale-workflow-17.0/sale-workflow-17.0-sale_blanket_order Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_blanket_order/it/
**Before this commit** When adding a product on a sale blanket order line, all the taxes of the product from all accessible companies were added to the blanket order line. **After this commit** When adding a product on a sale blanket order line, only the taxes of the product from the company on the blanket order are added to the blanket order line. This mimics the treatment of taxes on sale order lines when adding a new product. Also, some field and view attributes were updated in analogy to sale.order.line.
Currently translated at 100.0% (171 of 171 strings) Translation: sale-workflow-17.0/sale-workflow-17.0-sale_blanket_order Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_blanket_order/it/
Currently translated at 100.0% (171 of 171 strings) Translation: sale-workflow-17.0/sale-workflow-17.0-sale_blanket_order Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_blanket_order/it/
f65390d to
b428c5e
Compare
- Replace `analytic_account_id` on `blanket.order.line` by using the new
`analitic.mixin` from Odoo 18.0.
- In `_get_display_price`, fall back to simply using price calculation from
`product.pricelist`, triggered by the fact that `product.pricelist` no longer
has a `discount_policy` field.
- Removed `_get_real_price_currency` method as it is now dead code.
- Removed logic in report template for conditionally including/excluding
taxes from line subtotals
(`account.group_show_line_subtotals_tax_excluded` no longer exists).
b428c5e to
fad7622
Compare
Member
|
Coming here from the post on discord. See also #3370 which seems to do the same, as well the oca/sale-blanket repo which is probably where the energy will be going forward. |
Author
:( thanks, Stéphane. Don't know how I missed that PR when I searched for it before doing this. Will leave this here for now as I haven't had time to look at the other PR or sale-blanket, but all good if this gets closed. |
Contributor
|
So, closing this in favor of #3370 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.