Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Immobiliari
    • Agència immobiliària
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consultoria
    • Empresa comptable
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Mobles
    • Menjar
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Sistemes d'energia solar
    • Shoe Maker
    • Serveis de neteja
    • Instal·lacions HVAC
    Altres
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

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

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Create field company_id res.confing.settings

Subscriure's

Get notified when there's activity on this post

This question has been flagged
helpodoo12.0
2 Respostes
3283 Vistes
Avatar
Noemi Correa

Hello guys, can you help me with the creation of a field?

Well, I need to create the company_id field with the dependency of the model res.config.settings, it turns out that I have already created it in the normal way, in a perhaps more complete way, but even so it still gives me the error message below ... does anyone know how to create this field? Thanks :)

I created it this way: company_id = fields.Many2one('res.company', string='Company')

And also like this, according to a search I did: company_id = fields.Many2one(

'res.company',

string='Company',

required=True,

default=lambda self: self.env.company.id

)

But it didn't work...

0
Avatar
Descartar
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

Hi,

It appears that the field named 'company_id' that you created is not being recognized within the context of the 'res.config.settings' model.
 
1-Please make sure that the module containing the field definition is correctly installed and loaded in Odoo. Additionally, ensure that you have restarted the Odoo server after applying any modifications to the module.
2-Please ensure that the field is defined in the appropriate model, as you mentioned 'res.config.settings' in this case. Verify that the field is correctly defined within the intended model.
3-Double-check that the field name is accurately spelled and matches the name used in other sections of your code where you make references to this field.


Hope it helps

0
Avatar
Descartar
Noemi Correa
Autor

Yes, I have done these checks, even when I go to the res.config.settings model, it shows the company_id field inside the base and my model, but even so, it always comes back to this error, I honestly don't know what's going on....

Avatar
Niyas Raphy (Walnut Software Solutions)
Best Answer

Hi,

Can you make sure that the service has been restarted and module has been upgraded. Error is raised by saying that the field does not get added in the model res.config.settings


Thanks

0
Avatar
Descartar
Noemi Correa
Autor

Yes, I have already restarted, updated the module, it is in the init, I did all the procedure, but I still have this error.

Niyas Raphy (Walnut Software Solutions)

i think, the service is not get restarted, can you stop the service and see if your odoo is still accessible ? if yes, service is not stopped, you may have to force stop.

then ensure python files are imported in init file

Noemi Correa
Autor

I did it this way, restarted the system, updated the module, made sure that the field is created and being called by my module, and from what I saw it is in the base model and in my module, but for some reason, which I have not yet been able to figure out it returns to this error.

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

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

Registrar-se
Related Posts Respostes Vistes Activitat
Expected singleton: hr.emp.travel.location(62, 63)
odoo12.0
Avatar
Avatar
Avatar
2
d’oct. 25
1989
request for information
help
Avatar
Avatar
1
de set. 25
737
Hello everyone, I need your help; I want to make a custom header to print my pdf reports.
help
Avatar
Avatar
Avatar
Avatar
Avatar
4
de juny 25
3129
I need help converting my code 17 to 18
help
Avatar
Avatar
1
de juny 25
2984
Give a discount to a product for every customer and show it in the website pricetag?
help
Avatar
0
de febr. 25
1412
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة 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 és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

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