콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
2 답글
691 화면

I've inherited the res.users model and am trying to add a character field to it. However, it's throwing an internal server error on the server. Upgrading the module isn't working because the UI isn't loading. Additionally, on the live server, I don't have access to the command line to upgrade the module.(following is my code)


from odoo import models, fields


class ResUsers(models.Model):

    _inherit = 'res.users'


    clerk_id = fields.Char(string="Clerk User ID", index=True)



아바타
취소
Dear Mallika, 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 [...] ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​ ͏ ​
Your Helpdesk Ticket
Re: Creating a field in res.user is throwing internal server error (#53)
SOUL FOODS RETAIL PVT. LTD.

Dear Mallika,

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.

Best regards,

Customer Care Team

SOUL FOODS RETAIL PVT. LTD.
Powered by Odoo
베스트 답변

Hi Mallika,

Try to upgrade the module trought CLI(through backend)

Hope this helps.


아바타
취소
베스트 답변

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.

아바타
취소
관련 게시물 답글 화면 활동
1
6월 25
733
2
5월 25
809
2
3월 25
1510
0
1월 25
1433
1
8월 25
492