Hi,
If you're unable to access the UI (due to a 500 error) and
can't use the CLI to upgrade your module on Odoo.sh, one effective
workaround is to create a minimal custom module that defines your new
field and sets it to auto-install. This ensures it gets automatically
installed without manual upgrades.
Here’s how you do it:
Create a new module, for example: user_clerk_field
Add the following __manifest__.py:
{
'name': 'User Clerk Field',
'version': '1.0',
'depends': ['base'],
'author': 'Your Name',
'installable': True,
'auto_install': True, # <-- This makes it install automatically
}
Inside the module folder, add a models/ directory with an __init__.py and res_users.py file:
models/__init__.py:
from . import res_users
models/res_users.py:
from odoo import models, fields
class ResUsers(models.Model):
_inherit = 'res.users'
clerk_id = fields.Char(string="Clerk User ID", index=True)
Once
you push this module to Odoo.sh, it will install automatically due to
auto_install=True, and your new field will be created without needing to
manually upgrade via UI or CLI.
This approach is safe, reliable, and avoids crashes caused by views referencing a field that hasn't been created yet.
Hope it helps.
Re: Creating a field in res.user is throwing internal server error (#53)
Your request Re: Creating a field in res.user is throwing internal server error has been received and is being reviewed by our Customer Care team.
The reference for your ticket is 53.
To provide any additional information, simply reply to this email.
Customer Care Team
SOUL FOODS RETAIL PVT. LTD.