Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

"Unexpected section title" Error, while creating & executing first module

By
Zouhair
on 7/23/14, 7:10 AM 2,514 views

__init__.py

# -*- coding: utf-8 -*-

import openacademy

__openerp__.py

# -*- coding: utf-8 -*-
{
    'name': 'Formulario de OpenAcademy',
    'version': '1.0',
    'author': '-author',
    'category': 'Practicas',
    'description':"""
        OpenERP Web example module.
        ===========================
        """,
    'website': 'http://www.company.com/',
    'license': '',
    "depends" : ["base"],
    'init_xml': ["openacademy_view.xml",],
    'demo_xml': [],
    'update_xml': [],
    'installable': True,
    'active': False,
}

openacademy.py

# -*- coding: utf-8 -*-

from openerp.osv import fields, osv, orm
from datetime import time, datetime
from tools.translate import _

class openacademy_student(osv.osv):
    _name = "openacademy.student"
    _description = "Formulario de Estudiantes"
    _columns = {
        'name': fields.char('Nombre del Estudiante', size=255, required=True, readonly=False, help='Nombre del Alumno'),
        'fecha': fields.date('Fecha de alta', required=True),
        'edad': fields.integer('Edad', required=True),
        'active': fields.boolean('Activo'),
        'state': fields.selection([('draft','Borrador'),('confirmed','Confirmado'),('cancel','Cancelado')], 'Estado',readonly=True),
    }
    _defaults = {
        'fecha': lambda *a: time.strftime('%Y-%m-%d'),
        'state': 'draft',
    }
    openacademy_student()

openacademy_view.xml

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <record id="openacademy_student_tree" model="ir.ui.view">
            <field name="name">openacademy.student.tree</field>
            <field name="model">openacademy.student</field>
            <field name="arch" type="xml">
                <tree string="Listado de Estudiantes">
                    <field name="name"/>
                    <field name="fecha"/>
                    <field name="state"/>
                </tree>
            </field>
        </record>

        <record id="openacademy_student_form" model="ir.ui.view">
            <field name="name">openacademy.student.form</field>
            <field name="model">openacademy.student</field>
            <field name="arch" type="xml">
                <form string="Formulario Estudiante" version="7.0">
                    <header>
                        <field name="state" widget="statusbar"/>
                    </header>
                    <sheet>
                        <group>
                            <field name="name" />
                            <field name="fecha" />
                            <field name="edad" />
                            <field name="active" />
                        </group>
                    </sheet>
                </form>
            </field>
        </record>

        <record id="openacademy_student_action" model="ir.action.act_window">
            <field name="name">Estudiantes</field>
            <field name="res_model">openacademy.student</field>
            <field name="view_type">form</field>
            <field name="view_model">tree,form</field>
        </record>

        <menuitem id="openacademy_student_menu" name="OPENACADEMY"/>
        <menuitem id="submenu_openacademy_student" parent="openacademy_student_menu" name="Estudiantes" sequense="0" />
        <menuitem id="submenu_openacademy_student_action" parent="openacademy_student_menu" name="Estudiantes" sequense="0" action="openacademy_student_action"/>
    </data>
</openerp>

the error

