Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to create scheduler in OpenERP

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 316
    Comment on it

    A Scheduler helps to identify the necessary task, assigns a logical sequence to these tasks and monitor their execution. The main purpose of Scheduler is to identify tasks are on time.
    (Note: Tag is only used for the next Line). There are two ways to create scheduler in ERP

    a. Functionally

    b. Technically

    a. Creating Scheduler Functionally

            Firstly simply go to Settings ->  scheduler -> scheduler action.</br>
    

    alt text


    Now create new Scheduler here give value in interval number and interval unit on Information page.

    On Technical Data page write object name in Object field and method name (which you want to call after an interval of time) in Method field.
    alt text


    2. Save the record.
    b. Creating Scheduler Technically
    Simply write it in .xml (view file)

       <record id="ir&#95;cron&#95;mail&#95;gateway&#95;action" model="ir.cron">
            <field name="name">Fetchmail JKP</field>
            <field name="interval&#95;number">3</field>
            <field name="interval&#95;type">minutes</field>
            <field name="numbercall">-1</field>
            <field name="doall" eval="False"/>
            <field name="model">mail.compose.message</field>
            <field name="function">send&#95;script&#95;mail</field>
            <field name="args">()</field>
        </record>
    

    Description of used terms:
    "scheduler_id" : is a unique xml record id
    "scheduler_name" : any desirable name
    "active" : True or False determines whether the scheduler is active or not..
    "user_id" : refers the user who owns the scheduler
    "interval_number" : number of times the scheduler is to be called based on the "interval_type"

    "interval_type" : it can be days, hours, minutes etc
    "numbercall" : Number of time the function is called. negative number indicates no limit
    "doall" : booelan field. A 'True' enables it to execute missed occurrences as soon as the server is restarts

    "model" : Name of object whose function will be called when this scheduler will run. e.g. 'res.partner'
    "function" : Name of the method to be called on the object when this scheduler is executed.
    "args" : Arguments to be passed to the method. e.g. (uid,)

    Thanks

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: