コンテンツへスキップ
メニュー
この質問にフラグが付けられました

This is my new scheduled action: https://pastebin.com/78KnL19w

and this is my function:

class HrPayslip(models.Model):    

    _inherit = "hr.payslip"

    def action_test_function(self):   ... 


if i run the action manually it works correctly, but it never runs by itself, i think i'm missing a small detail but i really can't understand, if someone cuold help me i'd appreciate


thanks in advance

アバター
破棄
最善の回答

Hello Cristian Carbone,

Please find code in comment.

I hope it will help you.

Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari

アバター
破棄

Please find below code it may help you to resolve this issue,
<?xml version="1.0" encoding="UTF-8"?>

<odoo>
<data noupdate="1">
<record id="auto_rilpre_generation_scheduler" model="ir.cron">
<field name="name">Rilpre Track: Auto Generation</field>
<field name="model_id" ref="model_hr_payslip"/>
<field name="state">code</field>
<field name="code">model.action_test_function()</field>
<field name="user_id" ref="base.user_admin"/>
<field name='interval_number'>2</field>
<field name='interval_type'>minutes</field>
<field name="numbercall">-1</field>
<field name="doall" eval="False"/>
</record>
</data>
</odoo>

著作者

code works on the community version but not on Sh; thank you for the effort!

最善の回答

Remove ="function"eval="'action_test_function'"/> from your XML code. Try after that.

アバター
破棄
著作者

thanks Pratyush, but i already tried, and still nothing

最善の回答

Hi,

Can you try add the following line of code too into your scheduled action

<field name="user_id" ref="base.user_root"/>


Regards 

アバター
破棄
著作者

hi, thanks for the effort, but it's not working, i really cannot understand what i'm missing

Hi,
Can you mention the code of action_test_function, which you are trying to run using scheduled action.

著作者

hi, the function was actually empty, my problem was that any of the scheduled actions on the database started

I was working on odoo.sh and I think it was a problem of multiple branches as I saw looking around in this forum

関連投稿 返信 ビュー 活動
1
3月 24
2008
0
11月 23
1499
1
12月 21
14165
6
4月 15
14856
2
3月 23
2503