Skip to content
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

Conversation

bizzappdev
Copy link
Contributor

No description provided.

grindtildeath and others added 24 commits February 14, 2022 18:13
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"
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 ?
@rafaelbn
Copy link
Member

/ocabot migration sale_order_line_packaging_qty

@OCA-git-bot OCA-git-bot added this to the 15.0 milestone Feb 18, 2022
@usmanfarzandali
Copy link

not working as expected ...

Copy link

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.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Mar 24, 2024
@github-actions github-actions bot closed this Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet