Skip to content

Commit

Permalink
[10.0] withholding.tax.move created at invoice payment shall have the…
Browse files Browse the repository at this point in the history
… date competence equal to payment date (and not invoice date), while date maturity shall be computed based from invoice payment date (OCA#518)
  • Loading branch information
jackjack82 authored and eLBati committed Oct 3, 2018
1 parent 0ba3e06 commit 2edb5c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions l10n_it_withholding_tax/models/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,20 +96,20 @@ def generate_wt_moves(self):
p_date_maturity = False
payment_lines = wt_st.withholding_tax_id.payment_term.compute(
amount_wt,
rec_line_statement.date or False)
rec_line_payment.date or False)
if payment_lines and payment_lines[0]:
p_date_maturity = payment_lines[0][0][0]
wt_move_vals = {
'statement_id': wt_st.id,
'date': rec_line_statement.date,
'date': rec_line_payment.date,
'partner_id': rec_line_statement.partner_id.id,
'reconcile_partial_id': self.id,
'payment_line_id': rec_line_payment.id,
'credit_debit_line_id': rec_line_statement.id,
'withholding_tax_id': wt_st.withholding_tax_id.id,
'account_move_id': rec_line_payment.move_id.id or False,
'date_maturity':
p_date_maturity or rec_line_statement.date_maturity,
p_date_maturity or rec_line_payment.date_maturity,
'amount': amount_wt
}
wt_move_vals = self._prepare_wt_move(wt_move_vals)
Expand Down

0 comments on commit 2edb5c4

Please sign in to comment.