Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

Customer Unsuscribe from Email Markating 403 error getting

Odoberať

Get notified when there's activity on this post

This question has been flagged
403403-forbiddenemailmarkating
1 Odpoveď
1763 Zobrazenia
Avatar
Rafeeq Salam

403: Forbidden

The page you were looking for could not be authorized.


Odoo V16 any idea how to resolve


Traceback (most recent call last):
  File "/opt/odoo/odoo/odoo/http.py", line 1583, in _serve_db
    return service_model.retrying(self._serve_ir_http, self.env)
  File "/opt/odoo/odoo/odoo/service/model.py", line 134, in retrying
    result = func()
  File "/opt/odoo/odoo/odoo/http.py", line 1610, in _serve_ir_http
    response = self.dispatcher.dispatch(rule.endpoint, args)
  File "/opt/odoo/odoo/odoo/http.py", line 1723, in dispatch
    return self.request.registry['ir.http']._dispatch(endpoint)
  File "/opt/odoo/odoo/addons/website/models/ir_http.py", line 235, in _dispatch
    response = super()._dispatch(endpoint)
  File "/opt/odoo/odoo/odoo/addons/base/models/ir_http.py", line 154, in _dispatch
    result = endpoint(**request.params)
  File "/opt/odoo/odoo/odoo/http.py", line 696, in route_wrapper
    result = endpoint(self, *args, **params_ok)
  File "/opt/odoo/odoo/addons/mass_mailing/controllers/main.py", line 36, in mailing
    raise exceptions.AccessDenied()
odoo.exceptions.AccessDenied: Access Denied


0
Avatar
Zrušiť
Ricardo Gross

As already mentioned by Jort, this is a typical message when testing email marketing, because when testing, Links are not yet generated.

Avatar
Jort de Vreeze
Best Answer

Did you get this message when sending a test mail? What value does res_id have in the url? When this value equals 0 it means that it is not linked to a medium_id in the database. This happens when you send a test email. You could try to create test mailing with a mailing list that includes your test email address only and send this one. You should now be able to use the unsubscribe link.


@http.route(['/mail/mailing//unsubscribe'], type='http', website=True, auth='public')
def mailing(self, mailing_id, email=None, res_id=None, token="", **post):
    mailing = request.env['mailing.mailing'].sudo().browse(mailing_id)
    if mailing.exists():
        res_id = res_id and int(res_id)
        if not self._valid_unsubscribe_token(mailing_id, res_id, email, str(token)):
            raise exceptions.AccessDenied()

def _valid_unsubscribe_token(self, mailing_id, res_id, email, token):
    if not (mailing_id and res_id and email and token):
        return False
    mailing = request.env['mailing.mailing'].sudo().browse(mailing_id)
    return consteq(mailing._unsubscribe_token(res_id, email), token)

def _unsubscribe_token(self, res_id, email):
    """Generate a secure hash for this mailing list and parameters.

    This is appended to the unsubscription URL and then checked at
    unsubscription time to ensure no malicious unsubscriptions are
    performed.

    :param int res_id:
        ID of the resource that will be unsubscribed.

    :param str email:
        Email of the resource that will be unsubscribed.
    """
    secret = self.env["ir.config_parameter"].sudo().get_param("database.secret")
    token = (self.env.cr.dbname, self.id, int(res_id), tools.ustr(email))
    return hmac.new(secret.encode('utf-8'), repr(token).encode('utf-8'), hashlib.sha512).hexdigest()

This is the code that raises the AccessDenied exeption from the mass_mailing controller and model.

I hope this helps!

0
Avatar
Zrušiť
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrácia
Related Posts Replies Zobrazenia Aktivita
Invited course member receives "403 Forbidden" the page could not be authorized
403-forbidden
Avatar
0
dec 22
2254
Is it possible to change the text within 403: Forbidden Solved
login 403-forbidden
Avatar
Avatar
Avatar
2
apr 25
4777
login page 403
loginpage 403-forbidden
Avatar
0
máj 23
3353
[Odoo 15] How to redirect to signup or signin screen instead of 403 Forbidden
Forbidden 403-forbidden
Avatar
Avatar
1
okt 22
3361
Error 403 Forbidden - After a corrupted uninstall of Live_Chat module
livechat 403
Avatar
Avatar
Avatar
4
jún 19
5353
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now