Manifest Academy

Home › Curriculum › Odoo Developer › Secure coding in Odoo

Security · 14 min · 17–20

Secure coding in Odoo

sudo discipline, SQL injection, XSS in QWeb and HTML fields, controller security, secrets and personal data.

In this lesson

Key points

Real-world example

A delivery-tracking page accepted ?ref= and ran cr.execute("SELECT ... WHERE name = '%s'" % ref). A tester sent ' OR 1=1 -- and saw every delivery. Rewriting it with the ORM and a domain on the visitor's token closed the hole; a pylint-odoo check now flags SQL string formatting in CI.

Questions and answers

Where should an API secret be stored?

System parameter (ir.config_parameter) or environment variable, not code.

Which Nigerian law governs personal data processing?

The Nigeria Data Protection Act 2023 (NDPC as regulator).

Read the full lesson, worked example and quiz