Files
jikimo_sf/sf_sale/views/sale_order_view.xml
jinling.yang 45d04e1a05 1.销售新增审核状态,选项为已审核和待审核,销售模型新增权限规则:销售总监查看所有的订单,销售经理只能查看自己的订单
2.报价单Form视图新增审核按钮,该按钮只有销售总监可以看到,且确认按钮只有在销售经理审核完才可显示,报价Tree视图新增审核状态
2023-11-23 17:28:58 +08:00

113 lines
6.0 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<odoo>
<data>
<record model="ir.ui.view" id="view_sale_order_form_inherit_sf">
<field name="name">sale.order.form.inherit.sf</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form"/>
<field name="arch" type="xml">
<xpath expr="//form/header/button[@name='action_confirm']" 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_check']" position="attributes">
<attribute name="groups">sf_base.group_sale_director</attribute>
</xpath>
<xpath expr="//form/header/button[@name='action_confirm'][1]" position="attributes">
<attribute name="attrs">{'invisible': [('check_status', '=', 'unchecked'),('state', 'not in',
['sent'])]}
</attribute>
</xpath>
<xpath expr="//form/header/button[@name='action_confirm'][2]" position="attributes">
<attribute name="attrs">{'invisible': [('check_status', '=', 'unchecked'),('state', 'in',
['draft'])]}
</attribute>
</xpath>
<field name="payment_term_id" position="after">
<field name="deadline_of_delivery"/>
<field name="payments_way"/>
<field name="pay_way"/>
</field>
<xpath expr="//field[@name='order_line']/tree/field[@name='name']" position="before">
<field name="model_glb_file" widget="Viewer3D" optional="show"
string="模型文件"/>
</xpath>
<xpath expr="//field[@name='order_line']/tree/field[@name='name']" position="replace">
<field name="name" widget="section_and_note_text" optional="show"
string="参数说明(长/宽/高/体积/精度/材质)"/>
</xpath>
</field>
</record>
<record model="ir.ui.view" id="view_sale_management_order_form_quote_inherit_sf">
<field name="name">sale.management.order.form.quote.inherit.sf</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale_management.sale_order_form_quote"/>
<field name="arch" type="xml">
<field name="date_order" position="attributes">
<attribute name="string">下单日期</attribute>
</field>
<field name="sale_order_template_id" position="after">
<!-- <label for="person_of_delivery" string="交货信息"/>-->
<!-- <div>-->
<field name="person_of_delivery" string="交货人"/>
<!-- <span>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-->
<!-- </span>-->
<field name="telephone_of_delivery" string="交货人联系方式"/>
<!-- <span>&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;-->
<!-- </span>-->
<field name="address_of_delivery" string="交货人地址"/>
<!-- </div>-->
</field>
</field>
</record>
<record id="view_quotation_with_onboarding_tree_inherit_sf" model="ir.ui.view">
<field name="name">sale.order.quotation.tree.inherit.sf</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_quotation_tree_with_onboarding"/>
<field name="arch" type="xml">
<field name="name" position="attributes">
<attribute name="string">订单号</attribute>
</field>
<field name="create_date" position="attributes">
<attribute name="string">下单时间</attribute>
</field>
<field name="state" position="after">
<field name="check_status" widget="label_selection"
options="{'classes': {'unchecked':'warning','checked': 'success'}}"/>
</field>
</field>
</record>
<record id="view_order_tree_inherit_sf" model="ir.ui.view">
<field name="name">sale.order.tree</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_tree"/>
<field name="arch" type="xml">
<field name="name" position="attributes">
<attribute name="string">订单号</attribute>
</field>
</field>
</record>
<record model="ir.ui.view" id="view_product_template_form_inherit_sf">
<field name="name">product.template.form.inherit.sf</field>
<field name="model">product.template</field>
<field name="inherit_id" ref="sale.product_template_form_view"/>
<field name="arch" type="xml">
<field name="categ_id" position="replace">
<field name='categ_id' invisible="1"/>
</field>
<field name="product_tag_ids" position="after">
<field name="default_code" attrs="{'invisible': [('product_variant_count', '&gt;', 1)]}"/>
<field name="barcode" attrs="{'invisible': [('product_variant_count', '&gt;', 1)]}"/>
</field>
</field>
</record>
</data>
</odoo>