openerp-dev-web team mailing list archive
-
openerp-dev-web team
-
Mailing list archive
-
Message #03416
[Merge] lp:~openerp-dev/openobject-client-web/trunk-bug-721840-kch into lp:openobject-client-web
Kunal Chavda (OpenERP) has proposed merging lp:~openerp-dev/openobject-client-web/trunk-bug-721840-kch into lp:openobject-client-web.
Requested reviews:
OpenERP SA's Web Client R&D (openerp-dev-web)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client-web/trunk-bug-721840-kch/+merge/51111
Naming conflicts in wiki as we are using 'group_id' for group record information.
So now i used 'groups_id' instead of 'group_id'.
--
https://code.launchpad.net/~openerp-dev/openobject-client-web/trunk-bug-721840-kch/+merge/51111
Your team OpenERP R&D Team is subscribed to branch lp:~openerp-dev/openobject-client-web/trunk-bug-721840-kch.
=== modified file 'addons/openerp/widgets/listgroup.py'
--- addons/openerp/widgets/listgroup.py 2011-02-10 16:09:23 +0000
+++ addons/openerp/widgets/listgroup.py 2011-02-24 12:01:38 +0000
@@ -7,7 +7,7 @@
# Developed by OpenERP (http://openerp.com) and Axelor (http://axelor.com).
#
# The OpenERP web client is distributed under the "OpenERP Public License".
-# It's based on Mozilla Public License Version (MPL) 1.1 with following
+# It's based on Mozilla Public License Version (MPL) 1.1 with following
# restrictions:
#
# - All names, links and logos of OpenERP must be kept as in original
@@ -113,7 +113,7 @@
for d in data
if int(str(d.get('id'))) == id] # Need to convert in String and then Int.
rec['child_rec'] = ch_ids
- rec['group_id'] = 'group_' + str(random.randrange(1, 10000))
+ rec['groups_id'] = 'group_' + str(random.randrange(1, 10000))
if group_by:
rec['group_by_id'] = group_by[0]+'_'+str(grp_records.index(rec))
=== modified file 'addons/openerp/widgets/templates/listgrid/listgroup.mako'
--- addons/openerp/widgets/templates/listgrid/listgroup.mako 2011-01-18 23:02:21 +0000
+++ addons/openerp/widgets/templates/listgrid/listgroup.mako 2011-02-24 12:01:38 +0000
@@ -18,7 +18,7 @@
% if editable:
<td class="pager-cell-button">
<button id="${name}_new" title="${_('Create new record.')}" onclick="editRecord(null); return false;">${_('New')}</button>
- </td>
+ </td>
% endif
<td class="pager-cell" style="width: 90%">
${pager.display()}
@@ -28,7 +28,7 @@
</td>
</tr>
% endif
-
+
<tr>
<td colspan="2" class="grid-content">
<table id="${name}_grid" class="grid" width="100%" cellspacing="0" cellpadding="0">
@@ -52,14 +52,14 @@
<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('group_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']}">
+ <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 len(group_by_ctx) == 1 and group_by_no_leaf:
<td class="grid-cell"></td>
% elif len(group_by_ctx) > 0:
<td class="grid-cell group-expand"
- onclick="new ListView('${name}').group_by('${grp_row.get('group_by_id')}', '${grp_row.get('group_id')}', '${group_by_no_leaf}', this);">
+ onclick="new ListView('${name}').group_by('${grp_row.get('group_by_id')}', '${grp_row.get('groups_id')}', '${group_by_no_leaf}', this);">
</td>
% else:
<td class="grid-cell"></td>
@@ -86,7 +86,7 @@
% else:
<span style="color: #888;"> </span>
% endif
- % endif
+ % endif
% endif
</td>
% else:
@@ -95,7 +95,7 @@
</td>
% endif
% endfor
-
+
% if editable:
<td class="grid-cell selector" >
<div style="width: 0;"></div>
@@ -104,7 +104,7 @@
</tr>
% for ch in grp_row.get('child_rec'):
- <tr class="grid-row grid-row-group" id="${grp_row.get('group_id')}" parent_grp_id="${grp_row.get('group_by_id')}"
+ <tr class="grid-row grid-row-group" id="${grp_row.get('groups_id')}" parent_grp_id="${grp_row.get('group_by_id')}"
record="${ch.get('id')}" style="cursor: pointer; display: none;">
% if editable:
<td class="grid-cell">
@@ -198,7 +198,7 @@
},
axis: 'y'
});
-
+
jQuery('#${name} tr.grid-row-group').droppable({
accept : 'tr.grid-row-group',
hoverClass: 'grid-rowdrop',
=== modified file 'addons/openerp/widgets/templates/listgrid/multiple_group.mako'
--- addons/openerp/widgets/templates/listgrid/multiple_group.mako 2010-12-24 07:20:09 +0000
+++ addons/openerp/widgets/templates/listgrid/multiple_group.mako 2011-02-24 12:01:38 +0000
@@ -4,7 +4,7 @@
%>
% for j, grp_row in enumerate(grp_records):
<tr class="grid-row-group" parent="${parent_group}" grp_by_id="${grp_row['group_by_id']}"
- records="${grp_row['group_id']}" style="cursor: pointer; background-color: ${background};"
+ records="${grp_row['groups_id']}" style="cursor: pointer; background-color: ${background};"
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:
@@ -19,7 +19,7 @@
subgroup_class = ''
else:
subgroup_expander = "new ListView('%s').group_by('%s', '%s', '%s', this)" % (
- name, grp_row['group_by_id'], grp_row['group_id'], group_by_no_leaf)
+ name, grp_row['group_by_id'], grp_row['groups_id'], group_by_no_leaf)
subgroup_class = 'group-expand'
else:
subgroup_expander = ''
@@ -54,7 +54,7 @@
% endif
</tr>
% for ch in grp_row.get('child_rec'):
- <tr class="grid-row grid-row-group" id="${grp_row.get('group_id')}" parent="${parent_group}"
+ <tr class="grid-row grid-row-group" id="${grp_row.get('groups_id')}" parent="${parent_group}"
parent_grp_id="${grp_row.get('group_by_id')}" record="${ch.get('id')}"
style="cursor: pointer; display:none;">
% if editable:
Follow ups