Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
5732 Tampilan

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?

Avatar
Buang
Jawaban Terbai

Hi, look here

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
0
Nov 15
3553
2
Jun 23
2959
0
Mei 21
1751
0
Mar 23
1229
1
Okt 22
3052