Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

v16: while Upgrading Module it is showing View related Error

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
viewsodoo16features
1 Răspunde
2925 Vizualizări
Imagine profil
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
Imagine profil
Abandonează
SmithJohn45
Autor

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
Autor

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'}

Imagine profil
Nikhil Nakrani
Cel mai bun răspuns

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
Imagine profil
Abandonează
SmithJohn45
Autor

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
Autor

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

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

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

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
want to find a tiny View to edit with Odoo frontend via Settings...
views odoo16features
Imagine profil
Imagine profil
Imagine profil
2
aug. 24
5125
User Access in Specific Field
views odoo16features
Imagine profil
Imagine profil
Imagine profil
2
ian. 24
2704
how to use FIGMA for Odoo to create Forms, Tree and other Views
views odoo16features beautify
Imagine profil
Imagine profil
1
dec. 24
6225
How to modify dynamically tree attribute inside form view in odoo16?
views xml odoo16features
Imagine profil
0
ian. 24
3539
How to add a group to inherited view odoo16 Rezolvat
views groups odoo16features
Imagine profil
Imagine profil
Imagine profil
3
nov. 23
15874
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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