formatting, indexes optimized
This commit is contained in:
parent
77ee7d15b7
commit
7220cff5ac
12 changed files with 124 additions and 126 deletions
|
@ -204,7 +204,8 @@ class Reconciliation(Workflow, ModelSQL, ModelView):
|
|||
|
||||
# unlink lines from reconciliation
|
||||
if len(reconciliation.lines) > 0:
|
||||
values['lines'] = [('remove', [x.id for x in reconciliation.lines])]
|
||||
values['lines'] = [
|
||||
('remove', [x.id for x in reconciliation.lines])]
|
||||
return values
|
||||
|
||||
@classmethod
|
||||
|
@ -339,20 +340,24 @@ class Reconciliation(Workflow, ModelSQL, ModelView):
|
|||
def get_rec_name(self, name):
|
||||
""" short + name
|
||||
"""
|
||||
return '%(from)s - %(to)s | %(start_amount)s %(symbol)s - %(end_amount)s %(symbol)s [%(num)s]' % {
|
||||
'from': Report.format_date(self.date_from, None)
|
||||
return ' '.join([
|
||||
Report.format_date(self.date_from, None)
|
||||
if self.date_from is not None else '-',
|
||||
'to': Report.format_date(self.date_to, None)
|
||||
if self.date_to is not None else '-',
|
||||
'start_amount': Report.format_number(
|
||||
'-',
|
||||
Report.format_date(self.date_to, None)
|
||||
if self.date_to is not None else '-',
|
||||
'|',
|
||||
Report.format_number(
|
||||
self.start_amount or 0.0, None,
|
||||
digits=getattr(self.currency, 'digits', 2)),
|
||||
'end_amount': Report.format_number(
|
||||
getattr(self.currency, 'symbol', '-'),
|
||||
'-',
|
||||
Report.format_number(
|
||||
self.end_amount or 0.0, None,
|
||||
digits=getattr(self.currency, 'digits', 2)),
|
||||
'symbol': getattr(self.currency, 'symbol', '-'),
|
||||
'num': len(self.lines),
|
||||
}
|
||||
getattr(self.currency, 'symbol', '-'),
|
||||
'[%(num)s]' % {'num': len(self.lines)},
|
||||
])
|
||||
|
||||
@classmethod
|
||||
def default_date_from(cls):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue