I'm trying to call a server action from another server action in Odoo 10. According to the documentation you can assign an action variable within the code of the first action in order to call the next action:
https://www.odoo.com/documentation/10.0/reference/actions.html#code
This doesn't seem to be working for me.
My first action is defined on the stock.quant model with the following code:
if record:
log('main')
action = { "type": "ir.actions.server", "id": 366, "model_id": record.product_id.id, }
Then, I have another server action defined, which has database id 366. It's defined on the product.product model with the following code:
log('triggered')
When I trigger the first action, I would expect to see a log entry for "main" and an entry for "triggered". However, I only see an entry for "main", indication that the second action never gets triggered.
Am I doing something wrong? What is the appropriate way to trigger one server action from another server action?