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

IN odoo 8 custom module is running on ubuntu 14.04 lts but cant install in windows 8 why?

Odoberať

Get notified when there's activity on this post

This question has been flagged
2 Replies
4633 Zobrazenia
Avatar
ABU K

Error-----------------------------------------------------------

File "C:\Program Files (x86)\Odoo 8.0-20140922-000203\server\.\openerp\modules\loading.py", line 358, in load_modules File "C:\Program Files (x86)\Odoo 8.0-20140922-000203\server\.\openerp\modules\loading.py", line 263, in load_marked_modules File "C:\Program Files (x86)\Odoo 8.0-20140922-000203\server\.\openerp\modules\loading.py", line 182, in load_module_graph File "C:\Program Files (x86)\Odoo 8.0-20140922-000203\server\.\openerp\modules\loading.py", line 118, in _load_data File "C:\Program Files (x86)\Odoo 8.0-20140922-000203\server\.\openerp\tools\convert.py", line 899, in convert_file File "C:\Program Files (x86)\Odoo 8.0-20140922-000203\server\.\openerp\tools\convert.py", line 976, in convert_xml_import File "lxml.etree.pyx", line 3313, in lxml.etree._Validator.assert_ (src\lxml\lxml.etree.c:159862) AssertionError: Invalid attribute optional for element template, line 80

-----------------------------------------------------------------------------------------

controller------

init.py---------------

import main

main.py------------------

 


from openerp import http
from openerp.http import request


class website_openacademy(http.Controller):

    @http.route('/hello/world', auth='public')
    def test_controller(self):
        return "Hello World"

    @http.route('/hello/world2', auth='public')
    def test_controller2(self):
        return "<h1><b>Hello World</b></h1>"

    @http.route('/hello/world3', auth='user')
    def test_controller3(self):
        return "<b>Hello, %s</b>"%(request.env.user.name)


    # Website Pages
    @http.route('/simple_page', auth='user', website=True)
    def simple_page(self):
        return request.website.render("openacademy.simple_page", {})

    @http.route('/dynamic_page', auth='user', website=True)
    def dynamic_page(self):
        return request.website.render("openacademy.dynamic_page", {'user':request.env.user,'array':[1,2,3,4],'my_func':self.test})

    def test(self,var1):
        print "var1------------",var1
        return "Return test :::"


    @http.route('/openacademy/course', auth='user', website=True)
    def courses(self):
        courses = request.env['openacademy.course'].search([])
        return request.website.render("openacademy.openacademy_course", {'courses':courses})

    @http.route("/openacademy/course/<model('openacademy.course'):course>", auth='user', website=True)
    def courses_detail(self, course):
        return request.website.render("openacademy.openacademy_courses_detail", {'course':course})

 

init--

import course
import session
import wiz_session

course.py------------

from openerp import models, fields, api, _

class Course(models.Model):
    _name = 'openacademy.course'
    
    name = fields.Char(string='Title', required=True)
    image = fields.Binary()
    description = fields.Text()
    html = fields.Html()
    responsible = fields.Many2one('res.users')
    sessions = fields.One2many('openacademy.session','course', copy=False)

    @api.model
    def create(self, values):
        #add your code here
        return super(Course, self).create(values)

    @api.multi
    def write(self, values):
        #add your code here
        return super(Course, self).write(values)

    @api.one
    def copy(self, default):
        default['name'] = self.name + " (copy)" 
        #add your code here
        return super(Course, self).copy(default)

    @api.multi
    def unlink(self):
        #add your code here
        return super(Course, self).unlink()

 

session.py--------

from openerp import models, fields, api
from openerp.exceptions import Warning

