[19.0][MIG] sale_sourced_by_line - #4544
Open
JasminSForgeFlow wants to merge 68 commits into
Open
Conversation
…dule sale_sourced_by_line (/tmp/trunk-generic/ rev 27)
(/tmp/trunk-generic/ rev 29)
(/tmp/trunk-generic/ rev 29.1.20)
(/tmp/trunk-generic/ rev 40.1.6)
- Update travis.yml to 8.0
Now allows to set a warehouse on sale order line Added a test for sale order with multiple warehouses sources
In order to get visibility on https://www.odoo.com/apps the OCA board has decided to add the OCA as author of all the addons maintained as part of the association.
This module extract logic to create multiple procurement group for a single sale order for grouped sale order lines.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-15.0/sale-workflow-15.0-sale_sourced_by_line Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_sourced_by_line/
Currently translated at 50.0% (2 of 4 strings) Translation: sale-workflow-15.0/sale-workflow-15.0-sale_sourced_by_line Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_sourced_by_line/it/
Currently translated at 50.0% (2 of 4 strings) Translation: sale-workflow-15.0/sale-workflow-15.0-sale_sourced_by_line Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-15-0/sale-workflow-15-0-sale_sourced_by_line/it/
Currently translated at 100.0% (4 of 4 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_sourced_by_line Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_sourced_by_line/de/
Currently translated at 100.0% (4 of 4 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_sourced_by_line Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_sourced_by_line/it/
Currently translated at 100.0% (4 of 4 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_sourced_by_line Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_sourced_by_line/es/
Currently translated at 100.0% (4 of 4 strings) Translation: sale-workflow-16.0/sale-workflow-16.0-sale_sourced_by_line Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-16-0/sale-workflow-16-0-sale_sourced_by_line/pt_BR/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-17.0/sale-workflow-17.0-sale_sourced_by_line Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_sourced_by_line/
Currently translated at 100.0% (6 of 6 strings) Translation: sale-workflow-17.0/sale-workflow-17.0-sale_sourced_by_line Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-17-0/sale-workflow-17-0-sale_sourced_by_line/it/
[FIX] pylint error
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: sale-workflow-18.0/sale-workflow-18.0-sale_sourced_by_line Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-18-0/sale-workflow-18-0-sale_sourced_by_line/
Currently translated at 100.0% (4 of 4 strings) Translation: sale-workflow-18.0/sale-workflow-18.0-sale_sourced_by_line Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-18-0/sale-workflow-18-0-sale_sourced_by_line/es/
Currently translated at 100.0% (4 of 4 strings) Translation: sale-workflow-18.0/sale-workflow-18.0-sale_sourced_by_line Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-18-0/sale-workflow-18-0-sale_sourced_by_line/sl/
Contributor
|
Hi @JasminSForgeFlow we have to make this module to depend on sale_stock_reference_by_line and adapt the methods to work like it was with the previous dependency. |
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.
Scope reduced: most of the feature is now in core
Odoo 19
sale_stockalready provides the bulk of what this module used to add:warehouse_idonsale.order.linesale_stock/models/sale_order_line.py(computed, stored)_prepare_procurement_valuespassesself.warehouse_id_get_procurement_group_key()/_prepare_procurement_group_vals()procurement.groupno longer exists in 19.0 (replaced bystock.reference), so there is nothing to overrideWhat remains, and is what this module now does:
sale.order.line.warehouse_iduser-editable (core declares it compute-only, derived from the line routes);_compute_warehouse_idonly recomputes lines where the field is empty;sale.order.warehouse_idas Default Warehouse with its help text.The end-user behaviour is unchanged from 18.0.
Changes
__manifest__.py: version19.0.1.0.0; dependencysale_procurement_group_by_line→sale_stock. The former has no 19.0 branch and its purpose (one procurement group per line) is obsolete now thatprocurement.groupis gone.model/sale.py:sale.order.line.warehouse_idredefined withreadonly=False;_compute_warehouse_id@api.depends:route_id→route_ids, andproduct_packaging_iddropped (product.packagingwas merged intouom.uomin 19.0);readonly=Trueonsale.order.warehouse_id. Core declares that field withprecompute=True, andmodels.create()discards values forprecompute + readonlyfields (odoo/orm/models.py), so keepingreadonly=Truewould silently swallowwarehouse_idpassed at sale order creation. The field stays labelled Default Warehouse.view/sale_view.xml:route_id→route_ids;{'default_warehouse_id': warehouse_id}context onorder_line. It is redundant — core computes and stores the line warehouse from the order — and it would both override core's route-based warehouse resolution and clobber thecontextattribute core sets on that field.tests/: rewritten. No demo data on 19.0, so all fixtures are created insetUpClass; assertions moved from procurement groups to picking count andmove_ids.warehouse_id. Added a test asserting a line-level warehouse survives a change of the order warehouse.@ForgeFlow