Skip to content

Commit

Permalink
Merge pull request #137 from beescoop/9.0-fix-beesdoo_shift
Browse files Browse the repository at this point in the history
[9.0][FIX] beesdoo_shift
  • Loading branch information
remytms authored Feb 23, 2020
2 parents 8752ff1 + 59a23a6 commit 82cb43b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion beesdoo_shift/data/cron.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
11 changes: 10 additions & 1 deletion beesdoo_shift/models/attendance_sheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@
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"
Expand Down

0 comments on commit 82cb43b

Please sign in to comment.