diff --git a/l10n_br_account/wizards/account_invoice_refund.py b/l10n_br_account/wizards/account_invoice_refund.py index 9b4d3ab35821..1393ee5587ed 100644 --- a/l10n_br_account/wizards/account_invoice_refund.py +++ b/l10n_br_account/wizards/account_invoice_refund.py @@ -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( _( @@ -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 = { @@ -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,