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
parent
commit
82cb43b4e5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      beesdoo_shift/data/cron.xml
  2. 11
      beesdoo_shift/models/attendance_sheet.py

2
beesdoo_shift/data/cron.xml

@ -67,7 +67,7 @@
<field name="numbercall">-1</field>
<field name="doall" eval="False" />
<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="function">_cron_send_weekly_emails</field>

11
beesdoo_shift/models/attendance_sheet.py

@ -8,7 +8,16 @@ from openerp import _, api, exceptions, fields, models
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"
_description = "Copy of an actual shift into an attendance sheet"
_order = "task_type_id, worker_name"

Loading…
Cancel
Save