ir.actions.actions ir.actions.actions
ir.actions.actions.tree ir.actions.actions ir.actions.actions.search ir.actions.actions Actions ir.actions.act_window ir.actions.actions ir.actions.report ir.actions.report
ir.actions.report.tree ir.actions.report ir.actions.report.search ir.actions.report Reports ir.actions.act_window ir.actions.report ir.actions.windows.tree ir.actions.act_window ir.actions.windows.form ir.actions.act_window
ir.actions.windows.search ir.actions.act_window Window Actions ir.actions.act_window ir.actions.act_window tree form Server Action ir.actions.server

Please set the Model to Create before choosing values

If several child actions return an action, only the last one will be executed. This may happen when having server actions executing code that returns an action, or server actions returning a client action.

Help with Python expressions

Various fields may use Python code or Python expressions. The following variables can be used:

  • env: Odoo Environment on which the action is triggered
  • model: Odoo Model of the record on which the action is triggered; is a void recordset
  • record: record on which the action is triggered; may be be void
  • records: recordset of all records on which the action is triggered in multi mode; may be void
  • time, datetime, dateutil, timezone: useful Python libraries
  • log(message, level='info'): logging function to record debug information in ir.logging table
  • UserError: Warning Exception to use with raise
  • Command: x2Many commands namespace
  • To return an action, assign: action = {...}

Example of Python code

partner_name = record.name + '_code' \n env['res.partner'].create({'name': partner_name})
Server Actions ir.actions.server ir.actions.server.search ir.actions.server Server Actions ir.actions.act_window ir.actions.server tree,form {'key':'server_action'} ir.actions.todo Config Wizard Steps