class Session(models.Model):

    _name = 'openacademy.session'
    
    name = fields.Char(required=True)
    state = fields.Selection([('draft', 'Draft'),('confirm', 'Confirm'),('cancel', 'Cancel'),('done', 'Done')], required=True, default='draft')
    duration = fields.Float()
    seats = fields.Integer()
    start_date =  fields.Date()
    active =  fields.Boolean(default=True)
    description =  fields.Text()
    course = fields.Many2one('openacademy.course')
    instructor = fields.Many2one('res.partner')
    attendees = fields.Many2many('res.partner')
    occupation = fields.Float(compute="calculate_occupation")
    course_info = fields.Text(related="course.description")
#     upper = fields.Char(compute='_compute_upper',
#                         inverse='_inverse_upper')
#     
#     @api.depends('name')
#     def _compute_upper(self):
#         for rec in self:
#             rec.upper = rec.name.upper() if rec.name else False
# 
#     def _inverse_upper(self):
#         for rec in self:
#             rec.name = rec.upper.lower() if rec.upper else False
#     
    @api.onchange('course')
    def onchange_course(self):
        if self.course and not self.name:
            self.name = self.course.name + ' Session'

    @api.constrains('attendee','instructor')
    def attendee_constrains(self):
        if self.instructor.id in self.attendees.ids:
            raise Warning('You can not add instructor as a attendee')
    
    @api.multi
    @api.depends('seats','attendees')
    def calculate_occupation(self):
        for rec in self:
            if rec.seats:
                rec.occupation =  len(rec.attendees) * 100 / rec.seats
            else:
                rec.occupation = 0
    
    @api.one
    def do_confirm(self):
        self.state = 'confirm'

    @api.one
    def do_done(self):
        self.state = 'done'

    @api.one
    def do_cancel(self):
        self.state = 'cancel'

    @api.one
    def do_reset(self):
        self.state = 'draft'

 

wiz_session.py-------------

from openerp import models, fields, api

class Session(models.TransientModel):

    _name = 'wiz.openacademy.session'

    sessions = fields.One2many('wiz.openacademy.session.data','wiz_id')
    different_data = fields.Boolean()
    
    @api.one
    def add_session(self):
        session_obj = self.env['openacademy.session']
        for session in self.sessions:
            old_session = session_obj.search([("course",'=',session.course.id),("start_date","=",session.date)])
            if old_session:
                old_session.write({"name":session.name,"description": session.description})
            else:
                value = {"name":session.name,
                     "course":session.course.id,
                     "description": session.description,
                     "start_date": session.date
                     }
                session_obj.create(value)

class SessionData(models.TransientModel):

    _name = 'wiz.openacademy.session.data'

    wiz_id = fields.Many2one('wiz.openacademy.session')
    name =  fields.Char()
    course =  fields.Many2one('openacademy.course')
    description = fields.Text()
    date = fields.Date() 

 

report---------

 

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>

        <template id="report_session">
            <t t-call="report.html_container">
                <t t-foreach="docs" t-as="doc">
                    <t t-call="report.external_layout">
                        <div class="page">
                            <div class="oe_structure" />
                            <div class="text-center"><h1><span t-esc="doc.name"></span></h1></div>
                            <div class="text-center">
                                 <h3>
                                     <i class="fa fa-file-text"></i> Course: <span t-esc="doc.course.name"></span>
                                     <t t-if="doc.instructor">
                                         <i class="fa fa-user"> </i> Instructor: <span t-esc="doc.instructor.name"></span>
                                     </t>
                                 </h3>
                                 <h4>
                                     <t t-if="doc.start_date">
                                         <i class="fa fa-calendar"> </i> Date: <span t-esc="doc.start_date"></span>
                                     </t>
                                     <t t-if="doc.duration">
                                         <i class="fa fa-clock-o"> </i> Duration: <span t-esc="doc.duration"></span>
                                     </t>
                                 </h4>
                             </div>
                             <t t-if="doc.attendees">
                                <h3 class="text-center"><u>Attendee List</u></h3>
                                <table class="table table-condensed">
                                    <thead>
                                        <tr>
                                            <th>Name</th>
                                            <th>Phone</th>
                                            <th width="10%" class="text-center">Present</th>
                                        </tr>
                                    </thead>
                                    <tbody class="sale_tbody">
                                       <tr t-foreach="doc.attendees" t-as="a">
                                            <th><span t-field="a.name"/></th>
                                            <th><span t-field="a.phone"/></th>
                                            <th width="10%" class="text-center"><i class="fa fa-square-o"></i></th>
                                       </tr>
                                    </tbody>
                                 </table>
                             </t>
                            <div class="oe_structure" />
                        </div>
                    </t>
                </t>
            </t>
        </template>

        <report id="report_sessions"
                string="Session Report"
                model="openacademy.session"
                report_type="qweb-pdf"
                file="openacademy.report_session"
                name="openacademy.report_session" />


    </data>
