[FIX] account: paypal url generation should not crash for draft invoices that have no number yet

bzr revid: odo@openerp.com-20130730091643-27iwpblnjgjc8a2j
This commit is contained in:
Olivier Dony 2013-07-30 11:16:43 +02:00
parent 63b2e2c44c
commit cf666e2d78
1 changed files with 1 additions and 1 deletions

View File

@ -266,7 +266,7 @@ class account_invoice(osv.osv, EDIMixin):
params = {
"cmd": "_xclick",
"business": inv.company_id.paypal_account,
"item_name": inv.company_id.name + " Invoice " + inv.number,
"item_name": "%s Invoice %s" % (inv.company_id.name, inv.number or ''),
"invoice": inv.number,
"amount": inv.residual,
"currency_code": inv.currency_id.name,