options
JSON object Specifying configuration option for the field ' s widget (including default widgets)
Option's content is given in JSON format to the JS widget in the option attribute.
For example: Project.task.form the user_id field in the attempt.
<field name= "user_id" options= "{"no_open": True}" context= "{' Default_groups_ref ': [' Base.group_user ', ' Base.group_partner_manager ', ' Project.group_project_user ']} "/>
There is such a piece of code in Form_view.js that the link button is not displayed if the M2o field has the No_open property. Must be able to click to expand.
if (! This.options.no_open)
$link. Click (function () {
var context = Self.build_context (). Eval ();
var model_obj = new Instance.web.Model (self.field.relation);
Model_obj.call (' get_formview_action ', [Self.get ("value"), context]). Then (action) {
Self.do_action (action);
});
return false;
});
Odoo View field Opton parameters