Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I'm trying to get a basic action triggered when I save the sales order. I've tried buttin print statements and even just plain exit() in the code block, but neither seem to be getting called. I've restarted the server, upgraded the module and the XML is being loaded. This is what I have:
<?xml version="1.0" encoding="utf-8"?>
<record id="ir_actions_server_schedule_emails" model="ir.actions.server">
<field name="model_id" ref="sale.model_sale_order"/>
<field name="name">Schedule Emails</field>
Why is it not triggering?
ir.actions.server just defines an action to be taken, but it doesn't inherently have any triggers for that action. To trigger ir.actions.server on a modal update add a base.action.rule record. Use something like this:
<record id="rule_trigger_email_schedule" model="base.action.rule">
<field name="name">Trigger email scheduling.</field>
<field name="model_id" ref="sale.model_sale_order" />
<field name="server_action_ids" eval="[(6,0,[ref('ir_actions_server_schedule_emails')])]" />
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 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
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 8/24/14, 12:36 PM|
|Seen: 986 times|
|Last updated: 3/16/15, 8:10 AM|