← Back to team overview

openerp-dev-web team mailing list archive

Re: lp:~openerp-dev/openobject-client-web/sidebar-domain-context into lp:openobject-client-web

 

> Why did you add the following code:
> 
>         if (eval(params['_terp_selection']).length == 0) {
>             var ids = eval(jQuery('#_terp_ids').val());
>             if (ids && ids.length > 0){
>                 params['_terp_selection'] = '[' + ids[0] + ']';
>             } else {
>                 error_display(_('You must select one or several records !'));
>             }
>         }
>         var id = eval(params['_terp_selection'])[0]
> 
> ?

If not selected any records from the listview, then it will take first record from the list and if no records in the listview then it will give the message `You must select one or several records`. It works same as GTK client.
-- 
https://code.launchpad.net/~openerp-dev/openobject-client-web/sidebar-domain-context/+merge/41567
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-client-web/sidebar-domain-context.



References