Odoo Help

Welcome!

This community 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.

2

Schedule to run Server Actions

By
Daniel Reis
on 12/12/13, 11:13 AM 4,683 views

The Scheduler allows you to regularly run a processs.

But the "action triggered" must be a method on an object.

I would like to run a Server Action instead - what would be my options?

have you try to make a dummy object and call the server Action inside?

initOS GmbH, Torsten Francke
on 12/12/13, 4:32 PM

If it worked for you, you should accept the answer. See http://help.openerp.com/question/1477/meta-add-to-the-faq-explanation-on-why-to-accept-answers/

Leonardo Donelli
on 3/10/14, 6:21 AM
6

Leonardo Donelli

--Leonardo Donelli--
1040
| 5 4 8
Cave, Italy
--Leonardo Donelli--

Physics student and part-time developer.

Leonardo Donelli
On 1/17/14, 8:01 AM

As everything in OpenERP, a server action is an object, and you want execute the method run

1. Create the server action you want to execute

2. Find its ID
You'll need the ID of the server action to pass as argument of your scheduled action. You can find it in several ways: select the action and look for id=<action_id> in the address bar, enable developer mode and select view_log in the developer options, find it in the database using psql or pgadmin...

3. Create the scheduled action
Use the following values:

  • Object: ir.actions.server
  • Method: run
  • Arguments: ([<id_of_the_action],) e.g. ([596],)
    (cr and uid are passed automatically)

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 12/12/13, 11:13 AM
Seen: 4683 times
Last updated: 2/12/16, 6:09 PM