修复仓储岗位权限遗留问题

This commit is contained in:
mgw
2024-05-18 10:29:02 +08:00
parent 305e91e7f1
commit a4b2d5bb42
7 changed files with 129 additions and 113 deletions

View File

@@ -91,28 +91,28 @@
<xpath expr="//form//header//button[@name='action_cancel']" position="replace">
<button name="action_cancel"
attrs="{'invisible': [('state', 'not in', ('assigned', 'confirmed', 'draft', 'waiting'))]}"
string="取消" groups="sf_warehouse.group_sf_stock_user" type="object" data-hotkey="z"/>
string="取消" groups="sf_base.group_sf_stock_user" type="object" data-hotkey="z"/>
</xpath>
<xpath expr="//form//header//button[@name='do_unreserve']" position="replace">
<button name="do_unreserve" string="取消保留" groups="sf_warehouse.group_sf_stock_user"
<button name="do_unreserve" string="取消保留" groups="sf_base.group_sf_stock_user"
type="object"
attrs="{'invisible': ['|', '|', '|', ('picking_type_code', '=', 'incoming'), ('immediate_transfer', '=', True), '&amp;', ('state', '!=', 'assigned'), ('move_type', '!=', 'one'), '&amp;', ('state', 'not in', ('assigned', 'confirmed')), ('move_type', '=', 'one')]}"
data-hotkey="w"/>
</xpath>
<xpath expr="//form//header//button[@name='button_scrap']" position="replace">
<button name="button_scrap" groups="sf_warehouse.group_sf_stock_user" type="object" string="报废"
<button name="button_scrap" groups="sf_base.group_sf_stock_user" type="object" string="报废"
attrs="{'invisible': ['|', '&amp;', ('picking_type_code', '=', 'incoming'), ('state', '!=', 'done'), '&amp;', ('picking_type_code', '=', 'outgoing'), ('state', '=', 'done')]}"
data-hotkey="y"/>
</xpath>
<xpath expr="//form//header//button[@name='action_assign']" position="replace">
<button name="action_assign" attrs="{'invisible': [('show_check_availability', '=', False)]}"
string="检查可用量" type="object" class="oe_highlight"
groups="sf_warehouse.group_sf_stock_user" data-hotkey="q"/>
groups="sf_base.group_sf_stock_user" data-hotkey="q"/>
</xpath>
<xpath expr="//form//header//button[@name='%(stock.act_stock_return_picking)d']" position="replace">
<button name="%(stock.act_stock_return_picking)d" string="退回"
attrs="{'invisible': [('state', '!=', 'done')]}" type="action"
groups="sf_warehouse.group_sf_stock_user" data-hotkey="k"/>
groups="sf_base.group_sf_stock_user" data-hotkey="k"/>
</xpath>
<!-- <xpath expr="//form//sheet//notebook//page//field[@name='move_ids_without_package']" position="before"> -->
@@ -131,7 +131,7 @@
<xpath expr="//header//button[@name='action_validate']" position="replace">
<button name="action_validate" states="draft" string="确认" type="object" class="oe_highlight"
context="{'not_unlink_on_discard': True}" data-hotkey="v"
groups="sf_warehouse.group_sf_stock_user"/>
groups="sf_base.group_sf_stock_user"/>
</xpath>
</field>
</record>
@@ -143,11 +143,11 @@
<field name="arch" type="xml">
<xpath expr="//header//button[@name='do_unreserve']" position="replace">
<button name="do_unreserve" type="object" string="取消保留"
groups="sf_warehouse.group_sf_stock_user"/>
groups="sf_base.group_sf_stock_user"/>
</xpath>
<xpath expr="//header//button[@name='action_assign']" position="replace">
<button name="action_assign" type="object" string="检查可用量"
groups="sf_warehouse.group_sf_stock_user"/>
groups="sf_base.group_sf_stock_user"/>
</xpath>
</field>
</record>

View File

@@ -72,7 +72,7 @@
parent="stock.menu_warehouse_config"
sequence="19"
action="sf_shelf_action"
groups="sf_warehouse.group_sf_stock_user"/>
groups="sf_base.group_sf_stock_user"/>
<record id="view_shelf_location_tree" model="ir.ui.view">
@@ -87,7 +87,7 @@
<!-- options="{'classes': {'unchecked':'warning','checked': 'success'}}"/>-->
<!-- <button name="action_check" string="审核" type="object"-->
<!-- attrs="{'invisible': [('check_state','=', 'enable')]}"-->
<!-- groups="sf_warehouse.group_sf_stock_manager"-->
<!-- groups="sf_base.group_sf_stock_manager"-->
<!-- class="oe_highlight"/>-->
</tree>
</field>
@@ -282,7 +282,7 @@
<menuitem id="shelf_location_kanban_menu" name="货位看板" parent="stock.menu_stock_root"
sequence="51"
action="shelf_location_kanban_action_id"
groups="sf_warehouse.group_sf_stock_user"/>
groups="sf_base.group_sf_stock_user"/>
<record id="action_sf_shelf_location" model="ir.actions.act_window">
<field name="name">货位</field>
@@ -311,7 +311,7 @@
<menuitem id="menu_sf_shelf_location" name="货位" parent="stock.menu_warehouse_config"
sequence="20"
action="action_sf_shelf_location"
groups="sf_warehouse.group_sf_stock_user"/>
groups="sf_base.group_sf_stock_user"/>
</data>