Accept Merge Request #1008: (feature/制造代码优化 -> develop)
Merge Request: 去掉销售订单加工状态 Created By: @马广威 Accepted By: @马广威 URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/1008?initial=true
This commit is contained in:
@@ -166,5 +166,5 @@ class jdElcp(http.Controller):
|
||||
return json.dumps({'statusCode': 415, 'statusMessage': '订单号不能为空'}, ensure_ascii=False)
|
||||
aa = request.env['sale.order'].sudo().search([('name', '=', kw['orderNo'])])
|
||||
if aa:
|
||||
aa.schedule_status = 'received'
|
||||
# aa.schedule_status = 'received'
|
||||
return json.dumps({'statusCode': 200, 'statusMessage': '修改成功'}, ensure_ascii=False)
|
||||
|
||||
@@ -226,8 +226,8 @@ class Manufacturing_Connect(http.Controller):
|
||||
if production_obj:
|
||||
production_obj.sudo().work_order_state = '已完成'
|
||||
production_obj.write({'state': 'completed'})
|
||||
request.env['sale.order'].sudo().search(
|
||||
[('name', '=', production_obj.origin)]).write({'schedule_status': 'to deliver'})
|
||||
# request.env['sale.order'].sudo().search(
|
||||
# [('name', '=', production_obj.origin)]).write({'schedule_status': 'to deliver'})
|
||||
|
||||
except Exception as e:
|
||||
res = {'Succeed': False, 'ErrorCode': 202, 'Error': e}
|
||||
|
||||
@@ -248,7 +248,7 @@ class StockRule(models.Model):
|
||||
|
||||
sale_order = self.env['sale.order'].sudo().search([('name', '=', production.origin)])
|
||||
if sale_order:
|
||||
sale_order.write({'schedule_status': 'to schedule'})
|
||||
# sale_order.write({'schedule_status': 'to schedule'})
|
||||
self.env['sf.production.plan'].sudo().with_company(company_id).create({
|
||||
'name': production.name,
|
||||
'order_deadline': sale_order.deadline_of_delivery,
|
||||
|
||||
@@ -221,9 +221,9 @@ class sf_production_plan(models.Model):
|
||||
record.sudo().production_id.schedule_state = '已排'
|
||||
record.sudo().production_id.process_state = '待装夹'
|
||||
# self.env['sale.order'].browse(record.production_id.origin).schedule_status = 'to process'
|
||||
sale_obj = self.env['sale.order'].search([('name', '=', record.origin)])
|
||||
if 'S' in sale_obj.name:
|
||||
sale_obj.schedule_status = 'to process'
|
||||
# sale_obj = self.env['sale.order'].search([('name', '=', record.origin)])
|
||||
# if 'S' in sale_obj.name:
|
||||
# sale_obj.schedule_status = 'to process'
|
||||
mrp_production_ids = record.production_id._get_children().ids
|
||||
print('mrp_production_ids', mrp_production_ids)
|
||||
for i in mrp_production_ids:
|
||||
@@ -313,8 +313,8 @@ class sf_production_plan(models.Model):
|
||||
aa.schedule_state = '未排'
|
||||
# self.env['sale.order'].browse(record.production_id.origin).schedule_status = 'to shedule'
|
||||
sale_obj = self.env['sale.order'].search([('name', '=', self.origin)])
|
||||
if 'S' in sale_obj.name:
|
||||
sale_obj.schedule_status = 'to schedule'
|
||||
# if 'S' in sale_obj.name:
|
||||
# sale_obj.schedule_status = 'to schedule'
|
||||
return self.date_planned_finished
|
||||
|
||||
def liucheng_cs(self):
|
||||
|
||||
@@ -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="交付条件",
|
||||
|
||||
@@ -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': ['|','&',('check_status', '!=', 'approved'),('state', 'in', ['draft','cancel']),'&','&',('check_status', '=', 'approved'),('state', 'in', ['sale','cancel']),('schedule_status', 'not in', False)]}"/>
|
||||
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': ['|','&',('state', 'in',
|
||||
['cancel','draft']),('check_status',
|
||||
'in',
|
||||
[False,'approved']),'&','&',('check_status', '=', 'approved'),('state', 'in',
|
||||
['sale','cancel','draft']),('schedule_status', 'not in', False)]}
|
||||
[False,'approved']),'&',('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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user