-
-
Notifications
You must be signed in to change notification settings - Fork 982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP][MIG][15.0]sale_order_line_packaging_qty: Migration v15 #1919
Closed
bizzappdev
wants to merge
24
commits into
OCA:15.0
from
bizzappdev:15.0-mig-sale_order_line_packaging_qty-BAD-RUS
Closed
[WIP][MIG][15.0]sale_order_line_packaging_qty: Migration v15 #1919
bizzappdev
wants to merge
24
commits into
OCA:15.0
from
bizzappdev:15.0-mig-sale_order_line_packaging_qty-BAD-RUS
Conversation
This file contains 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
Fixes after review
The inverse method only updates the value when we save the form. The onchange gives a direct feedback. Also add a unit of measure on the qty.
**Context:** We want to be able to only sell by packaging some product (forbidden to sell by unit). Also, we want to choose which packaging is eligible to sell. **Usage** When I encode a sale order line, I must fill up the packaging and related quantity if the product is set as "Only sell by packaging". I cannot enter a quantity in the standard Odoo field quantity that is not a multiple of a sellable packaging (product.packaging can be sold = True). Is the product is not configured as "Only sell by packaging", then I am allowed to fill up a line with no packaging. On every packaging I can chose if it is sellable or not. By default it is. I can chose at product level if i restrict the quantity to sell to existing sellable packaging. **Dev** * Add a check box in product "Only sell by packaging multiple" (default False), aside of "Can be sold" in the header * Add a boolean on the packaging "Can be sold" (default True) * On the list of available packaging in a SO line, only display packaging with "can be sold = True" * When a SO line is encoded *with a product that can only be sold by packaging*: * The quantity field cannot contain a quantity that is not a multiple of a sellable packaging (can be sold = True) -> raise a warning (triggered on the on_change please, not create/write as we still want to be able to save it e.g. in case of an EDI order) -> "The quantity is not a multiple of a defined sellable packaging. Please complete the packaging first." * On create / write method, *if packaging and packaging quantity is empty*, fulfill the info if a multiple of an existing sellable packaging (can be sold = True) is found * e.g. if my product is sold by packaging only and I have packaging of box: 10, Karton: 200, and pallet:1000, if the quantity entered is 400, I expect the system to complete the packaging with Karton and packaging quantity with 2 * e.g. if my product is sold by packaging only and I have packaging of box: 10, Karton: 200, and pallet:1000, if the quantity entered is 420, I expect the system to complete the packaging with box and packaging quantity with 42 * e.g.. if my product is sold by packaging only and I have packaging of box: 10, Karton: 200, and pallet:1000, if the quantity entered is 405, I expect the system to leave it empty * Make the message "You must define a package before setting a quantity of said package." a user warning and not a blocking point AND only raise this warning for product that have "Only sell by packaging multiple = True"
…ackaging" This reverts commit 5eece31.
Currently translated at 100.0% (4 of 4 strings) Translation: sale-workflow-13.0/sale-workflow-13.0-sale_order_line_packaging_qty Translate-URL: https://translation.odoo-community.org/projects/sale-workflow-13-0/sale-workflow-13-0-sale_order_line_packaging_qty/es/
When a quantity is set on the sale order line before or at the same time than the product itself, the onchange triggered will replace the line set quantity with the default size of the package. This is especially problematic for sales order created programmatically. So to improve the solution, if the quantity fits with the package quantity it is kept.
The product_product_packaging_qty on sale.order.line should always be an integer, no ?
/ocabot migration sale_order_line_packaging_qty |
not working as expected ... |
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
github-actions
bot
added
the
stale
PR/Issue without recent activity, it'll be soon closed automatically.
label
Mar 24, 2024
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.
No description provided.