def METHOD_NAME(self, product, price, qty=1, taxes=None):
    if not taxes:
        taxes = product.taxes_id.filtered(
            lambda t: t.company_id.id == self.env.company.id
        )
    currency = self.pos_config.pricelist_id.currency_id
    res = taxes.compute_all(price, currency, qty, product=product)
    untax = res["total_excluded"]
    return untax, sum(tax.get("amount", 0.0) for tax in res["taxes"])