콘텐츠로 건너뛰기
Odoo 메뉴
  • 로그인
  • 무료 체험하기
  • 앱
    재무 관리
    • 회계
    • 청구서 관리
    • 비용 관리
    • 스프레드시트 (BI)
    • 문서
    • 전자 서명
    판매
    • CRM
    • 판매
    • POS 스토어
    • POS 레스토랑
    • 구독
    • 렌탈
    웹사이트
    • 웹사이트 빌더
    • 이커머스
    • 블로그
    • 포럼
    • 실시간 채팅
    • 온라인 학습 관리
    공급망
    • 재고 관리
    • 제조 관리
    • 제품 수명주기 관리 (PLM)
    • 매입
    • 유지관리
    • 품질
    인적자원 관리
    • 직원
    • 채용
    • 휴가 관리
    • 인사 평가
    • 인재 추천
    • 차량 관리
    마케팅
    • 소셜 마케팅
    • 이메일 마케팅
    • SMS 마케팅
    • 행사
    • 마케팅 자동화
    • 설문 조사
    서비스
    • 프로젝트
    • 작업 기록
    • 현장 서비스
    • 헬프데스크
    • 일정 관리
    • 일정 예약
    생산성
    • 메일 및 채팅
    • 전자 결재
    • IoT
    • VoIP
    • 지식 센터
    • WhatsApp
    타사 앱 Odoo 스튜디오 Odoo 클라우드 플랫폼
  • 인더스트리
    리테일
    • 서점
    • 의류 매장
    • 가구점
    • 식료품점
    • 철물점
    • 장난감 가게
    식음료 & 숙박업
    • 바 & 펍
    • 레스토랑
    • 패스트푸드
    • 게스트 하우스
    • 음료 유통업체
    • 호텔
    부동산
    • 부동산 중개업체
    • 건축 회사
    • 건설
    • 부동산 관리
    • 가드닝
    • 부동산 소유자 협회
    컨설팅
    • 회계 법인
    • Odoo 파트너
    • 마케팅 대행사
    • 법률 사무소
    • 인재 영입
    • 감사 및 인증
    제조 관리
    • 텍스타일
    • 메탈
    • 가구
    • 푸드
    • 양조장
    • 기업용 선물
    건강 & 피트니스
    • 스포츠 클럽
    • 안경점
    • 피트니스 센터
    • 웰니스 전문가
    • 약국
    • 미용실
    사업
    • 핸디맨
    • IT 하드웨어 및 지원 서비스
    • 태양 에너지 시스템
    • 제화업체
    • 클리닝 서비스
    • HVAC 서비스
    기타
    • 비영리 단체
    • 환경 에이전시
    • 광고판 임대
    • 사진
    • 자전거 임대
    • 소프트웨어 리셀러
    전체 인더스트리 찾아보기
  • 커뮤니티
    학습
    • 튜토리얼
    • 문서
    • 인증
    • 훈련
    • 블로그
    • 팟캐스트
    교육 역량 강화
    • 교육 프로그램
    • Scale-Up! 경영관리 게임
    • Odoo에 방문해보세요
    소프트웨어 신청
    • 다운로드
    • 버전 살펴보기
    • 릴리즈 내역
    협업
    • Github
    • 포럼
    • 행사
    • 번역
    • 파트너 등록
    • 파트너 대상 서비스
    • 회계 법인 정보 등록
    서비스 신청
    • 파트너 검색
    • 회계사 검색
    • 전문 상담 예약
    • 구현 서비스
    • 고객 정보
    • 고객 지원
    • 업그레이드
    Github 유튜브 트위터 링크드인 인스타그램 페이스북 스포티파이
    +1 (650) 691-3277
    데모 예약하기
  • 요금제
  • 고객 지원

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

  • CRM
  • e-Commerce
  • 회계
  • 재고 관리
  • PoS
  • 프로젝트
  • MRP
All apps
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
모든 게시물 사용자 배지
태그 (모두 보기)
odoo accounting v14 pos v15
게시판 정보
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
모든 게시물 사용자 배지
태그 (모두 보기)
odoo accounting v14 pos v15
게시판 정보
도움말

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

구독

이 게시물에 활동이 있으면 알림 받기

신고된 질문입니다
2 답글
4616 화면
아바타
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
아바타
취소
아바타
Ben Bernard
베스트 답변

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
아바타
취소
ABU K
작성자

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

아바타
Ludo - 21South
베스트 답변

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
아바타
취소
토론이 재미있으신가요? 직접 참여해보세요!

지금 바로 가입하여 독점 서비스를 이용해보고 특별한 커뮤니티와 소통하세요!

가입
커뮤니티
  • 튜토리얼
  • 문서
  • 포럼
오픈 소스
  • 다운로드
  • Github
  • Runbot
  • 번역
서비스
  • Odoo.sh 호스팅
  • 고객 지원
  • 업그레이드
  • 맞춤 개발
  • 학습
  • 회계사 검색
  • 파트너 검색
  • 파트너 등록
회사 소개
  • 회사 소개
  • 브랜드 자산
  • 상담 문의
  • 인재 채용
  • 행사
  • 팟캐스트
  • 블로그
  • 고객 사례
  • 법적고지 • 개인정보
  • 보안
الْعَرَبيّة 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는 CRM, 이커머스, 회계, 재고, POS, 프로젝트 관리 등 기업의 모든 요구 사항을 충족하도록 설계된 오픈 소스 기반의 통합 비즈니스 앱 제품군입니다.

Odoo의 간편한 UI와 완벽하게 통합된 기능을 직접 확인해 보세요.

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