调整必填、增加用户组控制

This commit is contained in:
mgw
2024-03-04 10:58:39 +08:00
parent 806f921ad2
commit 6cbc21cc4e
2 changed files with 25 additions and 5 deletions

View File

@@ -46,11 +46,16 @@
groups="sf_base.group_quality_director"
class="oe_highlight"/>
</xpath>
<xpath expr="//sheet//group//group//field[@name='title']" position="replace">
<field name="title" class="custom_required"/>
<!-- <xpath expr="//sheet//group//group//field[@name='title']" position="replace"> -->
<!-- <field name="title" class="custom_required" required="1"/> -->
<!-- </xpath> -->
<xpath expr="//sheet//group//group//field[@name='title']" position="attributes">
<attribute name="class">custom_required</attribute>
<attribute name="required">1</attribute>
</xpath>
<xpath expr="//sheet//group//group//field[@name='picking_type_ids']" position="attributes">
<attribute name="class">custom_required</attribute>
<attribute name="required">1</attribute>
</xpath>
</field>
</record>
@@ -62,6 +67,7 @@
<field name="arch" type="xml">
<xpath expr="//field[@name='measure_on']" position="attributes">
<attribute name="class">custom_required</attribute>
</xpath>
<xpath expr="//field[@name='measure_frequency_type']" position="attributes">
<attribute name="class">custom_required</attribute>

View File

@@ -55,9 +55,12 @@
<!-- <attribute name="groups">sf_base.group_purchase,sf_base.group_purchase_director</attribute> -->
<button name="action_create_invoice" string="创建账单" type="object" class="oe_highlight" context="{'create_bill':True}" attrs="{'invisible': ['|', ('state', 'not in', ('purchase', 'done')), ('invoice_status', 'in', ('no', 'invoiced'))]}" data-hotkey="w" groups="sf_base.group_purchase,sf_base.group_purchase_director"/>
</xpath>
<xpath expr="//form/header/button[@name='button_confirm']" position="replace">
<!-- <attribute name="groups">sf_base.group_purchase,sf_base.group_purchase_director</attribute> -->
<button name="action_create_invoice" string="创建账单" type="object" class="oe_highlight" context="{'create_bill':True}" attrs="{'invisible': ['|', ('state', 'not in', ('purchase', 'done')), ('invoice_status', 'in', ('no', 'invoiced'))]}" data-hotkey="w" groups="sf_base.group_purchase,sf_base.group_purchase_director"/>
<xpath expr="//form/header/button[@name='action_create_invoice'][2]" position="attributes">
<attribute name="groups">sf_base.group_purchase,sf_base.group_purchase_director</attribute>
</xpath>
<xpath expr="//form/header/button[@name='button_confirm']" position="attributes">
<attribute name="groups">sf_base.group_purchase,sf_base.group_purchase_director</attribute>
<!-- <button name="action_create_invoice" string="创建账单" type="object" class="oe_highlight" context="{'create_bill':True}" attrs="{'invisible': ['|', ('state', 'not in', ('purchase', 'done')), ('invoice_status', 'in', ('no', 'invoiced'))]}" data-hotkey="w" groups="sf_base.group_purchase,sf_base.group_purchase_director"/> -->
</xpath>
<!-- <xpath expr="//form/header/button[@name='action_create_invoice[2]']" position="attributes">-->
<!-- <attribute name="groups">sf_base.group_purchase,sf_base.group_purchase_director</attribute>-->
@@ -122,6 +125,17 @@
</field>
</record>
<record id="purchase_order_kpis_tree_inherit_sf" model="ir.ui.view">
<field name="name">purchase.stock.order.tree.inherit.sf</field>
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase.purchase_order_kpis_tree"/>
<field name="arch" type="xml">
<xpath expr="//tree//header//button[@name='action_create_invoice']" position="attributes">
<attribute name="groups">sf_base.group_purchase,sf_base.group_purchase_director</attribute>
</xpath>
</field>
</record>
<record id="purchase_stock_order_view_form_inherit_sf" model="ir.ui.view">
<field name="name">purchase.stock.order.form.inherit.sf</field>