优化客户,供应商.销售订单和采购订单权限需求

This commit is contained in:
jinling.yang
2023-12-25 11:05:56 +08:00
parent 93ce482d40
commit 2fd8483a52
7 changed files with 105 additions and 47 deletions

View File

@@ -7,67 +7,121 @@
<field name="inherit_id" ref="purchase.purchase_order_form"/>
<field name="arch" type="xml">
<field name="currency_id" position="after">
<field name="check_status"/>
<field name="state"/>
<field name="check_status" invisible="1"/>
<!-- <field name="state"/>-->
<field name="remark"/>
</field>
<xpath expr="//form/header/button[@name='action_rfq_send'][1]" position="after">
<button name="sf_sale.action_purchase_order_check_wizard" string="审核" type="action"
context="{'default_order_id':active_id}" groups="sf_base.group_purchase_director"
attrs="{'invisible': ['&amp;',('check_status','in', ['approved']),('state', 'in', ['draft','send'])]}"
attrs="{'invisible': ['&amp;',('check_status','in', ['approved']),('state', 'in', ['draft','send','purchase'])]}"
class="oe_highlight"/>
</xpath>
<xpath expr="//form/header/button[@name='button_confirm'][2]" position="replace">
<button name="button_confirm" type="object" context="{'validate_analytic': True}"
string="确认订单" id="draft_confirm"
attrs="{'invisible': ['&amp;',('check_status','in', ['approved',False,'fail']),('state', 'in', ['draft'])]}"
attrs="{'invisible': ['|','&amp;',('check_status','in', ['approved','fail']),('state', 'in', ['draft','purchase']),('check_status','=',False ),('state', 'in', ['purchase'])]}"
/>
</xpath>
<!-- <xpath expr="//form/header/button[@name='button_confirm[2]']" position="after">-->
<!-- <field name="check_status" invisible="1"/>-->
<!-- <button name="action_check" string="审核" type="object"-->
<!-- attrs="{'invisible': [('check_status','=', 'checked')]}"-->
<!-- class="oe_highlight"/>-->
<!-- </xpath>-->
<!-- <xpath expr="//form/header/button[@name='action_rfq_send[1]']" position="attributes">-->
<!-- <attribute name="groups">sf_base.group_purchase</attribute>-->
<!-- <attribute name="groups">sf_base.group_purchase,sf_base.group_purchase_director</attribute>-->
<!-- </xpath>-->
<!-- <xpath expr="//form/header/button[@name='action_rfq_send[2]']" position="attributes">-->
<!-- <attribute name="groups">sf_base.group_purchase</attribute>-->
<!-- <attribute name="groups">sf_base.group_purchase,sf_base.group_purchase_director</attribute>-->
<!-- </xpath>-->
<!-- <xpath expr="//form/header/button[@name='print_quotation[1]']" position="attributes">-->
<!-- <attribute name="groups">sf_base.group_purchase</attribute>-->
<!-- <attribute name="groups">sf_base.group_purchase,sf_base.group_purchase_director</attribute>-->
<!-- </xpath>-->
<!-- <xpath expr="//form/header/button[@name='print_quotation[2]']" position="attributes">-->
<!-- <attribute name="groups">sf_base.group_purchase</attribute>-->
<!-- </xpath>-->
<xpath expr="//form/header/button[@name='button_approve']" position="attributes">
<attribute name="groups">sf_base.group_purchase</attribute>
<attribute name="groups">sf_base.group_purchase,sf_base.group_purchase_director</attribute>
</xpath>
<!-- <xpath expr="//form/header/button[@name='action_create_invoice[1]']" position="attributes">-->
<!-- <attribute name="groups">sf_base.group_purchase</attribute>-->
<!-- <attribute name="groups">sf_base.group_purchase,sf_base.group_purchase_director</attribute>-->
<!-- </xpath>-->
<!-- <xpath expr="//form/header/button[@name='action_create_invoice[2]']" position="attributes">-->
<!-- <attribute name="groups">sf_base.group_purchase</attribute>-->
<!-- <attribute name="groups">sf_base.group_purchase,sf_base.group_purchase_director</attribute>-->
<!-- </xpath>-->
<xpath expr="//form/header/button[@name='confirm_reminder_mail']" position="attributes">
<attribute name="groups">sf_base.group_purchase</attribute>
<attribute name="groups">sf_base.group_purchase,sf_base.group_purchase_director</attribute>
</xpath>
<xpath expr="//form/header/button[@name='button_draft']" position="attributes">
<attribute name="groups">sf_base.group_purchase</attribute>
<attribute name="groups">sf_base.group_purchase,sf_base.group_purchase_director</attribute>
</xpath>
<xpath expr="//form/header/button[@name='button_cancel']" position="attributes">
<attribute name="groups">sf_base.group_purchase</attribute>
<attribute name="groups">sf_base.group_purchase,sf_base.group_purchase_director</attribute>
</xpath>
<xpath expr="//form/header/button[@name='button_unlock']" position="attributes">
<attribute name="groups">sf_base.group_purchase</attribute>
<attribute name="groups">sf_base.group_purchase,sf_base.group_purchase_director</attribute>
</xpath>
<xpath expr="//form/header/button[@name='button_done']" position="attributes">
<attribute name="groups">sf_base.group_purchase</attribute>
<attribute name="groups">sf_base.group_purchase,sf_base.group_purchase_director</attribute>
</xpath>
<xpath expr="//field[@name='order_line']" position="attributes">
<attribute name="attrs">{'readonly': ['&amp;',('state', 'in', ['purchase']),('check_status','in',
['approved'])]}
</attribute>
</xpath>
<field name="partner_ref" position="attributes">
<attribute name="attrs">{'readonly': ['&amp;',('state', 'in', ['purchase']),('check_status','in',
['approved'])]}
</attribute>
</field>
<field name="date_planned" position="attributes">
<attribute name="attrs">{'readonly': ['&amp;',('state', 'in', ['purchase']),('check_status','in',
['approved'])]}
</attribute>
</field>
<field name="receipt_reminder_email" position="attributes">
<attribute name="attrs">{'readonly': ['&amp;',('state', 'in', ['purchase']),('check_status','in',
['approved'])]}
</attribute>
</field>
<field name="user_id" position="attributes">
<attribute name="attrs">{'readonly': ['&amp;',('state', 'in', ['purchase']),('check_status','in',
['approved'])]}
</attribute>
</field>
<field name="origin" position="attributes">
<attribute name="attrs">{'readonly': ['&amp;',('state', 'in', ['purchase']),('check_status','in',
['approved'])]}
</attribute>
</field>
<field name="payment_term_id" position="attributes">
<attribute name="attrs">{'readonly': ['&amp;',('state', 'in', ['purchase']),('check_status','in',
['approved'])]}
</attribute>
</field>
<field name="fiscal_position_id" position="attributes">
<attribute name="attrs">{'readonly': ['&amp;',('state', 'in', ['purchase']),('check_status','in',
['approved'])]}
</attribute>
</field>
</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>
<field name="model">purchase.order</field>
<field name="inherit_id" ref="purchase_stock.purchase_order_view_form_inherit"/>
<field name="arch" type="xml">
<field name="incoterm_id" position="attributes">
<attribute name="attrs">{'readonly': ['&amp;',('state', 'in', ['purchase']),('check_status','in',
['approved'])]}
</attribute>
</field>
<field name="incoterm_location" position="attributes">
<attribute name="attrs">{'readonly': ['&amp;',('state', 'in', ['purchase']),('check_status','in',
['approved'])]}
</attribute>
</field>
</field>
</record>