Passa al contenuto
Odoo Menu
  • Accedi
  • Provalo gratis
  • App
    Finanze
    • Contabilità
    • Fatturazione
    • Note spese
    • Fogli di calcolo (BI)
    • Documenti
    • Firma
    Vendite
    • CRM
    • Vendite
    • Punto vendita Negozio
    • Punto vendita Ristorante
    • Abbonamenti
    • Noleggi
    Siti web
    • Configuratore sito web
    • E-commerce
    • Blog
    • Forum
    • Live chat
    • E-learning
    Supply chain
    • Magazzino
    • Produzione
    • PLM
    • Acquisti
    • Manutenzione
    • Qualità
    Risorse umane
    • Dipendenti
    • Assunzioni
    • Ferie
    • Valutazioni
    • Referral dipendenti
    • Parco veicoli
    Marketing
    • Social marketing
    • E-mail marketing
    • SMS marketing
    • Eventi
    • Marketing automation
    • Sondaggi
    Servizi
    • Progetti
    • Fogli ore
    • Assistenza sul campo
    • Helpdesk
    • Pianificazione
    • Appuntamenti
    Produttività
    • Comunicazioni
    • Approvazioni
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    App di terze parti Odoo Studio Piattaforma cloud Odoo
  • Settori
    Retail
    • Libreria
    • Negozio di abbigliamento
    • Negozio di arredamento
    • Alimentari
    • Ferramenta
    • Negozio di giocattoli
    Cibo e ospitalità
    • Bar e pub
    • Ristorante
    • Fast food
    • Pensione
    • Grossista di bevande
    • Hotel
    Agenzia immobiliare
    • Agenzia immobiliare
    • Studio di architettura
    • Edilizia
    • Gestione immobiliare
    • Impresa di giardinaggio
    • Associazione di proprietari immobiliari
    Consulenza
    • Società di contabilità
    • Partner Odoo
    • Agenzia di marketing
    • Studio legale
    • Selezione del personale
    • Audit e certificazione
    Produzione
    • Tessile
    • Metallo
    • Arredamenti
    • Alimentare
    • Birrificio
    • Ditta di regalistica aziendale
    Benessere e sport
    • Club sportivo
    • Negozio di ottica
    • Centro fitness
    • Centro benessere
    • Farmacia
    • Parrucchiere
    Commercio
    • Tuttofare
    • Hardware e assistenza IT
    • Ditta di installazione di pannelli solari
    • Calzolaio
    • Servizi di pulizia
    • Servizi di climatizzazione
    Altro
    • Organizzazione non profit
    • Ente per la tutela ambientale
    • Agenzia di cartellonistica pubblicitaria
    • Studio fotografico
    • Punto noleggio di biciclette
    • Rivenditore di software
    Carica tutti i settori
  • Community
    Apprendimento
    • Tutorial
    • Documentazione
    • Certificazioni 
    • Formazione
    • Blog
    • Podcast
    Potenzia la tua formazione
    • Programma educativo
    • Scale Up! Business Game
    • Visita Odoo
    Ottieni il software
    • Scarica
    • Versioni a confronto
    • Note di versione
    Collabora
    • Github
    • Forum
    • Eventi
    • Traduzioni
    • Diventa nostro partner
    • Servizi per partner
    • Registra la tua società di contabilità
    Ottieni servizi
    • Trova un partner
    • Trova un contabile
    • Incontra un esperto
    • Servizi di implementazione
    • Testimonianze dei clienti
    • Supporto
    • Aggiornamenti
    GitHub Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Richiedi una demo
  • Prezzi
  • Aiuto

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

  • CRM
  • e-Commerce
  • Contabilità
  • Magazzino
  • PoS
  • Progetti
  • MRP
All apps
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
È necessario essere registrati per interagire con la community.
Tutti gli articoli Persone Badge
Etichette (Mostra tutto)
odoo accounting v14 pos v15
Sul forum
Assistenza

Newly created models are not displayed anymore through views

Iscriviti

Ricevi una notifica quando c'è un'attività per questo post

La domanda è stata contrassegnata
viewsmodelsodoo12
2 Risposte
7473 Visualizzazioni
Avatar
leconte.clement@orange.fr


Odoo 12.0

My app was working fine until this morning, from when I cannot display new models through views. I did create a model with name mixed of "." and "_", i.e, "ex_employees.ex_employees" that i removed since then, and I wonder if it is forbidden to do so and if it didn't break something in the database.

I created a new model with "_inherit" from another model and giving it a new "_name", and as I was not able to display it, I created another model without inheritance just to see if it was working but it did not work either.

No error is triggered, update of the app works but doesn't display the new models. I did look deep into the database, to see if there was a naming problem but I see that records of views and actions are deleted as we remove them. Models and records of models inside ir.model are not deleted when the model is deleted in our code. So I deleted the old models that could cause problems such as "ex_employees.ex_employees". I don't know what's wrong.

