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

Custom form showing 303 Error Code on Submit

Odoberať

Get notified when there's activity on this post

This question has been flagged
requesthttpcontrollerrouteodoosh
1 Odpoveď
3308 Zobrazenia
Avatar
Adrian

I have created a custom form in Odoo17, with this controller getting the data from the input through an http route: 


from odoo.http import request, Controller, route

@route('/form', auth='public', website=True)
def form(self, **kwargs):
error_message = request.session.pop('error_message', None)
return request.render('module.form_template', {'error_message': error_message,})


@route('/form/submit', type='http', auth='public', website=True, methods=['POST', 'GET'])
def form_submit(self, **post):
...


and from the xml, I have a form: 

 

form action="/form/submit" method="POST" enctype="multipart/form-data" class="o_mark_required" data-mark="*"
data-model_name="" data-success-page=""
input type="hidden" name="csrf_token" t-att-value="request.csrf_token()"


and some inputs: 


input class="form-control s_website_form_input"
name="input_id" required="1"
placeholder="Please fill the input"
t-att-value="input_id"
t-att-disabled="condition"


Locally everything is working fine, the form gets submitted etc.

But when deployed and built in Odoo sh, I receive this:

Request URL:https://....odoo.com/form/submit
Request Method:POST
Status Code:303 See Other
Remote Address:xx.xxx.xx.xxx:xxx
Referrer Policy:strict-origin-when-cross-origin

Does any of you know or have a hint on what is wrong with the above or what exactly what might happen for this to appear? 


Thank you! 




0
Avatar
Zrušiť
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

Hi,

The 303 See Other status code you’re seeing after form submission is standard behavior in Odoo’s web controllers. It indicates a redirect, not an error — your form is likely working correctly unless data isn’t being saved or redirected properly.


Here are a few key points to understand and verify:


    303 is expected after POST:

    Odoo uses 303 See Other to redirect users after a form is submitted, to avoid resubmitting data if the page is reloaded.


    You should explicitly redirect:

    At the end of your /form/submit method, make sure you return something like:

    return request.redirect('/thank-you') — otherwise the browser won’t know where to go next.


    CSRF token must be valid:

    Ensure your form includes a valid CSRF token using

    t-att-value="request.csrf_token()". An invalid or missing token can block submission.


    Check network tab for behavior:

    In your browser dev tools, look for a 303 POST request followed by a GET request to the redirected URL. That’s a sign it’s working properly.


    Redirect target must exist:

    If you redirect to /thank-you, make sure that URL is defined in your routes or templates. Otherwise, you’ll see a blank or error page.


    Handle success messages via session:

    You can show messages on the next page using request.session['success_message'] and displaying it in your template.


Hope it 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
How can I define http.route(‘URL’) which will generic for all pages or dynamic url with dynamic page rendering in odoo 11 web controller?
http controller route webpage odoo11
Avatar
1
mar 18
14476
How to add an extra step in the webshop flow?
request webshop redirect controller route
Avatar
Avatar
1
jún 15
8331
What happened to module 'openerp.http'?
module httprequest http controller route
Avatar
Avatar
1
mar 15
14800
http.route(... auth="none") not working in Odoo11 Solved
controller route
Avatar
4
okt 20
6921
Problem with the controller routes
controller route
Avatar
Avatar
2
mar 16
5183
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