Browse Source
Merge pull request #137 from beescoop/9.0-fix-beesdoo_shift
[9.0][FIX] beesdoo_shift
pull/140/head
9.0-2020-02-24.00
Rémy Taymans
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
11 additions and
2 deletions
-
beesdoo_shift/data/cron.xml
-
beesdoo_shift/models/attendance_sheet.py
|
@ -67,7 +67,7 @@ |
|
|
<field name="numbercall">-1</field> |
|
|
<field name="numbercall">-1</field> |
|
|
<field name="doall" eval="False" /> |
|
|
<field name="doall" eval="False" /> |
|
|
<field name="nextcall" |
|
|
<field name="nextcall" |
|
|
eval="str(datetime.utcnow() + timedelta((6-datetime.utcnow().weekday()) % 7 ))" |
|
|
|
|
|
|
|
|
eval="(datetime.utcnow() + timedelta((6-datetime.utcnow().weekday()) % 7 )).strftime('%Y-%m-%d 21:00:00')" |
|
|
/> |
|
|
/> |
|
|
<field name="model">beesdoo.shift.shift</field> |
|
|
<field name="model">beesdoo.shift.shift</field> |
|
|
<field name="function">_cron_send_weekly_emails</field> |
|
|
<field name="function">_cron_send_weekly_emails</field> |
|
|
|
@ -8,7 +8,16 @@ from openerp import _, api, exceptions, fields, models |
|
|
from openerp.exceptions import UserError, ValidationError |
|
|
from openerp.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" |
|
|
_name = "beesdoo.shift.sheet.shift" |
|
|
_description = "Copy of an actual shift into an attendance sheet" |
|
|
_description = "Copy of an actual shift into an attendance sheet" |
|
|
_order = "task_type_id, worker_name" |
|
|
_order = "task_type_id, worker_name" |
|
|