Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
5293 Ansichten

Im customizing the search dialog in many2one field.

SO im customizing in form_common.js

_search_create_popup: function(view, ids, context) {


        new SelectCreateDialog(this, _.extend({}, (this.options || {}), {

        //alert('SelectCreateDialog: '+ JSON.stringify(self.field));

            res_model: self.field.relation,

            domain: self.build_domain(),

            context: new data.CompoundContext(self.build_context(), context || {}),

            title: (view === 'search' ? _t("Search: ") : _t("Create: ")) + this.string,

            initial_ids: ids ? _.map(ids, function(x) {return x[0];}) : undefined,

            initial_view: view,

            disable_multiple_selection: multiple_selection,

            on_selected: function(element_ids) {

                      var newcontext = {'po_ids': [1,2,3,4]};  // to add this elemnet in context

                     self.add_id(element_ids[0]);

                    self.focus();

        }

}


My query id how to add the new element in  var newcontext = {'po_ids': [1,2,3,4]};  in this.context ,

Anyone help me to resolve this issue.

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
2
Dez. 22
16320
1
Apr. 20
142
1
Juni 19
4266
2
Juni 18
89
0
März 18
5880