Skip to content

Commit

Permalink
[FIX] stock: unreserve
Browse files Browse the repository at this point in the history
- Create a SO with 2 stockable products: 1 is available, the other is
  not.
- Validate, go to the picking
- Set the 'Shipping Policy' to 'When all products are ready'

The 'Unreserve' button disappears, while some products were reserved.

When changing the shipping policy, the state of the picking is
recomputed and set as `confirmed` ('Waiting').

We make the button visible in this state also, when 'Shipping Policy'
is set to 'When all products are ready'.

opw-1932658

closes odoo#30635
  • Loading branch information
nim-odoo committed Jan 29, 2019
1 parent c2d8397 commit ae88e50
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion addons/stock/views/stock_picking_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
<button name="%(act_stock_return_picking)d" string="Return" attrs="{'invisible': ['|', ('state', '!=', 'done'), ('is_locked', '=', False)]}" type="action" groups="base.group_user"/>
<button name="action_cancel" attrs="{'invisible': ['|', ('state', 'not in', ('assigned', 'confirmed', 'partially_available', 'draft', 'waiting')), ('is_locked', '=', False)]}" string="Cancel" groups="base.group_user" type="object"/>
<field name="picking_type_code" invisible="1"/>
<button name="do_unreserve" string="Unreserve" groups="base.group_user" type="object" attrs="{'invisible': ['|', '|', ('picking_type_code', '=', 'incoming'), ('state', 'not in', ('assigned', 'partially_available')), ('is_locked', '=', False)]}"/>
<button name="do_unreserve" string="Unreserve" groups="base.group_user" type="object" attrs="{'invisible': ['|', '|', '|', ('picking_type_code', '=', 'incoming'), ('is_locked', '=', False), '&amp;', ('state', 'not in', ('assigned', 'partially_available')), ('move_type', '!=', 'one'), '&amp;', ('state', 'not in', ('assigned', 'partially_available', 'confirmed')), ('move_type', '=', 'one')]}"/>
<field name="show_operations" invisible="1" readonly="1"/>
<field name="move_line_exist" invisible="1"/>
<field name="has_packages" invisible="1"/>
Expand Down

0 comments on commit ae88e50

Please sign in to comment.