~dr.dran/openobject-italia/improve_withholding

« back to all changes in this revision

Viewing changes to l10n_it_withholding_tax/account.py

  • Committer: Lorenzo Battistini
  • Date: 2012-11-30 23:08:22 UTC
  • Revision ID: lorenzo.battistini@agilebg.com-20121130230822-q723asnt776rd7u6
[FIX] l10n_it_withholding_tax - due date based on payment date

Show diffs side-by-side

added added

removed removed

Lines of Context:
96
96
                    # compute the due date
97
97
                    due_list = term_pool.compute(
98
98
                        cr, uid, invoice.company_id.withholding_payment_term_id.id, new_line_amount,
99
 
                        date_ref=invoice.date_invoice, context=context)
 
99
                        date_ref=voucher.date or invoice.date_invoice, context=context)
100
100
                    if len(due_list) > 1:
101
101
                        raise osv.except_osv(_('Error'),
102
102
                            _('The payment term %s has too many due dates')