You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In order to update a record using a sequence:
- before this commit one would have to use a python expression like
`env['ir.sequence'].next_by_code('the_sequence_code')` which was not
very discoverable.
- after this commit there is a standard way to select a sequence through
the server action's form view.
Task id: opw-4689501
closesodoo#208376
Signed-off-by: Lucas Perais (lpe) <[email protected]>
Copy file name to clipboardExpand all lines: odoo/addons/base/views/ir_actions_views.xml
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -382,12 +382,14 @@
382
382
<spaninvisible="evaluation_type != 'value' or update_field_type not in ['one2many', 'many2many']">by</span>
383
383
<fieldname="update_m2m_operation"class="oe_inline"invisible="evaluation_type != 'value' or update_field_type not in ['one2many', 'many2many']"required="update_field_type in ['one2many', 'many2many']"/>
384
384
<spaninvisible="evaluation_type != 'value' or update_field_type in ['one2many', 'many2many']">to</span>
<fieldname="value"class="oe_inline"placeholder="Set a value..."invisible="update_field_id == False or value_field_to_show != 'value' or evaluation_type != 'value'"string="Custom Value"/>
386
387
<fieldname="html_value"class="w-100"placeholder="Set a value..."invisible="update_field_id == False or value_field_to_show != 'html_value' or evaluation_type != 'value'"string="Custom Value"/>
388
+
<fieldname="sequence_id"class="oe_inline"placeholder="Select a sequence..."invisible="evaluation_type != 'sequence'"required="evaluation_type == 'sequence'"/>
387
389
<fieldname="resource_ref"class="oe_inline"placeholder="Choose a value..."string="Custom Value"options="{'model_field': 'update_related_model_id', 'no_create': True, 'no_open': True}"invisible="update_field_id == False or value_field_to_show != 'resource_ref' or evaluation_type == 'equation' or update_m2m_operation == 'clear'"/>
388
390
<fieldname="selection_value"class="oe_inline"placeholder="Choose a value..."options="{'no_create': True, 'no_open': True}"invisible="update_field_id == False or value_field_to_show != 'selection_value' or evaluation_type == 'equation'"/>
389
391
<fieldname="update_boolean_value"class="oe_inline"invisible="evaluation_type != 'value' or value_field_to_show != 'update_boolean_value'"required="value_field_to_show == 'update_boolean_value'"/>
390
-
<spaninvisible="update_field_id != False or evaluation_type == 'equation'"class="o_actions_server_set_a_value text-muted">Set a value...</span>
392
+
<spaninvisible="update_field_id != False or evaluation_type != 'value'"class="o_actions_server_set_a_value text-muted">Set a value...</span>
0 commit comments