~unifield-team/unifield-web/uf1.0-6

« back to all changes in this revision

Viewing changes to addons/openerp/widgets/templates/listgrid/listgrid.mako

  • Committer: jf
  • Date: 2015-10-01 09:05:17 UTC
  • mfrom: (4768.1.1 unifield-web)
  • Revision ID: jfb@tempo-consulting.fr-20151001090517-w76k2vjzdwcfwqu1
SP-202 [IMP] Add attribute allow_sort on fields.function to allow sorting
lp:~jfb-tempo-consulting/unifield-web/sp-202

Show diffs side-by-side

added added

removed removed

Lines of Context:
244
244
                                % for (field, field_attrs) in headers:
245
245
                                    % if field == 'button':
246
246
                                        <th class="grid-cell"><div style="width: 0;"></div></th>
247
 
                                    % elif (field_attrs.get('function') and not field_attrs.get('store')) or field_attrs.get('not_sortable'):
 
247
                                    % elif (field_attrs.get('function') and not field_attrs.get('store') and not field_attrs.get('allow_sort')) or field_attrs.get('not_sortable'):
248
248
                                        <th id="grid-data-column/${(name != '_terp_list' or None) and (name + '/')}${field}" class="grid-cell ${field_attrs.get('type', 'char')}" kind="${field_attrs.get('type', 'char')}">${field_attrs['string']}</th>
249
249
                                    % else:
250
250
                                        <th id="grid-data-column/${(name != '_terp_list' or None) and (name + '/')}${field}" class="grid-cell ${field_attrs.get('type', 'char')}" kind="${field_attrs.get('type', 'char')}" style="cursor: pointer;" onclick="new ListView('${name}').sort_by_order('${field}', this)">${field_attrs['string']}</th>