装夹预调工单,要带图纸和模型文件及坯料长宽高参数的优化需求
This commit is contained in:
@@ -56,6 +56,20 @@ class MrpProduction(models.Model):
|
||||
plan_start_processing_time = fields.Datetime('计划开始加工时间')
|
||||
production_line_state = fields.Selection([('待上产线', '待上产线'), ('已上产线', '已上产线'), ('已下产线', '已下产线')],
|
||||
string='上/下产线', default='待上产线')
|
||||
# 加工状态
|
||||
process_state = fields.Selection([
|
||||
('待排程', '待排程'),
|
||||
('待装夹', '待装夹'),
|
||||
('待CNC加工', '待CNC加工'),
|
||||
('待解除装夹', '待解除装夹'),
|
||||
('已完成', '已完成')
|
||||
], string='加工状态', default='待排程')
|
||||
|
||||
# 零件图号
|
||||
part_number = fields.Char('零件图号')
|
||||
|
||||
# 上传零件图纸
|
||||
part_drawing = fields.Binary('零件图纸')
|
||||
|
||||
@api.depends(
|
||||
'move_raw_ids.state', 'move_raw_ids.quantity_done', 'move_finished_ids.state',
|
||||
|
||||
@@ -121,6 +121,19 @@ class ResMrpWorkOrder(models.Model):
|
||||
# 获取数据状态
|
||||
data_state = fields.Boolean(string='获取数据状态', default=False)
|
||||
|
||||
# 坯料长宽高
|
||||
material_length = fields.Float(string='长')
|
||||
material_width = fields.Float(string='宽')
|
||||
material_height = fields.Float(string='高')
|
||||
# 零件图号
|
||||
part_number = fields.Char(string='零件图号')
|
||||
# 工序状态
|
||||
process_state = fields.Selection([
|
||||
('待装夹', '待装夹'),
|
||||
('待检测', '待检测'),
|
||||
('已完工', '已完工')
|
||||
], string='工序状态', default='待装夹')
|
||||
|
||||
@api.depends('production_id')
|
||||
def _compute_save_name(self):
|
||||
"""
|
||||
|
||||
@@ -65,14 +65,24 @@
|
||||
<attribute name="statusbar_visible">draft,confirmed,progress,pending_processing,completed,done
|
||||
</attribute>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='user_id']" position="after">
|
||||
<xpath expr="//sheet//group//group[2]//label" position="before">
|
||||
<field name="process_state"/>
|
||||
|
||||
</xpath>
|
||||
<xpath expr="//sheet//group//group//div[3]" position="after">
|
||||
<field name="programming_no" readonly="1"/>
|
||||
<field name="work_state" invisible="1"/>
|
||||
<field name="schedule_state" invisible='1'/>
|
||||
<field name="programming_state" readonly="1"/>
|
||||
<field name="production_line_id" readonly="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='user_id']" position="before">
|
||||
<field name="plan_start_processing_time" readonly="1"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='user_id']" position="after">
|
||||
<field name="production_line_state" readonly="1"/>
|
||||
<field name="part_number"/>
|
||||
<field name="part_drawing"/>
|
||||
</xpath>
|
||||
<xpath expr="//header//button[@name='action_cancel']" position="replace">
|
||||
<button name="action_cancel" type="object" string="取消" data-hotkey="z"
|
||||
|
||||
@@ -147,6 +147,7 @@
|
||||
</xpath>
|
||||
<xpath expr="//label[1]" position="before">
|
||||
<field name='routing_type'/>
|
||||
<field name='process_state'/>
|
||||
</xpath>
|
||||
<xpath expr="//label[1]" position="attributes">
|
||||
<attribute name="string">计划加工时间</attribute>
|
||||
@@ -526,6 +527,18 @@
|
||||
<field name="processing_user_id"/>
|
||||
<field name="inspection_user_id"/>
|
||||
<field name="save_name" widget="CopyClipboardChar" attrs="{'invisible':[('routing_type','!=','装夹预调')]}"/>
|
||||
<label for="material_length" string="物料尺寸"/>
|
||||
<div class="o_address_format">
|
||||
<label for="material_length" string="长"/>
|
||||
<field name="material_length" class="o_address_zip"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="material_width" string="宽"/>
|
||||
<field name="material_width" class="o_address_zip"/>
|
||||
<span>&nbsp;</span>
|
||||
<label for="material_height" string="高"/>
|
||||
<field name="material_height" class="o_address_zip"/>
|
||||
</div>
|
||||
<field name="part_number"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
Reference in New Issue
Block a user