[19.0][MIG] sale_procurement_group_by_line: Migrate to 19.0#3947
[19.0][MIG] sale_procurement_group_by_line: Migrate to 19.0#3947OCA-git-bot merged 50 commits intoOCA:19.0from
Conversation
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().
…ing qty in a sales order
|
This PR has the |
|
@JordiMForgeFlow @ivantodorovich How is it looking to you at this point? |
|
LGTM, but in other cases I had to rename a module, the best practice is to rename the entire commit history. Here is how to do it:
|
|
@JordiMForgeFlow That is certainly an option, but it can also be said that the rename is a legitimate part of the module history that takes place now, and is reflected in the module's commit history. Also, the rename of the module directory is only part of the work, and there are field names, file names and external references to consider that cannot easily be rewritten in each commit and will be done in a specific commit. You could consider commits with a rewritten directory name misleading, as they make the history of a module less clear. @pedrobaeza What is considered the best practice when renaming modules? Is it to rewrite the name throughout the git history or do it in a separate renaming commit? |
|
@StefanRijnhart actually it was @pedrobaeza who explained the procedure to me 😆 |
|
When renaming, if the whole commit history is not renamed, then on next version, the rescue procedure will only catch from the migration commit, losing part of the commit history. Thus, the whole renaming is needed IMO. |
|
Anyway, you will need an extra commit with the rest of the work of the renaming (translations, complete XML-IDs where needed, etc). |
|
OK, thanks for clarifying! @Tatider can you apply the git history rewrite? |
|
I am trying, but it is not exactly working with just a copy-paste command... @JordiMForgeFlow are you also sure it should be on top of 18.0 and not 19.0? |
|
@Tatider yes it should be on top of 19.0, I just copied the template command but you should adapt it to what you need. |
08a6281 to
28aa2e8
Compare
28aa2e8 to
4f0c900
Compare
|
@StefanRijnhart @JordiMForgeFlow the history is now rewritten. |
StefanRijnhart
left a comment
There was a problem hiding this comment.
Thanks for all the work! Looking real good.
|
/ocabot merge nobump |
|
This PR looks fantastic, let's merge it! |
|
Congratulations, your PR was merged at 1e4d71f. Thanks a lot for contributing to OCA. ❤️ |
|
Rename added to openupgrade 19 apriori in hbrunn/OpenUpgrade#20 |

_prepare_procurement_valuesbecause "group_id" is no longer an argumentsorigincalculation - no longer an argument of_create_procurementsfunctionstock.move:name- move no longer has name/description fieldP.S. An update of tests was required because in Odoo 19.0, the database by default doesn't have Demo Data