OCA / product-pack

Odoo modules related to product packs
GNU Affero General Public License v3.0
45 stars 126 forks source link

[sale_product_pack] can't update quantity when sale is not draft #20

Closed hparfr closed 4 years ago

hparfr commented 4 years ago

With module sale_product_pack

In a sale order with state = draft, when you change the ordered quantity of the parent product, the child product is updated.

But, when sale is confirmed, updating the ordered quantity of the parent product do not update the child product anymore.

@ernestotejeda What is the reason for this behavior ? https://github.com/OCA/product-pack/blame/12.0/sale_product_pack/models/sale_order_line.py#L42

pedrobaeza commented 4 years ago

No specific reason except historic ones... Can you PR with this taking into account all possibilities.

hparfr commented 4 years ago

It's ok for you if I just just remove the state == 'draft' from the condition ?

pedrobaeza commented 4 years ago

Not sure if that's enough. It would be good to add tests for all that part that everything fits.