'Prepare the dict of values to create the new refund from the invoice.
This method may be overridden to implement custom
refund generation (making sure to call super() to establish
a clean extension chain).
:param record invoice: invoice to refund
:param string date_invoice: refund creation date from the wizard
:param integer date: force date from the wizard
:param string description: description of the refund from the wizard
:param integer journal_id: account.journal from the wizard
:return: dict of value to create() the refund'

@api.model
def _prepare_refund(self, invoice, date_invoice=None, date=None, description=None, journal_id=None):

    values = {}
    for field in self._get_refund_copy_fields():
        if (invoice._fields[field].type == 'many2one'):
            values[field] = invoice[field].id
        else:
            values[field] = (invoice[field] or False)
    values['invoice_line_ids'] = self._refund_cleanup_lines(invoice.invoice_line_ids)
    tax_lines = invoice.tax_line_ids
    values['tax_line_ids'] = self._refund_cleanup_lines(tax_lines)
    if journal_id:
        journal = self.env['account.journal'].browse(journal_id)
    elif (invoice['type'] == 'in_invoice'):
        journal = self.env['account.journal'].search([('type', '=', 'purchase')], limit=1)
    else:
        journal = self.env['account.journal'].search([('type', '=', 'sale')], limit=1)
    values['journal_id'] = journal.id
    values['type'] = TYPE2REFUND[invoice['type']]
    values['date_invoice'] = (date_invoice or fields.Date.context_today(invoice))
    values['state'] = 'draft'
    values['number'] = False
    values['origin'] = invoice.number
    values['refund_invoice_id'] = invoice.id
    if date:
        values['date'] = date
    if description:
        values['name'] = description
    return values
