Xavier ALT (OpenERP) has proposed merging
lp:~openerp-dev/openobject-client-web/6.0-opw-572735-xal into
lp:openobject-client-web.
Requested reviews:
Xavier (Open ERP) (xmo)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-572735-xal/+merge/107982
Hi,
This fix the group_by feature within many2one "search popup", making "expand"
column and "radio button" visible.
Steps:
- Create a new Sale Order
- In the "Customer" field, click on the "looking glass"
- Within the popup, expand "Group By" and click on "Salesman"
Current: Only group line are shown
Expected: Expand column and selection radio button should been shown.
Cheers,
Xavier
--
https://code.launchpad.net/~openerp-dev/openobject-client-web/6.0-opw-572735-xal/+merge/107982
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-client-web/6.0-opw-572735-xal.
=== modified file 'addons/openerp/widgets/templates/listgrid/listgroup.mako'
--- addons/openerp/widgets/templates/listgrid/listgroup.mako 2011-08-30 11:41:21 +0000
+++ addons/openerp/widgets/templates/listgrid/listgroup.mako 2012-05-30 14:08:27 +0000
@@ -34,7 +34,7 @@
<table id="${name}_grid" class="grid" width="100%" cellspacing="0" cellpadding="0">
<thead>
<tr class="grid-header">
- % if editable:
+ % if editable or selectable:
<th class="grid-cell selector"><div style="width: 0;"></div></th>
% endif
% for (field, field_attrs) in headers:
@@ -53,7 +53,7 @@
<tbody>
% for j, grp_row in enumerate(grp_records):
<tr class="grid-row-group" grp_by_id="${grp_row.get('group_by_id')}" records="${grp_row.get('groups_id')}" style="cursor: pointer; " ch_records="${map(lambda x: x['id'], grp_row['child_rec'])}" grp_domain="${grp_row['__domain']}" grp_context="${grp_row['__context']['group_by']}">
- % if editable:
+ % if editable or selectable:
% if len(group_by_ctx) == 1 and group_by_no_leaf:
<td class="grid-cell"></td>
@@ -112,6 +112,21 @@
title="${_('Edit')}" onclick="editRecord(${ch.get('id')}, '${source}')"/>
</td>
% endif
+ % if selector:
+ <td class="grid-cell selector">
+ % if not m2m:
+ <%
+ selector_click = "new ListView('%s').onBooleanClicked(!this.checked, '%s');" % (name, ch.get('id'))
+ if selector == "radio":
+ selector_click += " do_select();"
+ %>
+ <input type="${selector}" class="${selector} grid-record-selector"
+ id="${name}/${ch.get('id')}" name="${(checkbox_name or None) and name}"
+ value="${ch.get('id')}"
+ onclick="${selector_click}"/>
+ % endif
+ </td>
+ % endif
% for i, (field, field_attrs) in enumerate(headers):
% if field != 'button':
<td class="grid-cell ${field_attrs.get('type', 'char')}"
@@ -138,7 +153,7 @@
% for i in range(0, min_rows - len(grp_records)):
<tr class="grid-row-group">
- % if editable:
+ % if editable or selectable:
<td style="text-align: center" class="grid-cell selector"> </td>
% endif
% for i, (field, field_attrs) in enumerate(headers):
@@ -155,7 +170,7 @@
% if field_total:
<tfoot>
<tr class="field_sum">
- % if editable:
+ % if editable or selectable:
<td width="1%" class="grid-cell"> </td>
% endif
% for i, (field, field_attrs) in enumerate(headers):
_______________________________________________
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