Thanks for your help.

Python code:

class ex_employees(models.Model): 
_name = 'exemployees.exemployees' 
_inherit = 'adults.adults'
_description = 'Employés partis'
def move_to_ex_employees(self): 
    pass

class tadam(models.Model):

_name = 'tadam.tadam'
_description = 'tadam'

name = fields.Char()


Xml action menu and views:

<record id="ex_employees" model="ir.actions.act_window">
<field name="name">Xx</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">exemployees.exemployees</field>
<field name="view_mode">tree,form</field>

</record>
<menuitem name="Xxxx" id="menu_16" parent="diderot_root" action="ex_employees" groups="group_administrators" sequence="1"/>

<record id="ex_employees_form_view1" model="ir.ui.view">
<field name="name">exemployees.form</field>
<field name="model">exemployees.exemployees</field>
<field name="arch" type="xml">
<form string="Anciens employés">
<header>
</header>
<sheet>
<group>
<group string="Informations personnelles">

<field name="nom" style="text-transform: uppercase;"/>
<field name="prenom" style="text-transform: capitalize;"/>
<field name="dte_naiss" />
<field name="adresse" widget="adresse" class="o_address_format" placeholder="Adresse..."/>
<field name="email" widget="email" placeholder="votremail@gmail.com"/>
<field name="tel" widget="Phone" placeholder="+212"/>
<field name="cin" style="text-transform: uppercase" colspan="4"/>
<field name="num_cnss" style="text-transform: uppercase;"/>
<field name="statut_marital" widget='radio' style="width:50%%" options="{'horizontal':true}"/>
<field name="nbr_enfants"/>
<field name="civilite"/>
</group>

<group>
<separator string="Informations professionnelles"/>
<field name="company_id" invisible="1"/>
<field name="currency_id" invisible="1"/>
<field name="salaire_init" />
<field name="salaire_actu" />
<field name="catégorie" />
<field name="fonction" />
<field name="classe" widget="selection" />
<field name="dte_embauche"/>
<field name="dte_sortie"/>
</group>
</group>
</sheet>
</form>
</field>
</record>

<record id="ex_employees_tree_view1" model="ir.ui.view">
<field name="name">exemployees.tree</field>
<field name="model">exemployees.exemployees</field>
<field name="arch" type="xml">
<tree string="Anciens employés">

<field name="nom" />
<field name="prenom" />
<field name="dte_naiss" />
<field name="cin"/>
<field name="tel" />
<field name="email" />
<field name="adresse"/>
<field name="num_cnss"/>
<field name="catégorie"/>
<field name="fonction"/>
<field name="dte_embauche"/>

</tree>
</field>
</record>


0
Avatar
Abbandona
leconte.clement@orange.fr
Autore

Solved. Stupid mistake, too much thinking results in such things.


Thanks

Avatar
Odoo Mates
Risposta migliore

Hi,

Make sure that the access rights are given for the newly created models. If the access rights is not set, the views and menu wont become visible. Also you can check the same by switching into the Super User Mode.

1. Super User Mode

2. Create Module in Odoo12

Thanks

0
Avatar
Abbandona
Avatar
lliege
Risposta migliore

@Clément você ainda está no Brasil??? nos contate lliege@lliege.com.br

0
Avatar
Abbandona
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!

Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!

Registrati
Post correlati Risposte Visualizzazioni Attività
How to put relational table name in .py files?
models odoo12
Avatar
Avatar
2
lug 20
3277
Viewing Field from another Model
views models
Avatar
Avatar
1
feb 18
4018
Why not all model fields shown in defalt view?
views models
Avatar
Avatar
1
feb 16
4254
Adjust View Order by Field
views models
Avatar
1
mar 15
4791
Add listings to the leaves calendar from other Model | Odoo12 Risolto
views calendar models expand odoo12
Avatar
Avatar
1
lug 19
4197
Community
  • Tutorial
  • Documentazione
  • Forum
Open source
  • Scarica
  • Github
  • Runbot
  • Traduzioni
Servizi
  • Hosting Odoo.sh
  • Supporto
  • Aggiornamenti
  • Sviluppi personalizzati
  • Formazione
  • Trova un contabile
  • Trova un partner
  • Diventa nostro partner
Chi siamo
  • La nostra azienda
  • Branding
  • Contattaci
  • Lavora con noi
  • Eventi
  • Podcast
  • Blog
  • Clienti
  • Note legali • Privacy
  • Sicurezza
الْعَرَبيّة 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 è un gestionale di applicazioni aziendali open source pensato per coprire tutte le esigenze della tua azienda: CRM, Vendite, E-commerce, Magazzino, Produzione, Fatturazione elettronica, Project Management e molto altro.

Il punto di forza di Odoo è quello di offrire un ecosistema unico di app facili da usare, intuitive e completamente integrate tra loro.

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