(self)
return lines
Prepare the list of dictionaries for the regularization move lines.
Prepare the list of dictionaries for the regularization move lines.
Prepare the list of dictionaries for the regularization move lines .
def _prepare_regularization_move_lines(self):
        """Prepare the list of dictionaries for the regularization move lines."""
        self.ensure_one()
        lines = self._process_tax_line_regularization(
            self.tax_line_ids.filtered("to_regularize")
        )
        lines += self._prepare_regularization_extra_move_lines()
        # Write counterpart with the remaining
        debit = sum(x["debit"] for x in lines)
        credit = sum(x["credit"] for x in lines)
        lines.append(
            self._prepare_counterpart_move_line(
                self.counterpart_account_id, debit, credit
            )
        )
        return lines
def _prepare_regularization_move_lines ( self ) : self . ensure_one ( ) lines = self . _process_tax_line_regularization ( self . tax_line_ids . filtered ( "to_regularize" ) ) lines += self . _prepare_regularization_extra_move_lines ( ) # Write counterpart with the remaining debit = sum ( x [ "debit" ] for x in lines ) credit = sum ( x [ "credit" ] for x in lines ) lines . append ( self . _prepare_counterpart_move_line ( self . counterpart_account_id , debit , credit ) ) return lines