2.5 KiB
2.5 KiB
tags
| tags | |
|---|---|
|
Odoo Shell
Basics
List all fields
record = env['res.config.settings'].browse(1)
for field in record.fields_get():
print(field)
List all products
for product in env['product.template'].search([]):
print(product.name)
Execute sql quer.
self._cr.execute("SELECT * FROM account_move WHERE id = 16")
Generate password.
from passlib.context import CryptContext
setpw = CryptContext(schemes=['pbkdf2_sha512'])
setpw.encrypt('odoo')
Commands
Log into Docker Container.
CONTAINER=odoo04
docker exec -it <