[IMP] General ledger -> Entry sort by make it in common

bzr revid: mra@mra-laptop-20100713045220-jgt1jd33y6zieyqn
This commit is contained in:
Mustufa Rangwala 2010-07-13 10:22:20 +05:30
parent a031e8d55f
commit 0068f993e0
2 changed files with 6 additions and 0 deletions

View File

@ -80,6 +80,11 @@ class account_journal_common_default(object):
return pooler.get_pool(self.cr.dbname).get('account.account').browse(self.cr, self.uid, data['form']['chart_account_id']).name
return ''
def _get_sortby(self, data):
if data.get('form', False) and data['form'].get('sortby', False):
return data['form']['sortby']
return ''
def _get_filter(self, data):
if data.get('form', False) and data['form'].get('filter', False):
if data['form']['filter'] == 'filter_date':

View File

@ -70,6 +70,7 @@ class general_ledger(rml_parse.rml_parse, account_journal_common_default):
'get_account': self._get_account,
'get_start_period': self.get_start_period,
'get_end_period': self.get_end_period,
'get_sortby': self._get_sortby
})
self.context = context