销售1.新增进度状态字段,选项为:待排程、待加工、待发货、待收货、已收货,
2.销售和报价页面的所有按钮根据审核状态和状态做隐藏显示控制 3.销售订单Form和Tree视图新增进度状态字段,且form表单根据状态字段的值为销售和取消时,表单不可编辑 4.产品页面的所有按钮根据销售和采购的权限组做显示和隐藏控制
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
<xpath expr="//form/header/button[@name='action_quotation_send'][1]" position="replace">
|
||||
<button name="action_quotation_send" string="通过EMAIL发送" type="object"
|
||||
class="btn-primary" data-hotkey="g" context="{'validate_analytic': True}"
|
||||
attrs="{'invisible': [('check_status', 'not in', ['approved',False]),('state', 'in', ['draft'])]}"/>
|
||||
attrs="{'invisible': ['|','&',('check_status', '!=', 'approved'),('state', 'in', ['draft','cancel']),'&',('check_status', '=', 'approved'),('state', 'in', ['sale','cancel'])]}"/>
|
||||
</xpath>
|
||||
<xpath expr="//form/header/button[@name='action_confirm']" position="after">
|
||||
<button name="submit" string="提交" type="object"
|
||||
@@ -18,11 +18,11 @@
|
||||
class="oe_highlight"/>
|
||||
</xpath>
|
||||
<xpath expr="//form/header/button[@name='action_confirm']" position="after">
|
||||
<field name="check_status"/>
|
||||
<field name="state"/>
|
||||
<field name="check_status" invisible="1"/>
|
||||
<field name="schedule_status" invisible="1"/>
|
||||
<button name="sf_sale.action_sale_order_check_wizard" string="审核" type="action"
|
||||
context="{'default_order_id':active_id}" groups="sf_base.group_sale_director"
|
||||
attrs="{'invisible': [('check_status','in', ['approved',False])]}"
|
||||
attrs="{'invisible': ['|',('check_status','in', ['approved',False]),('state', 'in', ['cancel'])]}"
|
||||
class="oe_highlight"/>
|
||||
</xpath>
|
||||
<!-- <xpath expr="//form/header/button[@name='action_confirm'][1]" position="attributes">-->
|
||||
@@ -33,29 +33,85 @@
|
||||
<xpath expr="//form/header/button[@name='action_confirm'][2]" position="replace">
|
||||
<button name="action_confirm" data-hotkey="v"
|
||||
string="确认" type="object" context="{'validate_analytic': True}"
|
||||
attrs="{'invisible': [('check_status', 'not in', ['approved']),('state', 'in',['draft','sale'])]}"/>
|
||||
attrs="{'invisible': ['|','&',('check_status', '!=', 'approved'),('state', 'in', ['draft','cancel']),'&',('check_status', '=', 'approved'),('state', 'in', ['sale','cancel'])]}"/>
|
||||
</xpath>
|
||||
<xpath expr="//form/header/button[@name='action_cancel']" position="attributes">
|
||||
<attribute name="attrs">{'invisible': [('check_status', '!=', 'approved')]}
|
||||
<attribute name="attrs">{'invisible': ['|',('check_status', '!=', 'approved'),('schedule_status',
|
||||
'not in', ['to schedule',False])]}
|
||||
</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//form/header/button[@name='action_draft']" position="attributes">
|
||||
<attribute name="invisible">1</attribute>
|
||||
</xpath>
|
||||
<!-- <xpath expr="//form/header/button[@name='action_draft']" position="replace">-->
|
||||
<!-- <button name="action_draft" states="cancel" type="object" string="设为报价" data-hotkey="w"-->
|
||||
<!-- invisible="1"/>-->
|
||||
<!-- </xpath>-->
|
||||
<field name="partner_id" position="replace">
|
||||
<field name="partner_id" widget="res_partner_many2one" context="{'is_customer': True }"
|
||||
options='{"always_reload": True}'/>
|
||||
</field>
|
||||
<field name="payment_term_id" position="attributes">
|
||||
<attribute name="attrs">{'readonly': [('state', 'in', ['cancel','sale'])]}</attribute>
|
||||
</field>
|
||||
<field name="payment_term_id" position="after">
|
||||
<field name="deadline_of_delivery"/>
|
||||
<field name="payments_way"/>
|
||||
<field name="pay_way"/>
|
||||
<field name="deadline_of_delivery" attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
||||
<field name="payments_way" attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
||||
<field name="pay_way" attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
||||
<field name="schedule_status" readonly="1"
|
||||
attrs="{'invisible': [('state', 'in', ('sale','cancel'))]}"/>
|
||||
</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']" position="attributes">
|
||||
<attribute name="attrs">{'readonly': [('state', 'in', ['cancel','sale'])]}</attribute>
|
||||
</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 name="user_id" position="attributes">
|
||||
<attribute name="attrs">{'readonly': [('state', 'in', ['cancel','sale'])]}</attribute>
|
||||
</field>
|
||||
<field name="team_id" position="attributes">
|
||||
<attribute name="attrs">{'readonly': [('state', 'in', ['cancel','sale'])]}</attribute>
|
||||
</field>
|
||||
<field name="fiscal_position_id" position="attributes">
|
||||
<attribute name="attrs">{'readonly': [('state', 'in', ['cancel','sale'])]}</attribute>
|
||||
</field>
|
||||
<field name="client_order_ref" position="attributes">
|
||||
<attribute name="attrs">{'readonly': [('state', 'in', ['cancel','sale'])]}</attribute>
|
||||
</field>
|
||||
|
||||
<field name="tag_ids" position="attributes">
|
||||
<attribute name="attrs">{'readonly': [('state', 'in', ['cancel','sale'])]}</attribute>
|
||||
</field>
|
||||
<field name="commitment_date" position="attributes">
|
||||
<attribute name="attrs">{'readonly': [('state', 'in', ['cancel','sale'])]}</attribute>
|
||||
</field>
|
||||
<field name="origin" position="attributes">
|
||||
<attribute name="attrs">{'readonly': [('state', 'in', ['cancel','sale'])]}</attribute>
|
||||
</field>
|
||||
<field name="campaign_id" position="attributes">
|
||||
<attribute name="attrs">{'readonly': [('state', 'in', ['cancel','sale'])]}</attribute>
|
||||
</field>
|
||||
<field name="medium_id" position="attributes">
|
||||
<attribute name="attrs">{'readonly': [('state', 'in', ['cancel','sale'])]}</attribute>
|
||||
</field>
|
||||
<field name="source_id" position="attributes">
|
||||
<attribute name="attrs">{'readonly': [('state', 'in', ['cancel','sale'])]}</attribute>
|
||||
</field>
|
||||
<field name="signed_by" position="attributes">
|
||||
<attribute name="attrs">{'readonly': [('state', 'in', ['cancel','sale'])]}</attribute>
|
||||
</field>
|
||||
<field name="signed_on" position="attributes">
|
||||
<attribute name="attrs">{'readonly': [('state', 'in', ['cancel','sale'])]}</attribute>
|
||||
</field>
|
||||
<field name="signature" position="attributes">
|
||||
<attribute name="attrs">{'readonly': [('state', 'in', ['cancel','sale'])]}</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
@@ -69,10 +125,13 @@
|
||||
<attribute name="string">下单日期</attribute>
|
||||
</field>
|
||||
<field name="sale_order_template_id" position="after">
|
||||
<field name="person_of_delivery" string="交货人"/>
|
||||
<field name="telephone_of_delivery" string="交货人联系方式"/>
|
||||
<field name="address_of_delivery" string="交货人地址"/>
|
||||
<field name="remark"/>
|
||||
<field name="person_of_delivery" string="交货人"
|
||||
attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
||||
<field name="telephone_of_delivery" string="交货人联系方式"
|
||||
attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
||||
<field name="address_of_delivery" string="交货人地址"
|
||||
attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
||||
<field name="remark" attrs="{'readonly': [('state', 'in', ('sale','cancel'))]}"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
@@ -92,8 +151,10 @@
|
||||
<attribute name="string">下单时间</attribute>
|
||||
</field>
|
||||
<field name="state" position="after">
|
||||
<field name="check_status" widget="label_selection"
|
||||
options="{'classes': {'unchecked':'warning','checked': 'success'}}"/>
|
||||
<field name="check_status" widget="badge"
|
||||
decoration-success="check_status == 'approved'"
|
||||
decoration-warning="check_status == 'pending'"
|
||||
decoration-danger="check_status == 'fail'"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
@@ -103,9 +164,20 @@
|
||||
<field name="model">sale.order</field>
|
||||
<field name="inherit_id" ref="sale.view_order_tree"/>
|
||||
<field name="arch" type="xml">
|
||||
<tree position="attributes">
|
||||
<attribute name="create">False</attribute>
|
||||
</tree>
|
||||
<field name="name" position="attributes">
|
||||
<attribute name="string">订单号</attribute>
|
||||
</field>
|
||||
<field name="amount_total" position="after">
|
||||
<field name="schedule_status" widget="badge"
|
||||
decoration-success="schedule_status == 'received'"
|
||||
decoration-warning="schedule_status == 'to process'"
|
||||
decoration-danger="schedule_status == 'to receive'"
|
||||
decoration-muted="schedule_status == 'to process'"
|
||||
decoration-info="schedule_status == 'to schedule'"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user