'regex_name': fields.char('Regex on Resource Name', size=128, help="Regular expression for matching name of the resource\
\ne.g.: 'urgent.*' will search for records having name starting with the string 'urgent'\
\nNote: This is case sensitive search."),
- 'server_action_ids': fields.many2many('ir.actions.server', 'Server Action', help="Define Server actions.\neg:Email Reminders, Call Object Service, etc.."),
+ 'server_action_ids': fields.one2many('ir.actions.server', 'action_rule_id', 'Server Action', help="Define Server actions.\neg:Email Reminders, Call Object Service, etc.."),
'filter_id':fields.many2one('ir.filters', 'Filter', required=False), #TODO: set domain [('model_id','=',model)]
'last_run': fields.datetime('Last Run', readonly=1),
}
base_action_rule()
+class actions_server(osv.osv):
+ _inherit = 'ir.actions.server'
+ _columns = {
+ 'action_rule_id': fields.many2one("base.action.rule", string="Action Rule")
+ }
+actions_server()
class ir_cron(osv.osv):
_inherit = 'ir.cron'
<group col="4">
<field name="name"/>
<field name="model_id"/>
- <field name="filter_id" domain="[('model_id','=',model_id)]"/>
+ <field name="filter_id" domain="[('model_id','=',model_id)]" context="{'default_model_id': model_id}"/>
<field name="sequence"/>
<field name="active"/>
</group>
</group>
</page>
<page string="Actions">
- <group name="action_field" string="Fields to Change">
+ <group name="action_followers">
+ <field name="act_followers" widget="many2many_tags"/>
+ </group>
+ <group name="action_field" col="4" string="Fields to Change">
<field name="act_user_id"/>
<field name="act_state"/>
</group>
- <group name="action_server" string="Server Action to be Triggered (eg. Email Reminder, Call Object Method, etc...)">
- <field name="server_action_ids" domain="[('model_id','=', model_id)]" nolabel="1"/>
- </group>
- <group name="action_followers" string="Add Followers">
- <field name="act_followers" widget="many2many_tags" nolabel="1"/>
+ <group name="action_server" string="Server Actions to be Triggered (eg. Email Reminder, Call Object Method, etc...)" >
+ <field name="server_action_ids" domain="[('model_id','=', model_id)]" nolabel="1" context="{'default_model_id': model_id}">
+ <tree string="Server Actions">
+ <field name="sequence"/>
+ <field name="name"/>
+ <field name="state"/>
+ </tree>
+ </field>
</group>
+
</page>
</notebook>
</form>