تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
9086 أدوات العرض

Hi friendz,

I need to change the duration value from 4 to 12 hours at Scheduled Actions window of "Check Access Rule" from my custom module "taskalert".

My requirement is:

I need to change duration value and use server action and automated action to send a notification to the user regarding the task expiry as an alert.

For this to work, I need to change duration from 4 hours to 12 hours scheduling.

I tried to use this method:

       <record id="ir_cron_crm_action" model="ir.cron">
            <field name="name">Check Action Rules</field>
            <field name="interval_number">12</field>
            <field name="interval_type">hours</field>
            <field name="numbercall">-1</field>
            <field eval="False" name="doall"/>
            <field eval="'base.action.rule'" name="model"/>
            <field eval="'_check'" name="function"/>
            <field eval="'()'" name="args"/>
       </record>

Thanks & Regards,

Atchuthan

الصورة الرمزية
إهمال
أفضل إجابة

Go to Settings > Technical > Scheduler > Scheduled Actions, find your action and then change Interval Number to 12 and Interval Unit to Hours

To do it via a module ( XML file ), just update the scheduled action record:

<record id="your_scheduled_action_id" mode="ir.cron">
    <field name="interval_type">hours</field>
    <field name="interval_number">12</field>
</record>
الصورة الرمزية
إهمال
الكاتب

yeah, I know how to manually change. But I need to change this settings when I install my custom module

Ah yes, I updated my answer.

المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 24
2109
1
يوليو 20
7514
0
نوفمبر 17
3849
1
يناير 16
4020
2
مارس 15
6426