Skip to Content
Odoo Menu
  • Log ind
  • Prøv gratis
  • apps
    Økonomi
    • Bogføring
    • Fakturering
    • Udgifter
    • Regneark (BI)
    • Dokumenter
    • e-Signatur
    Salg
    • CRM
    • Salg
    • POS Butik
    • POS Restaurant
    • Abonnementer
    • Udlejning
    Hjemmeside
    • Hjemmesidebygger
    • e-Handel
    • Blog
    • Forum
    • LiveChat
    • e-Læring
    Forsyningskæde
    • Lagerbeholdning
    • Produktion
    • PLM
    • Indkøb
    • Vedligeholdelse
    • Kvalitet
    HR
    • Medarbejdere
    • Rekruttering
    • Fravær
    • Medarbejdersamtaler
    • Anbefalinger
    • Flåde
    Marketing
    • Markedsføring på sociale medier
    • E-mailmarketing
    • SMS-marketing
    • Arrangementer
    • Automatiseret marketing
    • Spørgeundersøgelser
    Tjenester
    • Projekt
    • Timesedler
    • Udkørende Service
    • Kundeservice
    • Planlægning
    • Aftaler
    Produktivitet
    • Dialog
    • Godkendelser
    • IoT
    • VoIP
    • Vidensdeling
    • WhatsApp
    Tredjepartsapps Odoo Studio Odoo Cloud-platform
  • Brancher
    Detailhandel
    • Boghandel
    • Tøjforretning
    • Møbelforretning
    • Dagligvarebutik
    • Byggemarked
    • Legetøjsforretning
    Mad og værtsskab
    • Bar og pub
    • Restaurant
    • Fastfood
    • Gæstehus
    • Drikkevareforhandler
    • Hotel
    Ejendom
    • Ejendomsmægler
    • Arkitektfirma
    • Byggeri
    • Ejendomsadministration
    • Havearbejde
    • Boligejerforening
    Rådgivning
    • Regnskabsfirma
    • Odoo-partner
    • Marketingbureau
    • Advokatfirma
    • Rekruttering
    • Audit & certificering
    Produktion
    • Tekstil
    • Metal
    • Møbler
    • Fødevareproduktion
    • Bryggeri
    • Firmagave
    Heldbred & Fitness
    • Sportsklub
    • Optiker
    • Fitnesscenter
    • Kosmetolog
    • Apotek
    • Frisør
    Håndværk
    • Handyman
    • IT-hardware og support
    • Solenergisystemer
    • Skomager
    • Rengøringsservicer
    • VVS- og ventilationsservice
    Andet
    • Nonprofitorganisation
    • Miljøagentur
    • Udlejning af billboards
    • Fotografi
    • Cykeludlejning
    • Softwareforhandler
    Gennemse alle brancher
  • Community
    Få mere at vide
    • Tutorials
    • Dokumentation
    • Certificeringer
    • Oplæring
    • Blog
    • Podcast
    Bliv klogere
    • Udannelselsesprogram
    • Scale Up!-virksomhedsspillet
    • Besøg Odoo
    Få softwaren
    • Download
    • Sammenlign versioner
    • Udgaver
    Samarbejde
    • Github
    • Forum
    • Arrangementer
    • Oversættelser
    • Bliv partner
    • Tjenester til partnere
    • Registrér dit regnskabsfirma
    Modtag tjenester
    • Find en partner
    • Find en bogholder
    • Kontakt en rådgiver
    • Implementeringstjenester
    • Kundereferencer
    • Support
    • Opgraderinger
    Github Youtube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Få en demo
  • Prissætning
  • Hjælp

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Bogføring
  • Lager
  • PoS
  • Projekt
  • MRP
All apps
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Du skal være registreret for at interagere med fællesskabet.
All Posts People Emblemer
Tags (View all)
odoo accounting v14 pos v15
Om dette forum
Hjælp

Field does not exist in model - Odoo18

Tilmeld

Få besked, når der er aktivitet på dette indlæg

Dette spørgsmål er blevet anmeldt
1 Svar
761 Visninger
Avatar
Mohamed Boss

Hi all,

I am trying to upgrade a module on odoo18. But I am getting the following error:


RPC_ERROR


Odoo Server Error


Occured on localhost:8996 on model ir.module.module on 2025-10-03 13:44:48 GMT


Traceback (most recent call last):

  File "C:\Program Files\Odoo 18.0.20250814\server\odoo\convert.py", line 555, in _tag_root

    raise ParseError(msg) from None  # Restart with "--log-handler odoo.tools.convert:DEBUG" for complete traceback

    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

odoo.tools.convert.ParseError: while parsing file:/c:/program%20files/odoo%2018.0.20250814/custom/hms_africa/views/cases_views.xml:19

Error while validating view near:


                                    <field name="disb_date"/>

                                    <field name="service"/>

                                    <field name="total"/>

                                </list>

                            </field>


Field "mode_of_brief" does not exist in model "case.notes"


View error context:

{'file': 'c:\\program files\\odoo '

         '18.0.20250814\\custom\\hms_africa\\views\\cases_views.xml',

'line': 40,

'name': 'hms.cases.form',

'view': ir.ui.view(903,),

'view.model': 'hms.cases',

'view.parent': ir.ui.view(),

'xmlid': 'view_hms_cases_form'}



The above server error caused the following client error:

