Commit d46ef338 authored by Jérome Perrin's avatar Jérome Perrin

Makes filter button works in UI.

To have correct stat method, the following scripts in erp5_accounting have to be modified:
AccountingTransactionModule_zGetAccountingTransactionList
Resource_zStatInventory
AccountModule_statAccountingTransactionCount
AccountModule_statTotalSourceDebit
AccountModule_statTotalSourceCredit
AccountModule_statBalance

They have been fixed in nexedi ERP5 and will be released with the next erp5_accounting buisness template.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3053 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9b51db3b
......@@ -1018,7 +1018,7 @@ class ListBoxWidget(Widget.Widget):
else:
#LOG('ListBox 612', 0, str((selection_name, selection.__dict__)))
if list_method is not None:
if count_method is not None:
if count_method is not None and not selection.invert_mode:
#LOG('ListBox', 0, 'use count_method %r' % count_method)
# If the count method is available, get only required objects.
kw['limit'] = (start, lines)
......
......@@ -208,7 +208,7 @@ class Selection(Acquisition.Implicit, Traversable, Persistent):
return []
else:
# We sould try to allow more filtering
return context.portal_catalog(uid = self.uids)
return context.portal_catalog(uid = self.uids, **self.params)
def __getitem__(self, index, REQUEST=None):
return self(REQUEST)[index]
......@@ -314,6 +314,10 @@ class Selection(Acquisition.Implicit, Traversable, Persistent):
self.report_opened = 1
return self.report_opened
security.declarePublic('isInvertMode')
def isInvertMode(self):
return self.invert_mode
InitializeClass(Selection)
allow_class(Selection)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment