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

Error while adding grid to a form.

Subscriure's

Get notified when there's activity on this post

This question has been flagged
errorformgridview
4780 Vistes
Avatar
sneha antony

I have successfully developed a new module and installed in openerp 7.Now i want to add a grid just below the form that so that I can enter the date and status.For creating grid I have changed the code like this.But there occured an error

raise except_orm('ValidateError', '\n'.join(error_msgs)) except_orm: ('ValidateError', u'Error occurred while validating the field(s) arch: Invalid XML for View Architecture!')

my code changes are student_info.py from openerp.osv import osv, fields

class student_student(osv.osv):

_name = 'student.student'

_columns = {
'name':fields.char('Student Name',size=16,required = True,translate = True),
'age':fields.integer('Age',required = True),
'percent':fields.float('Percentage',help = 'This field will add average marks of students out of 100'),
'gender':fields.selection([('male','Male'),('female','Female')],'Gender'),
'active':fields.boolean('Active'),
'notes':fields.text('Details'),

}

_defaults = { 'name':'Atul',
      'active':True,

} student_student()

class student_line(osv.osv):

_name = 'student.line'

_columns = {
     'student_id': fields.many2one('student.student', 'student id', select=True, required=True,     ondelete='cascade'),

} student_line()

class student_order(osv.osv):

_name = 'student.order'

_columns = {
      'student_line': fields.one2many('student.student', 'student_id', 'Order Lines', states={'approved':[('readonly',True)],'done':[('readonly',True)]}),
       'date_pm': fields.date('Date', required=True, select=True),
       'status':fields.selection([('pending','Pending'),('completed','Completed')],'Status'),

} student_order()

student_info_view.xml <openerp> <data>

<record model="ir.ui.view" id="student_search"> <field name="name">student.search</field> <field name="model">student.student</field> <field name="type">search</field> <field name="arch" type="xml"> <search string="student information search"> <field name="name" string="Student Name"/> <field name="gender" string="Gender"/>
<field name="age" string="Age"/> </search> </field> </record>

<record id="student_student_tree" model="ir.ui.view"> <field name="name">student.result.tree</field> <field name="model">student.student</field> <field name="type">tree</field> <field name="arch" type="xml"> <tree string="Student_result">
<field name="name"/>
<field name="age"/> <field name="percent"/> <field name="gender"/>
<field name="active"/> </tree> </field> </record>

<record id="student_student_form" model="ir.ui.view"> <field name="name">student.result.form</field> <field name="model">student.student</field> <field name="arch" type="xml"> <form string="Student_result" version="7.0">
<sheet> <group> <group> <field name="name"/> <field name="age"/> <field name="percent"/> <field name="gender"/> <field name="active"/> <field name="notes"/> </group> </group>

<notebook> <page string="Student Details"> <field name="student_line"> <tree string="Details" editable="bottom"> <field name="date_pm"/> <field name="status"/> </tree> </field> </page> </notebook> </sheet> </form> </field> </record>

<record id="action_student_student" model="ir.actions.act_window"> <field name="name">Student Information</field> <field name="res_model">student.student</field> <field name="view_type">form</field> <field name="view_mode">tree,form</field> </record>

<menuitem id="student_parent" name="student"/> <menuitem id="menu_student_parent" name="Student Management" parent="student_parent"></menuitem> <menuitem action="action_student_student" id="menu_student_student" parent="menu_student_parent" string="Result"/> </data> </openerp> I am a newbie so mistakes are there

0
Avatar
Descartar
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
Error while trying to open a form in my module Solved
error form
Avatar
Avatar
2
de gen. 21
4300
View Inheritance Problem
views error gridview
Avatar
0
de maig 21
3009
How do I highlight an invalid form field via custom logic in the onchange method?
error form validation highlight
Avatar
Avatar
1
de des. 19
6161
form view server error
server error form view
Avatar
Avatar
Avatar
3
de març 15
5182
?"Your country might be blocked by our hosting provider" error when I create new website
error
Avatar
0
d’oct. 25
461
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