新增cmm程序对象及新增cmm接口
This commit is contained in:
@@ -97,7 +97,8 @@ class ResMrpWorkOrder(models.Model):
|
||||
X_deviation_angle = fields.Integer(string="X轴偏差度", default=0)
|
||||
test_results = fields.Selection([("合格", "合格"), ("返工", "返工"), ("报废", "报废")], default='合格',
|
||||
string="检测结果")
|
||||
cnc_ids = fields.One2many("sf.cnc.processing", 'workorder_id', string="CNC加工")
|
||||
cnc_ids = fields.One2many("sf.cnc.processing", 'workorder_id', string="CNC加工程序")
|
||||
cmm_ids = fields.One2many("sf.cmm.program", 'workorder_id', string="CMM程序")
|
||||
tray_code = fields.Char(string="托盘编码")
|
||||
glb_file = fields.Binary("glb模型文件")
|
||||
is_subcontract = fields.Boolean(string='是否外协')
|
||||
@@ -130,7 +131,6 @@ class ResMrpWorkOrder(models.Model):
|
||||
total_wight = fields.Float(string="总重量")
|
||||
maximum_carrying_weight = fields.Char(string="最大承载重量[kg]")
|
||||
maximum_clamping_force = fields.Char(string="最大夹持力[n]")
|
||||
production_line_id = fields.Many2one('sf.production.line', string="生产线")
|
||||
preset_program_information = fields.Char(string="预调程序信息")
|
||||
workpiece_delivery_ids = fields.One2many('sf.workpiece.delivery', 'workorder_id', '工件配送')
|
||||
is_delivery = fields.Boolean('是否配送完成', default=False)
|
||||
@@ -865,3 +865,15 @@ class WorkPieceDelivery(models.Model):
|
||||
(obj.task_completion_time - obj.task_delivery_time).total_seconds() / 60.0, 2)
|
||||
else:
|
||||
obj.delivery_duration = 0.0
|
||||
|
||||
|
||||
class CMMprogram(models.Model):
|
||||
_name = 'sf.cmm.program'
|
||||
_description = "CMM程序"
|
||||
|
||||
program_path = fields.Char('程序文件路径')
|
||||
post_processing_name = fields.Char('后处理名称')
|
||||
program_date = fields.Datetime('程序日期')
|
||||
workorder_id = fields.Many2one('mrp.workorder', string="工单")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user