(self, tax)
return req_tax
Get the associated req tax for the specified tax.

        :param self: Single invoice record.
        :param tax: Initial tax for searching for the RE linked tax.
        :return: REQ tax (or empty recordset) linked to the provided tax.
Get the associated req tax for the specified tax.
Get the associated req tax for the specified tax .
def _get_sii_tax_req(self, tax):
        """Get the associated req tax for the specified tax.

        :param self: Single invoice record.
        :param tax: Initial tax for searching for the RE linked tax.
        :return: REQ tax (or empty recordset) linked to the provided tax.
        """
        self.ensure_one()
        taxes_req = self._get_sii_taxes_map(["RE"])
        re_lines = self.line_ids.filtered(
            lambda x: tax in x.tax_ids and x.tax_ids & taxes_req
        )
        req_tax = re_lines.mapped("tax_ids") & taxes_req
        if len(req_tax) > 1:
            raise exceptions.UserError(
                _("There's a mismatch in taxes for RE. Check them.")
            )
        return req_tax
def _get_sii_tax_req ( self , tax ) : self . ensure_one ( ) taxes_req = self . _get_sii_taxes_map ( [ "RE" ] ) re_lines = self . line_ids . filtered ( lambda x : tax in x . tax_ids and x . tax_ids & taxes_req ) req_tax = re_lines . mapped ( "tax_ids" ) & taxes_req if len ( req_tax ) > 1 : raise exceptions . UserError ( _ ( "There's a mismatch in taxes for RE. Check them." ) ) return req_tax