优化装夹工单,新增工件装夹page,名字为组件的page名称改为物料,去掉单独的工件装夹功能
This commit is contained in:
@@ -16,7 +16,7 @@ from odoo.addons.sf_mrs_connect.models.ftp_operate import FtpController
|
||||
|
||||
class ResMrpWorkOrder(models.Model):
|
||||
_inherit = 'mrp.workorder'
|
||||
_order = 'sequence'
|
||||
_order = 'sequence asc,create_date desc'
|
||||
|
||||
product_tmpl_id_length = fields.Float(related='production_id.product_tmpl_id.length', readonly=True, store=True,
|
||||
check_company=True, string="坯料长度(mm)")
|
||||
@@ -108,6 +108,33 @@ class ResMrpWorkOrder(models.Model):
|
||||
supplier_id = fields.Many2one('res.partner', string='外协供应商')
|
||||
equipment_id = fields.Many2one('maintenance.equipment', string='加工设备')
|
||||
schedule_state = fields.Selection(related='production_id.schedule_state', store=True)
|
||||
# 工件装夹信息
|
||||
functional_fixture_code = fields.Char(string="功能夹具编码", readonly=True)
|
||||
functional_fixture_serial_number = fields.Char(string="功能夹具序列号", readonly=True)
|
||||
functional_fixture_id = fields.Many2one('sf.functional.fixture', string="功能夹具")
|
||||
functional_fixture_type_id = fields.Many2one('sf.functional.fixture.type', string="功能夹具类型", readonly=True)
|
||||
chuck_serial_number = fields.Char(string="卡盘序列号")
|
||||
chuck_name = fields.Char(string="卡盘名称")
|
||||
chuck_brand_id = fields.Many2one('sf.machine.brand', string="卡盘品牌")
|
||||
chuck_type_id = fields.Char(string="卡盘类型")
|
||||
chuck_model_id = fields.Char(string="卡盘型号")
|
||||
tray_serial_number = fields.Char(string="卡盘序列号")
|
||||
tray_name = fields.Char(string="托盘名称")
|
||||
tray_brand_id = fields.Many2one('sf.machine.brand', string="托盘品牌")
|
||||
tray_type_id = fields.Char(string="托盘类型")
|
||||
tray_model_id = fields.Char(string="托盘型号")
|
||||
total_wight = fields.Float(string="总重量")
|
||||
maximum_carrying_weight = fields.Char(string="最大承载重量[kg]")
|
||||
maximum_clamping_force = fields.Char(string="最大夹持力[n]")
|
||||
production_line = fields.Char(string="生产线")
|
||||
preset_program_information = fields.Char(string="预调程序信息")
|
||||
|
||||
@api.onchange('functional_fixture_id')
|
||||
def _onchange_functional_fixture_id(self):
|
||||
if self.functional_fixture_id:
|
||||
self.functional_fixture_code = self.functional_fixture_id.code
|
||||
self.functional_fixture_type_id = self.functional_fixture_id.type_id.id
|
||||
|
||||
|
||||
def get_no_data(self, production_id):
|
||||
process_parameter_workorder = self.search(
|
||||
@@ -524,18 +551,6 @@ class ResMrpWorkOrder(models.Model):
|
||||
})
|
||||
super().button_finish()
|
||||
|
||||
def action_view_schedule_tree(self):
|
||||
# 执行打开树视图的操作(已排程的工单)
|
||||
return {
|
||||
'name': 'Schedule Work Order Tree',
|
||||
'type': 'ir.actions.act_window',
|
||||
'res_model': 'mrp.workorder',
|
||||
'target': 'current',
|
||||
'view_mode': 'tree',
|
||||
'views': [[self.env.ref('mrp.mrp_production_workorder_tree_editable_view').id], 'tree'],
|
||||
'domain': [('schedule_state', '=', '已排')],
|
||||
}
|
||||
|
||||
|
||||
class CNCprocessing(models.Model):
|
||||
_name = 'sf.cnc.processing'
|
||||
|
||||
Reference in New Issue
Block a user