Odoo Help

1

1
1 Answer
1
Avatar

AJ Schrafel Paper Corp

--AJ Schrafel Paper Corp--
2168
| 7 5 10
Bronx, الولايات المتّحدة
--AJ Schrafel Paper Corp--

Exploring OpenERP for business

AJ Schrafel Paper Corp
22‏/7‏/2013 6:53 م

try making it like this.

<record id="ir_cron_personnel_actions" model="ir.cron">
        <field name="name">Run Personnel Actions Job</field>
        <field name="active" eval="True"/>
        <field name="interval_number">1</field>
        <field name="interval_type">days</field>
        <field name="numbercall">-1</field>
        <field name="doall" eval="False"/>
        <field name="model">hr.personnel.action</field>
        <field name="function">run_personnel_actions</field>
        <field name="args">()</field>
    </record>

Create a test button to make sure the function works or increase interval so you can see if the fuction works correctly.

2 Comments
Carlos Llamacho
25‏/7‏/2013 12:37 م

Hi, thanks for the answer. I try changing it like you suggested and make a button that called the same function. The button did what's supposed to, but still the action pass and nothing happens. I know the job is running as i can see how it changes the next date to be performed. I am thinking, if i pass the function the args (self, cr, uid, ids, context=None) that ids i supposed to take all the records in my table, right? Maybe that is the issue, what do you think?

Carlos Llamacho
25‏/7‏/2013 2:30 م

When you pass the <field name="args">()</field> that is supposed to get all records on the object that the function is stored? I think the problem may be that when the function is called the ids doesn't pass all the records ids, and therefore it doesn't get running. That would explain why when the button is called it runs, because it pass the id of the record i am currently in. I am correct?

Ask a Question
Tags
Keep Informed
1 follower(s)
About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register