Odoo View field Opton parameters

Source: Internet
Author: User

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= "{&quot;no_open&quot;: 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.