Skip to content

Commit

Permalink
Withholding_tax - Corretta Registrazione Pagamento
Browse files Browse the repository at this point in the history
  • Loading branch information
vincenzodiroberto committed Feb 24, 2021
1 parent 1e1f7d5 commit e2f1cb9
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions l10n_it_withholding_tax/models/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def create(self, vals):
ml_ids.append(vals.get("credit_move_id"))
move_lines = self.env["account.move.line"].browse(ml_ids)
for ml in move_lines:
domain = [("move_id", "=", ml.move_id.id)]
invoice = self.env["account.move"].search(domain)
#domain = [("move_id", "=", ml.move_id.id)]
invoice = self.env["account.move"].browse(ml.move_id.id)
if invoice:
break
# Limit value of reconciliation
Expand Down Expand Up @@ -185,9 +185,10 @@ def default_get(self, fields):
Compute amount to pay proportionally to amount total - wt
"""
rec = super(AccountAbstractPayment, self).default_get(fields)
invoice_defaults = self.resolve_2many_commands(
"invoice_ids", rec.get("invoice_ids")
)
invoice_defaults = rec.get("invoice_ids")
# self.resolve_2many_commands(
# "invoice_ids", rec.get("invoice_ids")
# )
if invoice_defaults and len(invoice_defaults) == 1:
invoice = invoice_defaults[0]
if (
Expand Down

0 comments on commit e2f1cb9

Please sign in to comment.