diff --git a/sf_plan_management/models/base.py b/sf_plan_management/models/base.py index 801c5eb4..097401ad 100644 --- a/sf_plan_management/models/base.py +++ b/sf_plan_management/models/base.py @@ -8,7 +8,7 @@ class ProcedureEquipmentResourceSetting(models.Model): name = fields.Many2one('sf.production.line', string='生产线', required=True) work_center_name_id = fields.Many2one('mrp.workcenter', string='工作中心名称') - equipment_code = fields.Char(string='机台号(原设备编码)', readonly=True, compute='_onchange_equipment_name_id') + equipment_code = fields.Char(string='机台号', readonly=True, compute='_onchange_equipment_name_id') equipment_name_id = fields.Many2one('maintenance.equipment', string='设备名称', readonly=True, @@ -41,9 +41,9 @@ class ProcedureEquipmentResourceSetting(models.Model): @api.onchange('equipment_name_id') def _onchange_equipment_name_id(self): for record in self: - record.equipment_code = record.equipment_name_id.code, - record.brand = record.equipment_name_id.brand_id.name, - record.model = record.equipment_name_id.type_id.name, + record.equipment_code = record.equipment_name_id.code + record.brand = record.equipment_name_id.brand_id.name + record.model = record.equipment_name_id.type_id.name record.status = record.equipment_name_id.state @api.depends('working_calendar_id') diff --git a/sf_plan_management/models/calendar_base.py b/sf_plan_management/models/calendar_base.py index 5b86e6dd..b783f8b7 100644 --- a/sf_plan_management/models/calendar_base.py +++ b/sf_plan_management/models/calendar_base.py @@ -26,14 +26,14 @@ class WorkLogSetting(models.Model): code = fields.Char(string='序号', default=_get_code) name = fields.Char(string='工作日历名称', required=True, size=15, length=30) - working_shift_ids = fields.Many2many('sf.working.shift', string='班次') + working_shift_ids = fields.Many2many('sf.working.shift', string='班次', required=True) start_time = fields.Datetime(string='日开始时间', readonly=True, compute='_compute_working_shift_ids') end_time = fields.Datetime(string='日结束时间', readonly=True, compute='_compute_working_shift_ids') duration = fields.Char(string='时长', readonly=True, compute='_compute_working_shift_ids') day_off_ids = fields.Many2many('sf.day.off', string='休息日', required=True) - status = fields.Boolean(string='状态', default=True) + status = fields.Selection([('正常', '正常'), ('禁用', '禁用')], string='状态', default='正常') update_person = fields.Char(string='更新人', default=lambda self: self.env.user.name) update_time = fields.Datetime(string='更新时间', default=lambda self: fields.Datetime.now()) diff --git a/sf_plan_management/views/menu_view.xml b/sf_plan_management/views/menu_view.xml index d0c7dc87..6817e30c 100644 --- a/sf_plan_management/views/menu_view.xml +++ b/sf_plan_management/views/menu_view.xml @@ -7,20 +7,20 @@ sequence="599" /> - - + + 工作日历设置 sf.work.log.setting - + - - - + + + @@ -30,38 +30,39 @@ sf.work.log.setting
+
+
- - +
+

- - - - - - - - - - - - - - - - +

+
- - + + + + + + + - - - - + + + + + +
@@ -79,7 +80,7 @@ 休息日 sf.day.off - + @@ -88,7 +89,7 @@ 休息日 sf.day.off - tree,form + tree @@ -97,7 +98,7 @@ 班次 sf.working.shift - + @@ -107,32 +108,32 @@ - - 班次 - sf.working.shift - -
- - - - - - - - - - - - - -
-
-
+ + + + + + + + + + + + + + + + + + + + + 班次 sf.working.shift - tree,form + tree @@ -141,34 +142,35 @@ 工作日历 sf.work.schedule.calendar - - + + + - - 工作日历 - sf.work.schedule.calendar - -
- - - - - - - - - - - - -
-
-
+ + + + + + + + + + + + + + + + + + + + 工作日历 @@ -196,7 +198,7 @@ 工作日历 sf.work.schedule.calendar - calendar,search,tree,form + calendar,search,tree @@ -207,15 +209,15 @@ - - - + + + - - - - + + + + @@ -229,41 +231,39 @@
- - +
+

- - - +

+
+ - - - - - - - ` - - - - - - - - - - - - + + + + + ` + + + + + + + + + + + +