[FIX] account_invoice : origin field for refund invoice

When creating a Refund invoice, the field "origin" is fill with
the number of the invoice to refund

fix #5233
opw 627828
This commit is contained in:
Denis Michiels 2015-02-23 13:38:44 +01:00
parent 3ff4cdea95
commit 4bf5ce94d2
1 changed files with 1 additions and 0 deletions

View File

@ -1098,6 +1098,7 @@ class account_invoice(models.Model):
values['date_invoice'] = date or fields.Date.context_today(invoice)
values['state'] = 'draft'
values['number'] = False
values['origin'] = invoice.number
if period_id:
values['period_id'] = period_id