Community mailing list archives

Re: Using scheduler in V8

Vũ Quốc Hoàng
- 09/02/2014 23:45:07
Sorry if I have mistake.
I wrote some schedulers for V8. Could you describe more specific?
Normally, there is not much difference between V7 and V8.
What you should do is:
1. Creat a record for scheduler by xml file
<record model="ir.cron" id="weekly_timesheet_nofitication">
            <field name="name">Weekly Timesheet Notification </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" eval="'hr.analytic.timesheet'"/>
            <field name="function" eval="'weekly_timesheet_nofitication_scheduler'"/>
            <field name="args" eval="'()'" />
2. In object: hr.analytic.timesheet, create a method: weekly_timesheet_nofitication_scheduler
def weekly_timesheet_nofitication_scheduler(self, cr, uid, context=None)
        except Exception:
            logging.exception("ERROR!", exc_info=1)
Then upgrade the modules and you are able to run scheduler.

On Wed, Sep 3, 2014 at 4:52 AM, Kwesi Smith <> wrote:

Hello All,

Does anyone have experience implementing a scheduler functions using the new V8 api? I'm currently using V8 rc1. I checked all the default scheduler functions and they all use the V7 format. When I tried the V8 function signature, it failed complaining of  sufficient args.

Post to:

Hoang Vu Quoc
Technical Consultant
Mobile: +84-(0)1679011991
Office: +84 (0)862-737-605
Skype: hoangvq.uit

trobz - Open Source Solutions for the Enterprise
Address: 4th floor, 47/2/57 Bui Dinh Tuy st. , Binh Thanh dist., HCMC
(access map here)