Skip to content

[18.0] [MIG] sale_blanket_order: migration to 18.0#3892

Closed
mdurepos wants to merge 55 commits intoOCA:18.0from
bemade:18.0-mig-sale_blanket_order
Closed

[18.0] [MIG] sale_blanket_order: migration to 18.0#3892
mdurepos wants to merge 55 commits intoOCA:18.0from
bemade:18.0-mig-sale_blanket_order

Conversation

@mdurepos
Copy link
Copy Markdown

- 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).

andreparames and others added 30 commits September 11, 2025 09:19
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/
* 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.
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/
ClementChaumienneC2C and others added 23 commits September 11, 2025 09:32
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/
@mdurepos mdurepos force-pushed the 18.0-mig-sale_blanket_order branch from f65390d to b428c5e Compare September 11, 2025 15:05
    - 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).
@mdurepos mdurepos force-pushed the 18.0-mig-sale_blanket_order branch from b428c5e to fad7622 Compare September 11, 2025 15:18
@sbidoul
Copy link
Copy Markdown
Member

sbidoul commented Sep 11, 2025

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.

@mdurepos
Copy link
Copy Markdown
Author

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.

:( 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.

@rousseldenis
Copy link
Copy Markdown
Contributor

So, closing this in favor of #3370

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.