From e781bce27e1d4dc43195f9e6e5813eb8f4ac1ea6 Mon Sep 17 00:00:00 2001 From: yuxianghui <1608204036@qq.com> Date: Tue, 22 Aug 2023 11:40:35 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E4=BC=98=E5=8C=96=E4=BA=86=E4=BA=A7?= =?UTF-8?q?=E7=BA=BF=E8=AE=BE=E5=A4=87=E8=B5=84=E6=BA=90=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E5=92=8C=E5=B7=A5=E4=BD=9C=E6=97=A5=E5=8E=86=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=B8=83=E5=B1=80=EF=BC=9B=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E6=97=A5=E5=8E=86=E3=80=81=E7=8F=AD=E6=AC=A1?= =?UTF-8?q?=E3=80=81=E4=BC=91=E6=81=AF=E6=97=A5=E6=A8=A1=E5=9E=8B=E7=9A=84?= =?UTF-8?q?form=E8=A7=86=E5=9B=BE=EF=BC=8C=E6=96=B0=E5=A2=9Etree=E8=A7=86?= =?UTF-8?q?=E5=9B=BE=E4=BF=AE=E6=94=B9=E5=8A=9F=E8=83=BD=EF=BC=9B2?= =?UTF-8?q?=E3=80=81=E4=BF=AE=E5=A4=8D=E4=BA=A7=E7=BA=BF=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E8=B5=84=E6=BA=90=E8=AE=BE=E7=BD=AE=E7=9A=84=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98=EF=BC=8C?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E6=9C=BA=E5=8F=B0=E5=8F=B7=E5=AD=97?= =?UTF-8?q?=E6=AE=B5=E5=90=8D=E7=A7=B0=EF=BC=9B3=E3=80=81=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=B7=A5=E4=BD=9C=E6=97=A5=E5=8E=86=E8=AE=BE=E7=BD=AE?= =?UTF-8?q?=E7=8F=AD=E6=AC=A1=E5=AD=97=E6=AE=B5=E5=BF=85=E5=A1=AB=EF=BC=9B?= =?UTF-8?q?4=E3=80=81=E8=B0=83=E6=95=B4=E4=BA=A7=E7=BA=BF=E8=AE=BE?= =?UTF-8?q?=E5=A4=87=E8=B5=84=E6=BA=90=E8=AE=BE=E7=BD=AE=E5=92=8C=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E6=97=A5=E5=8E=86=E8=AE=BE=E7=BD=AE=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_plan_management/models/base.py | 8 +- sf_plan_management/models/calendar_base.py | 4 +- sf_plan_management/views/menu_view.xml | 14 +- sf_plan_management/views/plan_base_view.xml | 216 ++++++++++---------- 4 files changed, 121 insertions(+), 121 deletions(-) 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 @@
- - +
+

- - - +

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