diff options
| author | Victor Feyens <vfe@odoo.com> | 2019-04-18 14:18:52 +0000 |
|---|---|---|
| committer | Victor Feyens <vfe@odoo.com> | 2019-09-18 08:54:18 +0000 |
| commit | 29ce2cab28eda45b5afc7f320e366bbc3aff0bd7 (patch) | |
| tree | 9fd4cb62a54c07a73c7be093b3f41f989c17b34e | |
| parent | 96e208c19122b355437968297de2669eda2bed4a (diff) | |
[DOC] Base : ir.actions.server : fix wrong docstrings.
Wrong since 8fa9f7d6d4bc75bb78547358c3cb1c398b1a52ca refactoring
ir.actions.server.
| -rw-r--r-- | odoo/addons/base/models/ir_actions.py | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/odoo/addons/base/models/ir_actions.py b/odoo/addons/base/models/ir_actions.py index 96ff465b59a..dbbb9d9590d 100644 --- a/odoo/addons/base/models/ir_actions.py +++ b/odoo/addons/base/models/ir_actions.py @@ -335,9 +335,7 @@ class IrActionsServer(models.Model): The available actions are : - 'Execute Python Code': a block of python code that will be executed - - 'Run a Client Action': choose a client action to launch - - 'Create or Copy a new Record': create a new record with new values, or - copy an existing record in your database + - 'Create a new Record': create a new record with new values - 'Write on a Record': update the values of a record - 'Execute several actions': define an action that triggers several other server actions @@ -378,11 +376,12 @@ class IrActionsServer(models.Model): default='object_write', required=True, help="Type of server action. The following values are available:\n" "- 'Execute Python Code': a block of python code that will be executed\n" - "- 'Create or Copy a new Record': create a new record with new values, or copy an existing record in your database\n" - "- 'Write on a Record': update the values of a record\n" + "- 'Create': create a new record with new values\n" + "- 'Update a Record': update the values of a record\n" "- 'Execute several actions': define an action that triggers several other server actions\n" - "- 'Add Followers': add followers to a record (available in Discuss)\n" - "- 'Send Email': automatically send an email (available in email_template)") + "- 'Send Email': automatically send an email (Discuss)\n" + "- 'Add Followers': add followers to a record (Discuss)\n" + "- 'Create Next Activity': create an activity (Discuss)") # Generic sequence = fields.Integer(default=5, help="When dealing with multiple actions, the execution order is " @@ -460,15 +459,7 @@ class IrActionsServer(models.Model): @api.model def run_action_object_write(self, action, eval_context=None): - """ Write server action. - - - 1. evaluate the value mapping - - 2. depending on the write configuration: - - - `current`: id = active_id - - `other`: id = from reference object - - `expression`: id = from expression evaluation - """ + """Apply specified write changes to active_id.""" res = {} for exp in action.fields_lines: res[exp.col1.name] = exp.eval_value(eval_context=eval_context)[exp.id] @@ -482,16 +473,9 @@ class IrActionsServer(models.Model): @api.model def run_action_object_create(self, action, eval_context=None): - """ Create and Copy server action. - - - 1. evaluate the value mapping - - 2. depending on the write configuration: + """Create specified model object with specified values. - - `new`: new record in the base model - - `copy_current`: copy the current record (id = active_id) + gives custom values - - `new_other`: new record in target model - - `copy_other`: copy the current record (id from reference object) - + gives custom values + If applicable, link active_id.<self.link_field_id> to the new record. """ res = {} for exp in action.fields_lines: |
