Browse Source

fix get_label

it was printing the static string (rec.invoice_name)
pull/367/head
Leonardo Pistone 9 years ago
committed by Jordi Ballester
parent
commit
12a58b851e
  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