Browse Source

[FIX] Module beesdoo_shift : fixed cron jobs definition to fit version 12.0 requirements.

pull/105/head
Elouan 5 years ago
parent
commit
eba5c74bcc
  1. 7
      beesdoo_shift/data/cron.xml
  2. 1
      beesdoo_shift/models/cooperative_status.py

7
beesdoo_shift/data/cron.xml

@ -6,18 +6,17 @@
<field name="interval_type">hours</field>
<field name="numbercall">-1</field>
<field name="doall" eval="False" />
<field name="model_id" ref="cooperative.status">
<field name="model_id" ref="model_cooperative_status" />
<field name="code">model._set_today()</field>
</record>
<record id="ir_cron_generate_next_planning" model="ir.cron">
<field name="name">Generate Next Planning</field>
<field name="interval_number">1</field>
<field name="interval_type">weeks</field>
<field name="numbercall">-1</field>
<field name="doall" eval="False" />
<field name="model_id" ref="beesdoo.shift.planning">
<field name="model_id" ref="model_beesdoo_shift_planning" />
<field name="code">model._generate_next_planning()</field>
<field name="active" eval="False" />
</record>
@ -28,7 +27,7 @@
<field name="interval_type">hours</field>
<field name="numbercall">-1</field>
<field name="doall" eval="True" />
<field name="model_id" ref="cooperative.status">
<field name="model_id" ref="model_cooperative_status" />
<field name="code">model._cron_compute_counter_irregular()</field>
<field name="active" eval="False" />
</record>

1
beesdoo_shift/models/cooperative_status.py

@ -3,7 +3,6 @@ from odoo.exceptions import ValidationError
from datetime import timedelta, datetime
import logging
from odoo.osv.fields import related
_logger = logging.getLogger(__name__)
PERIOD = 28 # TODO: use system parameter

Loading…
Cancel
Save