Community mailing list archives
Re: Using scheduler in V8by
No. I thought the new API was already imported into rc1. Please how do you import API?
Hello.Did you import api?On Wed, Sep 3, 2014 at 11:58 AM, Kwesi Smith <email@example.com> wrote:
In V8, you can rewrite 2 as:
def weekly_timesheet_notification_schedule (self):
The cron job does not execute this and complains of missing args.
However using "def weekly_timesheet_nofitication_scheduler(self, cr, uid, context=None)" works. Does that mean the new V8 api for function specification is not yet supported?
Thanks for your help.
Kwesi.On Sep 3, 2014 3:55 AM, "Hoang Vu Quoc" <firstname.lastname@example.org> wrote:
> 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 <email@example.com> 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.
>> Mailing-List: https://www.odoo.com/groups/community-59
>> Post to: mailto:firstname.lastname@example.org
>> Unsubscribe: https://www.odoo.com/groups?unsubscribe
> Hoang Vu Quoc
> Technical Consultant
> Mobile: +84-(0)1679011991
> Office: +84 (0)862-737-605
> Email: email@example.com
> 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)
> Website: http://www.trobz.com/
> Mailing-List: https://www.odoo.com/groups/community-59
> Post to: mailto:firstname.lastname@example.org
> Unsubscribe: https://www.odoo.com/groups?unsubscribe