Client Traceback (most recent call last): File "C:\OpenERP 7.0-20140622-231040\Server\server\openerp\addons\web\http.py", line 204, in dispatch File "C:\OpenERP 7.0-20140622-231040\Server\server\openerp\addons\web\controllers\main.py", line 1128, in call_kw File "C:\OpenERP 7.0-20140622-231040\Server\server\openerp\addons\web\controllers\main.py", line 1114, in _call_kw File "C:\OpenERP 7.0-20140622-231040\Server\server\openerp\addons\web\session.py", line 42, in proxy File "C:\OpenERP 7.0-20140622-231040\Server\server\openerp\addons\web\session.py", line 30, in proxy_method File "C:\OpenERP 7.0-20140622-231040\Server\server\openerp\addons\web\session.py", line 103, in send Server Traceback (most recent call last): File "C:\OpenERP 7.0-20140622-231040\Server\server\openerp\addons\web\session.py", line 89, in send File "C:\OpenERP 7.0-20140622-231040\Server\server\.\openerp\netsvc.py", line 296, in dispatch_rpc File "C:\OpenERP 7.0-20140622-231040\Server\server\.\openerp\service\web_services.py", line 626, in dispatch File "C:\OpenERP 7.0-20140622-231040\Server\server\.\openerp\osv\osv.py", line 190, in execute_kw File "C:\OpenERP 7.0-20140622-231040\Server\server\.\openerp\osv\osv.py", line 132, in wrapper File "C:\OpenERP 7.0-20140622-231040\Server\server\.\openerp\osv\osv.py", line 199, in execute File "C:\OpenERP 7.0-20140622-231040\Server\server\.\openerp\osv\osv.py", line 187, in execute_cr File "C:\OpenERP 7.0-20140622-231040\Server\server\.\openerp\osv\orm.py", line 3679, in read File "C:\OpenERP 7.0-20140622-231040\Server\server\.\openerp\osv\orm.py", line 3800, in _read_flat File "C:\OpenERP 7.0-20140622-231040\Server\server\.\openerp\osv\fields.py", line 1145, in get File "C:\OpenERP 7.0-20140622-231040\Server\server\openerp\addons\base\module\module.py", line 158, in _get_desc File "docutils\core.pyc", line 418, in publish_string File "docutils\core.pyc", line 666, in publish_programmatically File "docutils\core.pyc", line 221, in publish File "docutils\readers\__init__.pyc", line 69, in read File "docutils\readers\__init__.pyc", line 75, in parse File "docutils\parsers\rst\__init__.pyc", line 162, in parse File "docutils\parsers\rst\states.pyc", line 174, in run File "docutils\statemachine.pyc", line 239, in run File "docutils\statemachine.pyc", line 460, in check_line File "docutils\parsers\rst\states.pyc", line 1115, in indent File "docutils\parsers\rst\states.pyc", line 1130, in block_quote File "docutils\parsers\rst\states.pyc", line 286, in nested_parse File "docutils\parsers\rst\states.pyc", line 199, in run File "docutils\statemachine.pyc", line 239, in run File "docutils\statemachine.pyc", line 460, in check_line File "docutils\parsers\rst\states.pyc", line 2700, in underline File "docutils\utils\__init__.pyc", line 234, in severe File "docutils\utils\__init__.pyc", line 192, in system_message SystemMessage: <string>:3: (SEVERE/4) Unexpected section title. OpenERP Web example module. ===========================

how solve that

1

Ray Carnes

--Ray Carnes--
15717
| 9 7 9
Greater Los Angeles, United States
--Ray Carnes--

Senior Odoo Analyst

OpenERP 6.1, 7.0 and Odoo 8.0, 9.0 (Since 2012)

Completed Functional and Technical Training.

Major Skills:

  • Needs Discovery and Requirements Analysis;

  • Function and Technical Specifications;

  • Project Planning;

  • Prototyping and Proof of concepts;

  • Data migration;

  • Configuration & Customization (UI and modules);

  • Integration - data, business logic and service levels;

  • Training and Knowledge transfer;

  • Go Live support;

  • Help desk;

  • Version Migration.

I have over 20 years of experience empowering and enabling users with enterprise information systems that make a real and measurable difference in their ability to proactively manage their businesses and organizations. 

Ray Carnes
On 7/23/14, 11:11 PM

Try reformatting your DESCRIPTION - as indicated by the error.

0
Alejandro Santana
On 12/17/14, 3:11 AM

I had the same issue. Maybe it is a bug. It should accept "=" character and indent.

Try replacing "=" with "-" and, maybe, deindent it. And if error persists and Odoo does not recognize the changes in your code, try going to the "Translated Strings" (or the name in English, which I do not know right now), and modify there the strings with your module description.

 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 7/23/14, 7:10 AM
Seen: 2514 times
Last updated: 3/16/15, 8:10 AM