</openerp>

static/src/css/---------------openacademy.css

.course_panel{
  margin-top:20px;
  margin-bottom:20px;
}
.course_image{
  max-height:4em;
}

snippet.py----


.alizarin {
    background: #e74c3c;
}

.amethyst {
    background: #9b59b6;
}

.emerald {
    background: #2ecc71;
}

.midnight-blue {
    background: #2c3e50;
}

.peter-river {
    background: #3498db;
}

.dl {
    background: #f0f0f0;
    padding: 30px 0;
    border-radius: 20px;
    position: relative;
}

.dl:before {
    content: " ";
    height: 20px;
    width: 20px;
    background: #ddd;
    border-radius: 20px;
    position: absolute;
    left: 50%;
    top: 20px;
    margin-left: -10px;
}
    
.dl .brand {
    text-transform: uppercase;
    letter-spacing: 3px;
    padding: 10px 15px;
    margin-top: 10px;
    text-align: center;
    min-height: 100px; 
}

.dl .discount {
    min-height: 50px;
    position: relative;
    font-size: 80px;
    line-height: 80px;
    text-align: center;
    font-weight: bold;
    padding: 20px 15px 0;
    color: #FFF;
}

.dl .discount:after {
    content: " ";
    
    border-right: 20px solid transparent;
    border-left: 20px solid transparent;
    position: absolute;
    bottom: -20px;
    left: 20%;
}

.dl .discount.alizarin:after {
    border-top: 20px solid #e74c3c;
}

.dl .discount.peter-river:after {
    border-top: 20px solid #3498db;
}

.dl .discount.emerald:after {
    border-top: 20px solid #2ecc71;
}

.dl .discount.amethyst:after {
    border-top: 20px solid #9b59b6;
}

.dl .discount .type {
    font-size: 20px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: -30px;
}

.dl .descr {
    color: #999;
    margin-top: 10px;
    padding: 20px 15px; 
}
 
