Skip to Content
Odoo Menu
  • Prihlásiť sa
  • Vyskúšajte zadarmo
  • Aplikácie
    Financie
    • Účtovníctvo
    • Fakturácia
    • Výdavky
    • Tabuľka (BI)
    • Dokumenty
    • Podpis
    Predaj
    • CRM
    • Predaj
    • POS Shop
    • POS Restaurant
    • Manažment odberu
    • Požičovňa
    Webstránky
    • Tvorca webstránok
    • eShop
    • Blog
    • Fórum
    • Živý chat
    • eLearning
    Supply Chain
    • Sklad
    • Výroba
    • Správa životného cyklu produktu
    • Nákup
    • Údržba
    • Manažment kvality
    Ľudské zdroje
    • Zamestnanci
    • Nábor zamestnancov
    • Voľné dni
    • Hodnotenia
    • Odporúčania
    • Vozový park
    Marketing
    • Marketing sociálnych sietí
    • Email marketing
    • SMS marketing
    • Eventy
    • Marketingová automatizácia
    • Prieskumy
    Služby
    • Projektové riadenie
    • Pracovné výkazy
    • Práca v teréne
    • Helpdesk
    • Plánovanie
    • Schôdzky
    Produktivita
    • Tímová komunikácia
    • Schvalovania
    • IoT
    • VoIP
    • Znalosti
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Priemyselné odvetvia
    Retail
    • Book Store
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Reštaurácia
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Reality
    • Real Estate Agency
    • Architecture Firm
    • Konštrukcia
    • Estate Managament
    • Gardening
    • Property Owner Association
    Poradenstvo
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Výroba
    • Textile
    • Metal
    • Furnitures
    • Jedlo
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Iní
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    Browse all Industries
  • Komunita
    Vzdelávanie
    • Tutoriály
    • Dokumentácia
    • Certifikácie
    • Školenie
    • Blog
    • Podcast
    Empower Education
    • Vzdelávací program
    • Scale Up! Business Game
    • Visit Odoo
    Softvér
    • Stiahnuť
    • Porovnanie Community a Enterprise vierzie
    • Releases
    Spolupráca
    • Github
    • Fórum
    • Eventy
    • Preklady
    • Staň sa partnerom
    • Services for Partners
    • Register your Accounting Firm
    Služby
    • Nájdite partnera
    • Nájdite účtovníka
    • Meet an advisor
    • Implementation Services
    • Zákaznícke referencie
    • Podpora
    • Upgrades
    ​Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Získajte demo
  • Cenník
  • Pomoc

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

  • CRM
  • e-Commerce
  • Účtovníctvo
  • Sklady
  • PoS
  • Projektové riadenie
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Tagy (View all)
odoo accounting v14 pos v15
About this forum
Pomoc

Error while adding grid to a form.

Odoberať

Get notified when there's activity on this post

This question has been flagged
errorformgridview
4792 Zobrazenia
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
Zrušiť
Enjoying the discussion? Don't just read, join in!

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

Registrácia
Related Posts Replies Zobrazenia Aktivita
Error while trying to open a form in my module Solved
error form
Avatar
Avatar
2
jan 21
4311
View Inheritance Problem
views error gridview
Avatar
0
máj 21
3020
How do I highlight an invalid form field via custom logic in the onchange method?
error form validation highlight
Avatar
Avatar
1
dec 19
6173
form view server error
server error form view
Avatar
Avatar
Avatar
3
mar 15
5189
?"Your country might be blocked by our hosting provider" error when I create new website
error
Avatar
0
okt 25
468
Komunita
  • Tutoriály
  • Dokumentácia
  • Fórum
Open Source
  • Stiahnuť
  • Github
  • Runbot
  • Preklady
Služby
  • Odoo.sh hosting
  • Podpora
  • Vyššia verzia
  • Custom Developments
  • Vzdelávanie
  • Nájdite účtovníka
  • Nájdite partnera
  • Staň sa partnerom
O nás
  • Naša spoločnosť
  • Majetok značky
  • Kontaktujte nás
  • Pracovné ponuky
  • Eventy
  • Podcast
  • Blog
  • Zákazníci
  • Právne dokumenty • Súkromie
  • Bezpečnosť
الْعَرَبيّة 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 je sada podnikových aplikácií s otvoreným zdrojovým kódom, ktoré pokrývajú všetky potreby vašej spoločnosti: CRM, e-shop, účtovníctvo, skladové hospodárstvo, miesto predaja, projektový manažment atď.

Odoo prináša vysokú pridanú hodnotu v jednoduchom použití a súčasne plne integrovanými biznis aplikáciami.

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