[FIX] stock : Stock user should be able to create a picking.
A stock user is not allowed to save a picking. It happens because the picking view use the field show_operations that is a related to stock.picking.type.show_operations. Since stock user do not have right to write on picking type it will fail. This commit add a readonly on show_operation on the picking view (already invisible). With that change the field will not be send to the server and thus not writed.
This commit is contained in:
@@ -213,7 +213,7 @@
|
||||
<button name="action_cancel" states="assigned,confirmed,partially_available,draft,waiting" 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'))]}"/>
|
||||
<field name="show_operations" invisible="1"/>
|
||||
<field name="show_operations" invisible="1" readonly="1"/>
|
||||
<field name="move_line_exist" invisible="1"/>
|
||||
<field name="has_packages" invisible="1"/>
|
||||
<button name="button_scrap" type="object" string="Scrap" attrs="{'invisible': ['|', '&', ('picking_type_code', '!=', 'incoming'), ('state', 'in', ('draft', 'cancel', 'waiting')), '&', ('picking_type_code', '=', 'incoming'), ('state', '!=', 'done')]}"/>
|
||||
@@ -288,7 +288,7 @@
|
||||
<field name="picking_code" invisible="1"/>
|
||||
<field name="product_type" invisible="1"/>
|
||||
<field name="show_details_visible" invisible="1"/>
|
||||
<field name="show_operations" invisible="1"/>
|
||||
<field name="show_operations" invisible="1" readonly="1"/>
|
||||
<field name="additional" invisible="1"/>
|
||||
|
||||
<field name="product_id" required="1" attrs="{'readonly': ['&', ('state', '!=', 'draft'), ('additional', '=', False)]}"/>
|
||||
|
||||
Reference in New Issue
Block a user