156
156
raise osv.except_osv(_('Error'), _("Posting date for the refund is before the invoice's posting date!"))
157
157
if document_date and document_date < inv.document_date:
158
158
raise osv.except_osv(_('Error'), _("Document date for the refund is before the invoice's document date!"))
159
new_ids = super(account_invoice, self).refund(cr, uid, ids, date, period_id, description, journal_id)
162
self.write(cr, uid, new_ids, {'document_date': document_date})
159
return super(account_invoice, self).refund(cr, uid, ids, date, period_id, description, journal_id, document_date)
165
161
def line_get_convert(self, cr, uid, x, part, date, context=None):
166
162
res = super(account_invoice, self).line_get_convert(cr, uid, x, part, date, context=context)