-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
16.0 mig sale by packaging #2622
Closed
nilshamerlinck
wants to merge
48
commits into
OCA:16.0
from
nilshamerlinck:16.0-mig-sale_by_packaging
Closed
16.0 mig sale by packaging #2622
nilshamerlinck
wants to merge
48
commits into
OCA:16.0
from
nilshamerlinck:16.0-mig-sale_by_packaging
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
The functions of this module were first added into sale_order_line_packaging_qty. After sorting out and extracting the different functions in multiple modules in the previous commits, this one gets it all together in a single module. Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Following warning is shown at runtime: WARNING odoodb_test odoo.models: method product.template._check_sell_only_by_packaging_can_be_sold_packaging_ids: @constrains parameter 'packaging_ids.can_be_sold' is not a field name Only fields of the current model can be used in a constrains. Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
…g SO line create/update Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
The automatic assignation of a packaging and packaging quantity was done only for product to `only_sell_by_packaging` But if possible it should also be done for other products. Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
When a product must be sold by packaging do not allow for a packaging qantity at zero or negative. Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
When the uom quantity of a sale order line is changed for a value that is not a multiple of possible packaging. The packaging and the packaging quantity must be reset to an empty value Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
This is taken from OCA@290aed9 Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
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. Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
The test was calling the onchanges manually to test their result, but as some onchanges must be called in cascade to have a correct result, the test tells more about itself, if it calls the onchanges in the correct order or not. Using Form will test them correctly in cascade automatically. Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
This feature was problematic because for order created programatically By changing the packaging on product change the quantity ordered would also change. The correct packaging will be set on save. And if not possible an error will be raised by a constraint. Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Before this change the packaging was always overridden hence the user had not control on the packaging to be used on SO line. Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
When the product_uom_qty is computed from inverse method of packaging qty the packaging is already there and there's no need to auto-assign. This also prevents skipping direct writes on prod uom qty or other keys other than product_packaging. Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
This check is already done by core sale module. Tests where not checkingt for that specific exception. Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
This change allows to be more specific on which product.packaging can be sold or not. By default the value from the product.packaging.type is used. But it is editable afterwards, with this change. Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
The product_product_packaging_qty on sale.order.line should always be an integer, no ? Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
The dependency product_packaging_type was renamed to product_packaging_level. Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
Signed-off-by: Carmen Bianca BAKKER <carmen@coopiteasy.be>
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.