> 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.
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp