ir.actions.actions ir.actions.actions
ir.actions.actions.list ir.actions.actions ir.actions.actions.search ir.actions.actions Actions ir.actions.actions ir.actions.report ir.actions.report
ir.actions.report.list ir.actions.report ir.actions.report.search ir.actions.report Reports ir.actions.report ir.actions.client.form ir.actions.client
ir.actions.windows.list 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 list form Client Actions ir.actions.client Client Actions ir.actions.client Server Action ir.actions.server

by to Set a value... to this Python expression:
Available variables:
  • env: environment on which the action is triggered
  • model: model of the record on which the action is triggered; is a void recordset
  • record: record on which the action is triggered
  • records: recordset of all records on which the action is triggered in multi mode
  • time, datetime, dateutil, timezone: useful Python libraries
  • float_compare(): utility function to compare floats based on a specific precision

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.

The following variables can be used:

  • env: environment on which the action is triggered
  • model: 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
  • float_compare(): utility function to compare floats based on a specific precision
  • log(message, level='info'): logging function to record debug information in ir.logging table
  • _logger.info(message): logger to emit messages in server logs
  • UserError: exception class for raising user-facing warning messages
  • Command: x2many commands namespace
  • To return an action, assign: action = {...}
  • To notify progress for CRON call and re-trigger a call if there is remaining tasks, use env['ir.cron']._notify_progress(done=task_done_count, remaining=task_remaining_count)

Example of Python code:

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