RPC_ERROR: Odoo Server Error

    RPCError@http://localhost:8996/web/assets/e9f7204/web.assets_web.min.js:3145:338

    makeErrorFromResponse@http://localhost:8996/web/assets/e9f7204/web.assets_web.min.js:3148:163

    rpc._rpc/promise</<@http://localhost:8996/web/assets/e9f7204/web.assets_web.min.js:3153:34

   

Here is are my models


class HmsCase(models.Model):

    _name = 'hms.cases'

    _inherit = ['mail.thread']

    _description = 'HMS Cases Master'

    _rec_name = 'case_name'

    case_name = fields.Char(string="Case Name", tracking=True)

case_note_ids = fields.One2many('case.notes', 'note_id', string="Notes")



class CaseNotes(models.Model):

    _name = 'case.notes'

    _description = 'Case Notes'


    note_id = fields.Many2one('hms.cases', string='Case', required=True)

    note_date = fields.Datetime(string='Date', default=fields.Datetime.now())

    note = fields.Text(string="Note")

    mode_of_brief = fields.Selection([('email', 'EMAIL'),

                                      ('letter', 'OFFICIAL LETTER'),

                                      ('post', 'REGISTERED POST'),

                                      ('other', 'OTHER')],

                                     string="Mode of Brief")





Here is my view:


<?xml version="1.0" encoding="utf-8"?>

<odoo>


    <record id="view_hms_cases_list" model="ir.ui.view">

        <field name="name">hms.cases.list</field>

        <field name="model">hms.cases</field>

        <field name="arch" type="xml">

            <list string="Cases">

                <field name="case_name"/>

            </list>

        </field>

    </record>


    <record id="view_hms_cases_form" model="ir.ui.view">

        <field name="name">hms.cases.form</field>

        <field name="model">hms.cases</field>

        <field name="arch" type="xml">

            <form string="Cases">

                <sheet>

                    <group>

                        <field name="case_name" readonly="status != 'auth_one' and status != 'draft'"/>

                    </group>

                    <field name="case_note_ids" string="Case Notes" mode="list,form">

                        <list default_order="note_date desc" delete="false">

                            <field name="note_date" readonly="1" noupdate="1"/>

                            <field name="note"/>

                        </list>

                        <form string="Case Notes">

                            <group>

                                <field name="note_date" readonly="1" noupdate="1"/>

                                <field name="note"/>

                                <field name="mode_of_brief"/>

                            </group>

                        </form>

                    </field>

                </sheet>

                <chatter/>

            </form>

        </field>

    </record>


    <record id="action_hms_cases" model="ir.actions.act_window">

        <field name="name">Cases</field>

        <field name="res_model">hms.cases</field>

        <field name="view_ids" eval="[Command.clear(),

            (0, 0, {'view_mode': 'list', 'view_id': ref('view_hms_cases_list')}),

            (0, 0, {'view_mode': 'form', 'view_id': ref('view_hms_cases_form')})]"/>

        <field name="view_mode">list,form</field>

        <field name="help" type="html">

            <p class="o_view_nocontent_smiling_face">

                Create a new case

            </p>

        </field>

    </record>


</odoo>


In addition, when i try to do this on Odoo17, it works without any issues. Any assistance will be greatly appreciated. Thanks 

0
Avatar
Kassér
Mohamed Boss
Forfatter

Greetings Cybrosys,

Thanks for your response. I did as you suggested but still getting the same error. I am also observing that the field is already in the database as per screenshot below.

Your assistance is greatly appreciated

Avatar
Cybrosys Techno Solutions Pvt.Ltd
Bedste svar

Hi,


The error you are encountering in Odoo 18 occurs because the field mode_of_brief does not exist in the database for the case.notes model, even though it is defined in your code. This typically happens when a module is upgraded or migrated, and the database schema has not been updated to reflect new fields.


To resolve this, you need to explicitly update the module. You can do this by stopping the Odoo server and running the command:


odoo-bin -d your_database_name -u hms_africa --stop-after-init



This forces Odoo to apply all changes in the module, including creating the missing field in the database.


It is also important to ensure that the module is installed correctly, that there are no typos in the model or field definitions, and that Odoo caches are cleared by restarting the server. After updating, you can verify that the field exists in the database by checking the table columns for case_notes.


In summary, the issue is not with your code but with the database schema. Updating the module properly will ensure that the mode_of_brief field exists, and your form view will function without errors in Odoo 18.


Hope it helps

0
Avatar
Kassér
Mohamed Boss
Forfatter

Greetings Cybrosys,

Thanks for your response. I did as you suggested but still getting the same error. I am also observing that the field is already in the database table

Your assistance is greatly appreciated

Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Tilmeld dig
Community
  • Tutorials
  • Dokumentation
  • Forum
Open Source
  • Download
  • Github
  • Runbot
  • Oversættelser
Tjenester
  • Odoo.sh-hosting
  • Support
  • Opgradere
  • Individuelt tilpasset udvikling
  • Uddannelse
  • Find en bogholder
  • Find en partner
  • Bliv partner
Om os
  • Vores virksomhed
  • Brandaktiver
  • Kontakt os
  • Stillinger
  • Arrangementer
  • Podcast
  • Blog
  • Kunder
  • Juridiske dokumenter • Privatlivspolitik
  • Sikkerhedspolitik
الْعَرَبيّة 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 er en samling open source-forretningsapps, der dækker alle dine virksomhedsbehov – lige fra CRM, e-handel og bogføring til lagerstyring, POS, projektledelse og meget mere.

Det unikke ved Odoo er, at systemet både er brugervenligt og fuldt integreret.

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