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})