Browse Source

fix get_label

it was printing the static string (rec.invoice_name)
pull/196/head
Leonardo Pistone 9 years ago
parent
commit
ac755c1d33
  1. 8
      account_financial_report_qweb/report/general_ledger.py

8
account_financial_report_qweb/report/general_ledger.py

@ -17,12 +17,10 @@ class FinancialReportLine(models.Model):
@api.depends('invoice_number', 'name')
def _get_label(self):
for rec in self:
invoice_number = ''
label = rec.name
if rec.invoice_number:
invoice_number = ' (rec.invoice_number)'
rec.label = u'%(line_name)s%(invoice_number)s' % {
'line_name': rec.name,
'invoice_number': invoice_number}
label += u' ({})'.format(rec.invoice_number)
rec.label = label
label = fields.Char(compute='_get_label', readonly=True, store=False)

Loading…
Cancel
Save