~unifield-team/unifield-web/qt-int

« back to all changes in this revision

Viewing changes to addons/openerp/static/javascript/listgrid.js

  • Committer: jf
  • Date: 2016-10-25 09:51:48 UTC
  • mfrom: (4807.4.1 unifield-web)
  • Revision ID: jfb@tempo-consulting.fr-20161025095148-ksuumgr4w7ndjs47
US-1647 [FIX] List view: keep approximation when user switches from tree to form view

lp:~fabien-morin/unifield-web/fm-us-1647

Show diffs side-by-side

added added

removed removed

Lines of Context:
599
599
                context: openobject.dom.get(prefix + '_terp_context').value,
600
600
                limit: openobject.dom.get(prefix + '_terp_limit').value,
601
601
                offset: openobject.dom.get(prefix + '_terp_offset').value,
602
 
                count: openobject.dom.get(prefix + '_terp_count').value}));
 
602
                count: openobject.dom.get(prefix + '_terp_count').value,
 
603
                approximation: openobject.dom.get(prefix + '_terp_approximation').value}));
603
604
        }
604
605
 
605
606
        name = name.split('.').pop();
784
785
 
785
786
        var $terp_ids;
786
787
        var $terp_count;
 
788
        var $terp_approximation;
787
789
 
788
790
        if(this.name == '_terp_list') {
789
791
            $terp_ids = jQuery('#_terp_ids')
790
792
            $terp_count = jQuery('#_terp_count')
 
793
            $terp_approximation = jQuery('#_terp_approximation')
791
794
        }
792
795
        else {
793
796
            $terp_ids = jQuery('[id="'+this.name+'/_terp_ids'+'"]')
794
797
            $terp_count =  jQuery('[id="'+this.name+'/_terp_count'+'"]')
 
798
            $terp_approximation =  jQuery('[id="'+this.name+'/_terp_approximation'+'"]')
795
799
        }
796
800
 
797
801
        args['_terp_ids'] = $terp_ids.val()
807
811
                if(obj.ids) {
808
812
                    $terp_ids.val(obj.ids)
809
813
                    $terp_count.val(obj.count)
 
814
                    $terp_approximation.val(obj.approximation)
810
815
                }
811
816
                self.reload();
812
817
                if(obj.res_ids) {
912
917
                var _terp_id = openobject.dom.get(self.name + '/_terp_id') || openobject.dom.get('_terp_id');
913
918
                var _terp_ids = openobject.dom.get(self.name + '/_terp_ids') || openobject.dom.get('_terp_ids');
914
919
                var _terp_count = openobject.dom.get(self.name + '/_terp_count') || openobject.dom.get('_terp_count');
 
920
                var _terp_approximation = openobject.dom.get(self.name + '/_terp_approximation') || openobject.dom.get('_terp_approximation');
915
921
                _terp_id.value = current_id > 0 ? current_id : 'False';
916
922
 
917
923
                if (obj.ids) {