去掉销售订单加工状态

This commit is contained in:
mgw
2024-05-11 23:36:18 +08:00
parent 391a172016
commit 1afc48a20e
6 changed files with 28 additions and 27 deletions

View File

@@ -33,10 +33,10 @@ class ReSaleOrder(models.Model):
payments_way = fields.Selection([('现结', '现结'), ('月结', '月结')], '结算方式', default='现结', tracking=True)
pay_way = fields.Selection([('转账', '转账'), ('微信', '微信'), ('支付宝', '支付宝')], '支付方式')
check_status = fields.Selection([('pending', '待审核'), ('approved', '已审核'), ('fail', '不通过')], '审核状态')
schedule_status = fields.Selection(
[('to schedule', '待排程'), ('to process', '待加工'), ('to deliver', '待发货'), ('to receive', '待收货'),
('received', '已收货')],
'进度状态')
# schedule_status = fields.Selection(
# [('to schedule', '待排程'), ('to process', '待加工'), ('to deliver', '待发货'), ('to receive', '待收货'),
# ('received', '已收货')],
# '进度状态')
payment_term_id = fields.Many2one(
comodel_name='account.payment.term',
string="交付条件",

View File

@@ -70,7 +70,7 @@
</xpath>
<xpath expr="//form/header/button[@name='action_confirm']" position="after">
<field name="check_status" invisible="1"/>
<field name="schedule_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,'fail']),('state', 'in', ['cancel'])]}"
@@ -84,14 +84,14 @@
<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': ['|','&amp;',('check_status', '!=', 'approved'),('state', 'in', ['draft','cancel']),'&amp;','&amp;',('check_status', '=', 'approved'),('state', 'in', ['sale','cancel']),('schedule_status', 'not in', False)]}"/>
attrs="{'invisible': ['|','&amp;',('check_status', '!=', 'approved'),('state', 'in', ['draft','cancel']),'&amp;',('check_status', '=', 'approved'),('state', 'in', ['sale','cancel'])]}"/>
</xpath>
<xpath expr="//form/header/button[@name='action_cancel']" position="attributes">
<attribute name="attrs">{'invisible': ['|','&amp;',('state', 'in',
['cancel','draft']),('check_status',
'in',
[False,'approved']),'&amp;','&amp;',('check_status', '=', 'approved'),('state', 'in',
['sale','cancel','draft']),('schedule_status', 'not in', False)]}
[False,'approved']),'&amp;',('check_status', '=', 'approved'),('state', 'in',
['sale','cancel','draft'])]}
</attribute>
</xpath>
<xpath expr="//form/header/button[@name='action_draft']" position="attributes">
@@ -112,7 +112,7 @@
<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"/>
<!-- <field name="schedule_status" readonly="1"/> -->
</field>
<xpath expr="//field[@name='order_line']/tree/field[@name='name']" position="before">
<field name="model_glb_file" widget="Viewer3D" optional="show"
@@ -222,20 +222,21 @@
<field name="inherit_id" ref="sale.view_order_tree"/>
<field name="arch" type="xml">
<tree position="attributes">
<attribute name="default_order">schedule_status desc,date_order asc</attribute>
<!-- <attribute name="default_order">schedule_status desc,date_order asc</attribute> -->
<attribute name="default_order">date_order asc</attribute>
<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 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>