Skip to content

Conversation

@MeritxellAForgeFlow
Copy link
Contributor

Migration to 18.0

@ForgeFlow

yvaucher and others added 30 commits November 21, 2024 10:43
This module extract logic to create multiple procurement group
for a single sale order for grouped sale order lines.
* Fix OCA#264
* Fix : Can't create delivery from shipping exception
* [ADD] [9.0] sale_delivery_block

* [IMP] Add data with an example Delivery Block Reason.

* [FIX]
 * Able to edit the Delivery Block Reason in state 'sent'
 * README

* [FIX] make sale_delivery_block compatible with sale_procurement_group_by_line

* [FIX] travis and data nouptade.

* [ADD] delivery block tests.

* [IMP] Add the 'Default Delivery Block Reason' in partners.

* [IMP] track visibility of delivery block reason

* [9.0][IMP] sale_delivery_block:
  * default_delivery_block is now a comercial field.
  * When duplicating a sale order the delivery block is recomputed.

* [9.0][UPD] sale_delivery_block_proc_group_by_line: Update README.

* [FIX] api.model used with api.constrains
Currently translated at 66.7% (2 of 3 strings)

Translation: sale-workflow-11.0/sale-workflow-11.0-sale_procurement_group_by_line
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-11-0/sale-workflow-11-0-sale_procurement_group_by_line/de/
Currently translated at 100.0% (3 of 3 strings)

Translation: sale-workflow-13.0/sale-workflow-13.0-sale_procurement_group_by_line
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-13-0/sale-workflow-13-0-sale_procurement_group_by_line/es/
…_qty.

This avoids duplicated procurements in some cases, basically for
any operation that has a specific `<sale.order.line>._get_qty_procurement`
relying on `previous_product_uom_qty`. E.g: manufacturing kits,
dropshipping...
…uom_qty

Prevents having duplicated procurements when having several order lines involving any operation that has a specific `<sale.order.line>._get_qty_procurement`
relying on `previous_product_uom_qty` (Manufacturing kits, dropshipping..)
Currently translated at 100.0% (6 of 6 strings)

Translation: sale-workflow-15.0/sale-workflow-15.0-sale_procurement_group_by_line
Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_procurement_group_by_line/ca/
Before the fix, when new quantities are added into an already confirmed
line, we are writing in the previous_product_uom_qty only the new qty that
has been processed, not the total amount that has actually been
processed for the line.

Due to this, when we call super() on _action_launch_stock_rule, the new
quantities are procured again, as we have not really updated the amount
in previous_product_uom_qty including what we have already procured
before calling super().
@MeritxellAForgeFlow MeritxellAForgeFlow force-pushed the 18.0-mig-sale_procurement_group_by_line branch 2 times, most recently from c22bae1 to efd1ae8 Compare November 22, 2024 11:24
@MeritxellAForgeFlow MeritxellAForgeFlow force-pushed the 18.0-mig-sale_procurement_group_by_line branch from efd1ae8 to cac406c Compare November 25, 2024 10:48
@MiquelRForgeFlow MiquelRForgeFlow force-pushed the 18.0-mig-sale_procurement_group_by_line branch 2 times, most recently from e6c97a9 to 9fc802a Compare November 25, 2024 13:10
@MiquelRForgeFlow MiquelRForgeFlow force-pushed the 18.0-mig-sale_procurement_group_by_line branch from 9fc802a to 1c7646d Compare November 25, 2024 13:28
@MiquelRForgeFlow
Copy link
Contributor

Added v17 changes in a separated commit (a forward port of #3428).

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@RicardCForgeFlow
Copy link
Contributor

Hi @rousseldenis, could you check this PR? Thank you very much! 😄

@rousseldenis
Copy link
Contributor

/ocabot migration sale_procurement_group_by_line

@OCA-git-bot OCA-git-bot added this to the 18.0 milestone Dec 6, 2024
line.state != "sale"
or line.order_id.locked
or line.product_id.type not in ("consu", "product")
or line.product_id.type != "consu"
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm wondering if we should test is_storable field

Copy link
Contributor

Choose a reason for hiding this comment

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

Hi @rousseldenis, I see Odoo does this

sale_stock/models/sale_order_line.py#L357

Although is_storable=False implies no inventory tracking, consumable products (type: consu, is_storable: False) may still require provisioning rules.

Do you agree?

Copy link
Member

@rvalyi rvalyi left a comment

Choose a reason for hiding this comment

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

code review LGTM

@rvalyi
Copy link
Member

rvalyi commented Jan 8, 2025

/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-3420-by-rvalyi-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit a0b3172 into OCA:18.0 Jan 8, 2025
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 4acf5aa. Thanks a lot for contributing to OCA. ❤️

@MiquelRForgeFlow MiquelRForgeFlow deleted the 18.0-mig-sale_procurement_group_by_line branch January 13, 2025 10:41
trisdoan pushed a commit to trisdoan/sale-workflow that referenced this pull request Mar 13, 2025
Signed-off-by rvalyi
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.