Skip to content

Commit

Permalink
Merge PR #1067 into 12.0
Browse files Browse the repository at this point in the history
Signed-off-by mileo
  • Loading branch information
OCA-git-bot committed Jan 12, 2021
2 parents 96242ac + 399febd commit 03077dd
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions l10n_br_account/wizards/account_invoice_refund.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ def compute_refund(self, mode="refund"):

if (
not self.force_fiscal_operation_id
and not invoice.fiscal_operation_id.return_operation_id
and
not invoice.fiscal_operation_id.return_fiscal_operation_id
):
raise UserError(
_(
Expand All @@ -53,7 +54,8 @@ def compute_refund(self, mode="refund"):

invoice.fiscal_operation_id = (
self.force_fiscal_operation_id.id
or invoice.fiscal_operation_id.return_operation_id.id
or
invoice.fiscal_operation_id.return_fiscal_operation_id.id
)

invoice_values = {
Expand Down Expand Up @@ -81,10 +83,11 @@ def compute_refund(self, mode="refund"):

line.fiscal_operation_id = (
self.force_fiscal_operation_id.id
or line.fiscal_operation_id.return_operation_id
or
line.fiscal_operation_id.return_fiscal_operation_id
)

line._onchange_operation_id()
line._onchange_fiscal_operation_id()

line_values = {
"fiscal_operation_id": line.fiscal_operation_id.id,
Expand Down

0 comments on commit 03077dd

Please sign in to comment.