优化工单工序,优化表面工艺排序
This commit is contained in:
@@ -84,6 +84,7 @@ class MrsProductionProcessCategory(models.Model):
|
|||||||
class MrsProductionProcess(models.Model):
|
class MrsProductionProcess(models.Model):
|
||||||
_name = 'sf.production.process'
|
_name = 'sf.production.process'
|
||||||
_description = '表面工艺'
|
_description = '表面工艺'
|
||||||
|
order = 'sequence asc'
|
||||||
|
|
||||||
code = fields.Char("编码")
|
code = fields.Char("编码")
|
||||||
name = fields.Char('名称')
|
name = fields.Char('名称')
|
||||||
|
|||||||
@@ -165,7 +165,7 @@
|
|||||||
<field name="model">sf.production.process</field>
|
<field name="model">sf.production.process</field>
|
||||||
<field name="arch" type="xml">
|
<field name="arch" type="xml">
|
||||||
<tree string="表面工艺" create="0" edit="0" delete="0">
|
<tree string="表面工艺" create="0" edit="0" delete="0">
|
||||||
<field name="sequence" widget="handle" string="序号" readonly="1"/>
|
<field name="sequence" string="加工顺序" readonly="1"/>
|
||||||
<field name="code"/>
|
<field name="code"/>
|
||||||
<field name="name" string="名称"/>
|
<field name="name" string="名称"/>
|
||||||
<field name="remark"/>
|
<field name="remark"/>
|
||||||
|
|||||||
@@ -673,7 +673,7 @@ class MrpProduction(models.Model):
|
|||||||
for surface_tmpl_id in surface_tmpl_ids:
|
for surface_tmpl_id in surface_tmpl_ids:
|
||||||
if process_id == surface_tmpl_id.route_workcenter_id.surface_technics_id:
|
if process_id == surface_tmpl_id.route_workcenter_id.surface_technics_id:
|
||||||
surface_tmpl_name = surface_tmpl_id.route_workcenter_id.name
|
surface_tmpl_name = surface_tmpl_id.route_workcenter_id.name
|
||||||
process_dict.update({int(process_id.code): '%s-%s' % (
|
process_dict.update({int(process_id.sequence): '%s-%s' % (
|
||||||
surface_tmpl_name, process_parameters_id.name)})
|
surface_tmpl_name, process_parameters_id.name)})
|
||||||
process_list = sorted(process_dict.keys())
|
process_list = sorted(process_dict.keys())
|
||||||
for process_num in process_list:
|
for process_num in process_list:
|
||||||
|
|||||||
Reference in New Issue
Block a user