新增出入库记录对象,功能刀具出入库记录对象多对一关联出入库记录对象,优化功能刀具出入库布局;新增功能刀具列表、刀具物料查询的分组展示全部信息;对刀具物料查询对象的字段根据所选的刀具物料不同展示不同的刀具物料信息字段
This commit is contained in:
@@ -15,8 +15,13 @@ class FunctionalCuttingToolEntity(models.Model):
|
||||
|
||||
code = fields.Char('编码')
|
||||
name = fields.Char('名称')
|
||||
mrs_cutting_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型')
|
||||
mrs_cutting_tool_model_id = fields.Many2one('sf.cutting.tool.model', string='刀具型号')
|
||||
mrs_cutting_tool_type_id = fields.Many2one('sf.functional.cutting.tool.model', string='功能刀具类型',tracking=True,
|
||||
group_expand='_read_group_mrs_cutting_tool_type_ids')
|
||||
@api.model
|
||||
def _read_group_mrs_cutting_tool_type_ids(self, categories, domain, order):
|
||||
mrs_cutting_tool_type_ids = categories._search([], order=order, access_rights_uid=SUPERUSER_ID)
|
||||
return categories.browse(mrs_cutting_tool_type_ids)
|
||||
|
||||
# 整体式刀具型号
|
||||
mrs_cutting_tool_integral_model_ids = fields.Many2many('sf.cutting.tool.model',
|
||||
@@ -403,25 +408,40 @@ class InboundAndOutboundRecordsOfFunctionalTools(models.Model):
|
||||
image = fields.Binary('图片', readonly=True, related='functional_cutting_tool_id.image')
|
||||
|
||||
# 功能刀具出入库记录 特有字段
|
||||
current_state = fields.Char(string='当前状态', readonly=False)
|
||||
current_store_area = fields.Char(string='当前库区', readonly=False)
|
||||
current_store_place = fields.Char(string='当前库位', readonly=False)
|
||||
tool_install_staff = fields.Char(string='装刀人', readonly=False)
|
||||
tool_install_time = fields.Datetime(string='装刀时间', readonly=False)
|
||||
thickness = fields.Selection([('1', '粗'), ('2', '中'), ('3', '精')], string='粗/中/精', readonly=False)
|
||||
max_life_span = fields.Char(string='最大寿命值', readonly=False)
|
||||
alarm_value = fields.Char(string='报警值', readonly=False)
|
||||
used_value = fields.Char(string='已使用值', readonly=False)
|
||||
current_state = fields.Char(string='当前状态', readonly=False)
|
||||
current_store_area = fields.Char(string='当前库区', readonly=False)
|
||||
current_store_place = fields.Char(string='当前库位', readonly=False)
|
||||
number = fields.Integer(string='数量', readonly=False)
|
||||
reason_application = fields.Char(string='申请原因', readonly=False)
|
||||
applicant = fields.Char(string='申请人', readonly=False)
|
||||
return_staff = fields.Char(string='归还人', readonly=False)
|
||||
return_time = fields.Date(string='归还入库时间', readonly=False)
|
||||
tool_state = fields.Char(string="刀具状态", readonly=False)
|
||||
tool_install_staff = fields.Char(string='装刀人', readonly=False)
|
||||
tool_install_time = fields.Datetime(string='装刀时间', readonly=False)
|
||||
|
||||
inbound_and_outbound_records_ids = fields.One2many('sf.inbound.and.outbound.records','inbound_and_outbound_tools_id', string='出入库记录')
|
||||
|
||||
remark = fields.Char(string='备注/说明', readonly=False)
|
||||
|
||||
|
||||
class InboundAndOutboundRecords(models.Model):
|
||||
_name = 'sf.inbound.and.outbound.records'
|
||||
_description = '出入库记录'
|
||||
_order = 'id DESC'
|
||||
|
||||
inbound_and_outbound_tools_id = fields.Many2one('sf.inbound.and.outbound.records.of.functional.tools',string='功能刀具出入库记录')
|
||||
|
||||
name = fields.Char(string='出入库记录')
|
||||
tool_state = fields.Selection([('0', '领用出库'), ('1', '归还入库')], string="出入库类别", readonly=False)
|
||||
receive_equipment = fields.Char(string='领用机台', readonly=False)
|
||||
receive_staff = fields.Char(string='领用人', readonly=False)
|
||||
receive_time = fields.Char(string='领用出库时间', readonly=False)
|
||||
remark = fields.Text(string='备注/说明', readonly=False)
|
||||
receive_time = fields.Datetime(string='领用出库时间', readonly=False)
|
||||
return_staff = fields.Char(string='归还人', readonly=False)
|
||||
return_time = fields.Datetime(string='归还入库时间', readonly=False)
|
||||
current_store_area = fields.Char(string='库区', readonly=False)
|
||||
current_store_place = fields.Char(string='库位', readonly=False)
|
||||
number = fields.Integer(string='数量', readonly=False)
|
||||
|
||||
|
||||
class MachineTableToolChangingApply(models.Model):
|
||||
|
||||
Reference in New Issue
Block a user