From 830223c31956fb687c0382159e7743e8175588ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Wed, 27 May 2020 20:49:10 +0200 Subject: [PATCH] [FIX] b_shift_attendance: Bug on update --- .../data/system_parameter.xml | 21 +++++++++++-------- .../models/res_config_settings.py | 12 ----------- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/beesdoo_shift_attendance/data/system_parameter.xml b/beesdoo_shift_attendance/data/system_parameter.xml index 407f972..0ab07e6 100644 --- a/beesdoo_shift_attendance/data/system_parameter.xml +++ b/beesdoo_shift_attendance/data/system_parameter.xml @@ -1,10 +1,13 @@ - - - beesdoo_shift_attendance.card_support - False - - - beesdoo_shift_attendance.attendance_sheet_generation_interval - 15 - + + + + + beesdoo_shift_attendance.card_support + False + + + beesdoo_shift_attendance.attendance_sheet_generation_interval + 15 + + diff --git a/beesdoo_shift_attendance/models/res_config_settings.py b/beesdoo_shift_attendance/models/res_config_settings.py index e2d689c..ca426ab 100644 --- a/beesdoo_shift_attendance/models/res_config_settings.py +++ b/beesdoo_shift_attendance/models/res_config_settings.py @@ -33,27 +33,15 @@ class ResConfigSettings(models.TransientModel): def set_values(self): super(ResConfigSettings, self).set_values() parameters = self.env["ir.config_parameter"].sudo() - parameters.set_param( - "beesdoo_shift_attendance.card_support", str(self.card_support), - ) parameters.set_param( "beesdoo_shift_attendance.pre_filled_task_type_id", str(self.pre_filled_task_type_id.id), ) - parameters.set_param( - "beesdoo_shift_attendance.attendance_sheet_generation_interval", - str(self.attendance_sheet_generation_interval), - ) @api.multi def get_values(self): res = super(ResConfigSettings, self).get_values() res.update( - card_support=ast.literal_eval( - self.env["ir.config_parameter"].get_param( - "beesdoo_shift_attendance.card_support" - ), - ), pre_filled_task_type_id=int( self.env["ir.config_parameter"].get_param( "beesdoo_shift_attendance.pre_filled_task_type_id"