The purpose of this commit is to handle code execution only in server action and delegate schedule management to ir_cron model. ir.cron model now inherits from ir.actions.server. Fields model, function and args are removed as well as the logic to handle them. There is no more code manipulation and evaluation in ir_cron, only a call to the run method of ir.actions.server. Cron form view use server action form view as primary view. This way automated actions use the same base form as server actions with cron details added. Thanks to @fpodoo for the original idea and preliminary work. Thanks to @jpr-odoo for first developments. Thanks to @jem-odoo for reviewing.
29 lines
1.1 KiB
XML
29 lines
1.1 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data noupdate="1">
|
|
|
|
<record forcecreate="True" id="ir_cron_scheduler_action" model="ir.cron">
|
|
<field name="name">Procurement: run MRP scheduler</field>
|
|
<field name="model_id" ref="model_procurement_order"/>
|
|
<field name="state">code</field>
|
|
<field name="code">model.run_scheduler(True)</field>
|
|
<field eval="False" name="active"/>
|
|
<field name="user_id" ref="base.user_root"/>
|
|
<field name="interval_number">1</field>
|
|
<field name="interval_type">days</field>
|
|
<field name="numbercall">-1</field>
|
|
<field eval="False" name="doall"/>
|
|
</record>
|
|
|
|
<record id="sequence_proc_group" model="ir.sequence">
|
|
<field name="name">Procurement Group</field>
|
|
<field name="code">procurement.group</field>
|
|
<field name="prefix">PG/</field>
|
|
<field name="padding">6</field>
|
|
<field name="number_next">1</field>
|
|
<field name="number_increment">1</field>
|
|
</record>
|
|
|
|
</data>
|
|
</odoo>
|