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

v16: while Upgrading Module it is showing View related Error

Iscriviti

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

La domanda è stata contrassegnata
viewsodoo16features
1 Rispondi
2908 Visualizzazioni
Avatar
SmithJohn45

hi all, i am creating a custom module, i have created Model and it can be seen in Technical -> Models (the code is below) which is fine, then i created View but when upgrading Module in Apps it is throwing Error. 

due to some problems here i am posting View code and Error message in Comment.

please help to find out what i am doing wrong and how to resolve it.


My Model code is here:

from odoo import models, fields


class CRMInquiry(models.Model):

_name = 'crm.inquiry'

_description = 'CRM Lead Inquiry'


product_id = fields.Many2one('product.product', string='Product Name', required=True)

qty = fields.Integer(string='Quantity', default=1)


note: as mentioned above, check View code and Error in Comments below.

in continuation of my topic below :

https://www.odoo.com/forum/help-1/v16-inherit-crm-pipeline-view-and-add-page-tab-with-custom-fields-236904

regards

0
Avatar
Abbandona
SmithJohn45
Autore

My view code as per your advised code:

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="view_crm_lead_form_inherit01" model="ir.ui.view">
<field name="name">crm.leads.inherit</field>
<field name="model">crm.inquiry</field>
<field name="inherit_id" ref="crm.crm_lead_view_form"/>
<field name="arch" type="xml">
<xpath expr="//page[@name='lead']" position="after">
<page name="">th
<group>
<field name="product_id"/>
<field name="qty"/>
</group>
</page>
</xpath>
</field>
</record>
</odoo>

SmithJohn45
Autore

the Error while upgrading Module through Apps:

<form class="o_lead_opportunity_form" js_class="crm_form">
<header>
<button name="action_set_won_rainbowman" string="Won" type="object" class="oe_highlight" data-hotkey="w" title="Mark as won" attrs="{'invisible': ['|','|', ('active','=',False), ('probability', '=', 100), ('type', '=', 'lead')]}"/>

Field `stage_id` does not exist

View error context:
{'file': 'd:\\program files\\odoo '
'16.0e.20230607\\server\\odoo\\custom_addons\\crm_customz\\views\\crm_leads_custom_inquiry.xml',
'line': 1,
'name': 'crm.leads.inherit',
'view': ir.ui.view(2407,),
'view.model': 'crm.inquiry',
'view.parent': ir.ui.view(2318,),
'xmlid': 'view_crm_lead_form_inherit01'}

Avatar
Nikhil Nakrani
Risposta migliore

Hi SmithJohn,

Based On your Code:

  1. When you create view for this specific model (crm.inquiry) then its not present in odoo default code so you need create its own view.
  2. Don't inherit (crm_lead_view_form) this  view because this is used in (crm.lead) model if you add your both field inside (crm.lead) then you need to inherit this view.
  3. Right now you create your new model (crm.inquiry) so you need to create  its own view.
  4.  For your information if you need to add your both field like product_id and qty add in crm.lead  model then you need to add like this way (_inherit="crm.lead") and crm module add in depends of manifest file.

Thanks.

1
Avatar
Abbandona
SmithJohn45
Autore

thank you @Nikhil , i really don't know about this limitation,

the above mentioned View code is a sample to check if its correct or not. actually this will crm.inquiry will have multiple rows, view will be created with ' tree view + editable=bottom '.

as per your advise, if i add both fields in crm.lead and inherit view, add the functionality for multiple rows, how it will work? what i have to do to achieve this?

hope this clear.

regards

SmithJohn45
Autore

thanks a lot @Nikhil Nakrani,

now it is clear why it is showing error as mentioned in my opening post 2nd comment.
for beginners like me who can face the same situation:
- when we Inherit a view, we have to use same Model in original view which we are inheriting, because the view we are creating is actually Based on original view. hope this will help.

regards

Nikhil Nakrani

Welcome SmithJohn

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à
want to find a tiny View to edit with Odoo frontend via Settings...
views odoo16features
Avatar
Avatar
Avatar
2
ago 24
5117
User Access in Specific Field
views odoo16features
Avatar
Avatar
Avatar
2
gen 24
2688
how to use FIGMA for Odoo to create Forms, Tree and other Views
views odoo16features beautify
Avatar
Avatar
1
dic 24
6215
How to modify dynamically tree attribute inside form view in odoo16?
views xml odoo16features
Avatar
0
gen 24
3520
How to add a group to inherited view odoo16 Risolto
views groups odoo16features
Avatar
Avatar
Avatar
3
nov 23
15857
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