From 5804e26a420beb23cb97f3faab32f863efeef7b9 Mon Sep 17 00:00:00 2001 From: Elouan Le Bars Date: Thu, 13 Feb 2020 10:01:28 +0100 Subject: [PATCH] [FIX] b_shift : abstract model SQL requests were made on abstract table. --- beesdoo_shift/models/attendance_sheet.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/beesdoo_shift/models/attendance_sheet.py b/beesdoo_shift/models/attendance_sheet.py index 64869a3..4b39e78 100644 --- a/beesdoo_shift/models/attendance_sheet.py +++ b/beesdoo_shift/models/attendance_sheet.py @@ -7,7 +7,16 @@ from odoo import _, api, exceptions, fields, models from odoo.exceptions import UserError, ValidationError -class AttendanceSheetShift(models.AbstractModel): +class AttendanceSheetShift(models.Model): + """ + Partial copy of Task class to use in AttendanceSheet, + actual Task is updated at validation. + + Should be Abstract and not used alone (common code for + AttendanceSheetShiftAdded and AttendanceSheetShiftExpected), + but create() method from res.partner raise error + when class is Abstract. + """ _name = "beesdoo.shift.sheet.shift" _description = "Copy of an actual shift into an attendance sheet" _order = "task_type_id, worker_name"