~unifield-team/unifield-server/trunk

« back to all changes in this revision

Viewing changes to bin/addons/analytic_distribution/invoice.py

  • Committer: jf
  • Date: 2017-02-06 10:50:02 UTC
  • mfrom: (4171.2.1 unifield-server)
  • Revision ID: jfb@tempo-consulting.fr-20170206105002-pqvrl5b648tlx808
US-2317 [FIX] Refund: allow refunding invoices belonging to previous fiscal year

lp:~julie-w/unifield-server/US-2317

Show diffs side-by-side

added added

removed removed

Lines of Context:
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)
160
 
        # add document date
161
 
        if document_date:
162
 
            self.write(cr, uid, new_ids, {'document_date': document_date})
163
 
        return new_ids
 
159
        return super(account_invoice, self).refund(cr, uid, ids, date, period_id, description, journal_id, document_date)
164
160
 
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)