修改制造模块,使得原生操作按钮只对制造用户可见

This commit is contained in:
mgw
2024-01-17 17:44:10 +08:00
parent a3c8082906
commit 4ab1409b13
4 changed files with 155 additions and 15 deletions

View File

@@ -62,5 +62,16 @@
</field>
</record>
<record id="sf_stock_scrap_form_view" model="ir.ui.view">
<field name="name">sf.stock.scrap.form.view</field>
<field name="model">stock.scrap</field>
<field name="inherit_id" ref="stock.stock_scrap_form_view"/>
<field name="arch" type="xml">
<xpath expr="//header//button[@name='action_validate']" position="replace">
<button name="action_validate" states="draft" string="Validate" type="object" class="oe_highlight" context="{'not_unlink_on_discard': True}" data-hotkey="v" groups="sf_warehouse.group_sf_stock_user"/>
</xpath>
</field>
</record>
</data>
</odoo>