-
- Downloads
[FIX] purchase: fix state of extra product
As explained in issues-59664, the commit
f18bdc4fcf2b6b0bdb7699c3b2aa38d332301a84 add
readonly attribute in the `purchase.order.line` state field
to avoid to save bad `state` in the server (then the state of the
PO line != PO line).
But it breaks the feature to add product
when the PO is already confirm (the state will be 'purchase' and the
`product_id` is readonly when state == 'purchase').
To fix both issues, add a `default_state` in the context.
It will "bypass" the attrs of `product_id` and the state of PO
('draft') line won't be save because it is readonly.
resolve #59664
closes odoo/odoo#59720
closes odoo/odoo#58966
Signed-off-by:
Arnold Moyaux <amoyaux@users.noreply.github.com>
Loading
Please register or sign in to comment