.dl .ends {
    padding: 0 15px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.dl .coupon {
    min-height: 50px;
    text-align: center;
    
    text-transform: uppercase;
    font-weight: bold;
    font-size: 18px;
    padding: 20px 15px;
}

.dl .coupon a.open-code {
    color: #16a085;
}

.dl .coupon .code {
    letter-spacing: 1px;
    border-radius: 4px;
    margin-top: 10px;
    padding: 10px 15px;
    color: #f1c40f;
    background: #f0f0f0;
}
    

views/

course

<?xml version="1.0" encoding="UTF-8"?>
<openerp>
    <data>

        <record model="ir.ui.view" id="course_form">
            <field name="name">course form view</field>
            <field name="model">openacademy.course</field>
            <field name="arch" type="xml">
                <form string="Course" version="7.0">
                    <sheet>
                        <field name="image" widget="image" class="oe_left oe_avatar" />
                        <div class="oe_title oe_left">
                            <h1>
                                <field name="name" placeholder="Course Title" />
                            </h1>
                            <label string="Responsible"/>
                            <field name="responsible"/>
                        </div>
                        <notebook>
                            <page string="Description">
                                <field name="description" />
                            </page>
                            <page string="Sessions">
                                <field name="sessions" />
                            </page>
                            <page string="HTML">
                                <field name="html" />
                            </page>
                        </notebook>
                    </sheet>
                </form>
            </field>
        </record>

        <record model="ir.ui.view" id="course_tree">
            <field name="name">course tree view</field>
            <field name="model">openacademy.course</field>
            <field name="arch" type="xml">
                <tree string="Course">
                    <field name="name" />
                </tree>
            </field>
        </record>

        <record model="ir.actions.act_window" id="action_courses">
            <field name="name">Courses</field>
            <field name="res_model">openacademy.course</field>
            <field name="view_mode">tree,form</field>
        </record>

        <menuitem name="Courses" id="menu_courses" parent="menu_general"
            action="action_courses" />

    </data>
</openerp>

menu-----------

<?xml version="1.0" encoding="UTF-8"?>
<openerp>
    <data>

        <menuitem name="Open Academy" id="menu_root" />
        <menuitem name="General" id="menu_general" parent="menu_root" />

    </data>
</openerp>

session-------------

<?xml version="1.0" encoding="UTF-8"?>
<openerp>
    <data>

        <record id="session_form" model="ir.ui.view">
            <field name="name">session.form</field>
            <field name="model">openacademy.session</field>
            <field name="arch" type="xml">
                <form string="Session" version="7.0">
                    <header>
                        <button string="Confirm" name="do_confirm" type="object"
                            states="draft" />
                        <button string="Done" name="do_done" type="object" states="confirm" />
                        <button string="Cancel" name="do_cancel" type="object"
                            states="confirm" />
                        <button string="Reset" name="do_reset" type="object"
                            states="cancel" />
                        <field name="state" widget="statusbar" statusbar_visible="draft,confirm,done" />
                    </header>
                    <sheet>
                        <h1>
                            <field name="name" placeholder="Session name" />
<!--                             <field name="upper" placeholder="Upper Case" /> -->
                        </h1>
                        <group>
                            <group string="General">
                                <field name="course"/>
                                <field name="instructor"/>
                                <field name="active"/>
                            </group>
                            <group string="Schedule">
                                <field name="start_date"/>
                                <field name="duration"/>
                                <field name="seats"/>
                                <field name="occupation"/>
                            </group>
                        </group>
                        <notebook>
                            <page string="Desctiption">
                                <field name="description"/>
                            </page>
                            <page string="Attendees">
                                <field name="attendees"/>
                            </page>
                            <page string="Course Info">
                                <field name="course_info"/>
                            </page>
                        </notebook>
                        </sheet>
                </form>
            </field>
        </record>

        <record id="session_list" model="ir.ui.view">
            <field name="name">session.list</field>
            <field name="model">openacademy.session</field>
            <field name="arch" type="xml">
                <tree string="list">
                    <field name="name"></field>
                    <field name="state"></field>
                    <field name="occupation"></field>

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

        <record id="session_list_action" model="ir.actions.act_window">
            <field name="name">Sessions</field>
            <field name="res_model">openacademy.session</field>
            <field name="view_mode">tree,form</field>
        </record>

        <menuitem id="sessions_menu" parent="menu_general" action="session_list_action" />

    </data>
</openerp>

snippet_template-------------

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>

<template id="simple_page" name="Simple Page">
    <t t-call="website.layout">
        <div class="container">
            <h1>Hello World</h1>
        </div>
        <div class="oe_structure" />
    </t>
</template>


<template id="dynamic_page" name="Simple Page">
    <t t-call="website.layout">
        <div class="container">
            <h1><span t-field="user.name"></span></h1>
            <h1>Length <span t-esc="len(array)"></span></h1>
            <h1> <span t-esc="my_func('aaaaaaaaaa')"></span></h1>
        </div>
    </t>
</template>

<template id="assets_frontend_openacademy" inherit_id="website.assets_frontend" name="Open Academy Front-end assets">
    <xpath expr="." position="inside">
    
        <link rel='stylesheet' href='/openacademy/static/src/css/openacademy.css'/>
    </xpath>
</template>

<template id="header_link_course" inherit_id="website.footer_default" name="Course Link">
    <xpath expr="//div[@id='info']/ul" position="inside">
        <li><a href="/openacademy/course/">Course</a></li>
    </xpath>
</template>

<template id="openacademy_course" name="Simple Page">
    <t t-call="website.layout">
        <div class="container">
            <div class="row">
            <t t-foreach="courses" t-as="c">
                <div class="col-md-3">
                    <div class="panel panel-primary course_panel">
                       <div class="panel-heading text-center"><strong><t t-esc="c.name"></t></strong></div>
                       <div class="panel-body">
                          <div><img class="img img-responsive shadow course_image" t-att-src="'/website/image?model=openacademy.course&amp;field=image&amp;id='+str(c.id)"></img></div>
                       </div>
                       <div class="panel-footer text-center">
                           <p class="text-center" style="margin-bottom:0px;"><strong>Responsible </strong> </p>
                           <p><span class="text-center" t-field="c.responsible.name"></span></p>
                           <a class="btn btn-primary" t-attf-href="/openacademy/course/#{c.id}">See in detail</a>
                       </div>
                    </div>
                </div>
            </t>
            </div>
        </div>
    </t>
</template>

<template id="openacademy_courses_detail" name="Course Detail">
    <t t-call="website.layout">
        <div class="container">
            <div class="row mt32 mb32">
                <div class="col-md-5">
                    <img class="img img-responsive shadow mt16" t-att-src="'/website/image?model=openacademy.course&amp;field=image&amp;id='+str(course.id)"></img>
                </div>
                <div class="col-md-6">
                    <h1 t-field="course.name"></h1>
                    <h3 ><i class="fa fa-user"></i> Responsible : <span t-field="course.responsible.name"></span></h3>
                    <h4 class="text-muted text-justify" t-field="course.description"></h4>
                </div>
            </div>
        </div>
        <div id="html" t-field="course.html"> </div>
    </t>
</template>

<template id="session_optional" optional="enabled" inherit_id="openacademy.openacademy_courses_detail" name="Course Session">
    <xpath expr="//div[@id='html']" position="before">
        <div class="row">
            <div class="col-md-12 text-center">
                <h1>Session for <t t-esc="course.name"/></h1>
            </div>
            <div class="col-md-12 text-center">
                <t t-foreach="course.sessions" t-as="s">
                    <span t-esc="s.name" class="label label-primary"></span>
                </t>
            </div>
        </div>
        
    </xpath>
</template>

</data>
</openerp>

snippet.xml--------------

<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>

<template id="assets_snippet_openacademy" inherit_id="website.assets_frontend" name="Open Academy Snippet Front-end assets">
    <xpath expr="." position="inside">
    
        <link rel='stylesheet' href='/openacademy/static/src/css/snippet.css'/>
    </xpath>
</template>

<template id="snippet" name="Go to Courses" inherit_id="website.snippets">
    <xpath expr="//div[@id='snippet_structure']" position="inside">
        <div>
            <div class="oe_snippet_thumbnail">
                <img class="oe_snippet_thumbnail_img" src="/website/static/src/img/blocks/block_image_text.png" />
                <span class="oe_snippet_thumbnail_title">Open Academy</span>
            </div>
            <section class="oe_snippet_body" id="labels">
                <div class="container">
                    <div class="row mt16 mb16">
                        <div class="col-md-4">
                            <div class="dl">
                                <div class="brand">
                                    <h2>
                                        Beginners
                                    </h2>
                                </div>
                                <div class="discount emerald">
                                    15%
                                    <div class="type">
                                        off
                                    </div>
                                </div>
                                <div class="descr">
                                    
                                        Make your way down a <strong>Path</strong> and build specific <strong>skills</strong>,
                                        wander through All Courses,
                                </div>
                                <div class="ends">
                                    <small>
                                        * Conditions and restrictions apply.
                                    </small>
                                </div>
                                <div class="coupon midnight-blue">
                                    <a href="/page/website.contactus" class="open-code">Get More Info</a>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="dl">
                                <div class="brand">
                                    <h2>
                                        Intermediate
                                    </h2>
                                </div>
                                <div class="discount alizarin">
                                    20%
                                    <div class="type">
                                        off
                                    </div>
                                </div>
                                <div class="descr">
                                    
                                        Make your way down a <strong>Path</strong> and build specific <strong>skills</strong>,
                                        wander through All Courses,
                                </div>
                                <div class="ends">
                                    <small>
                                        * Conditions and restrictions apply.
                                    </small>
                                </div>
                                <div class="coupon midnight-blue">
                                    <a href="/page/website.contactus" class="open-code">Get More Info</a>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-4">
                            <div class="dl">
                                <div class="brand">
                                    <h2>
                                        Advance
                                    </h2>
                                </div>
                                <div class="discount amethyst">
                                    25%
                                    <div class="type">
                                        off
                                    </div>
                                </div>
                                <div class="descr">
                                    
                                        Make your way down a <strong>Path</strong> and build specific <strong>skills</strong>,
                                        wander through All Courses,
                                </div>
                                <div class="ends">
                                    <small>
                                        * Conditions and restrictions apply.
                                    </small>
                                </div>
                                <div class="coupon midnight-blue">
                                    <a href="/page/website.contactus" class="open-code">Get More Info</a>
                                </div>
                            </div>
                        </div>

                    </div>
                </div>
            </section>
        </div>
    </xpath>

</template>

</data>
</openerp>

 

wiz_session---------

<?xml version="1.0" encoding="UTF-8"?>
<openerp>
    <data>

        <record id="wiz_session_form" model="ir.ui.view">
            <field name="name">session wiz form</field>
            <field name="model">wiz.openacademy.session</field>
            <field name="arch" type="xml">
                <form string="Session" version="7.0">
                    <group string="Add/Edit Session">
                        <field name="sessions" nolabel="1">
                            <tree editable="bottom">
                                <field name="course"/>
                                <field name="name"/>
                                <field name="description"/>
                                <field name="date"/>
                            </tree>
                        </field>
                    </group>
                <footer>
                    <button string="Add Description" name="add_session" type="object" class="oe_highlight"/>
                </footer>
                </form>
            </field>
        </record>

        <record id="session_wiz_action" model="ir.actions.act_window">
            <field name="name">Add New Session</field>
            <field name="res_model">wiz.openacademy.session</field>
            <field name="view_mode">form</field>
            <field name="target">new</field>
        </record>

        <menuitem id="sessions_wiz_menu" parent="menu_general"
            action="session_wiz_action"/>

    </data>
</openerp>

 

outside---

init.py----

#
# Open Academy
#
import models
import controller

 

openerp.py

#
# Open Academy manifest file
#
{
    'name': 'Open Academy',
    'category': 'Test',
    'version': '1.0',
    'author': 'Me',
    'depends': ['base','website'],

    'description': """
Test module:
 - training courses
 - training sessions
 - attendee registration
""",
    'data': [
        'views/menu.xml',
        'views/course.xml',
        'views/session.xml',
        'views/wiz_session.xml',
        'views/simple_template.xml',
        'views/snippet.xml',
        'reports/report_session.xml',
    ],
}

0
Avatar
Zrušiť
Avatar
Ben Bernard
Best Answer

Invalid attribute optional

I never know attribute "optional" exist. Try to remove it and see what happen.

I do sometimes feel that python in windows is more rigourous than in linux.

0
Avatar
Zrušiť
ABU K
Autor

Thanks its working ,I removed "optional" attribute and now its working

Avatar
Ludo - 21South
Best Answer

Usually with OS the differences is in the installed packages. Check to see if your windows installation has the same packages and versions of those packages installed.

If it does, also check online if there is an existing bug in the specific package the module breaks on.

This is all of course with the assumption that other modules do work on your windows installation.

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