Odoo Help

0

Syntax error

By
Ahmed
on 4/30/16, 2:55 AM 800 views

i am learning module creation but stuck at a point. can some buddy help me out. odoo is saying syntax error at line 8. mean on title field

#this is teting learning module

# coding: utf-8

from openerp import models,fields, osv

class book(models.Model):

_name="book.book"

_description="simple book"

_coloumn={

title = fields.Char(string='Title', required=True)

desc = fields.text("Description"),

author = fields.char(string="Author", size=30, required=True)

}

3

Jignesh Mehta

--Jignesh Mehta--
3110
| 6 5 8
Surat, India
--Jignesh Mehta--

- I have 3+ years of Industry Experience, specializing Odoo Development, Analysis, Customization, Implementation, Integration.
- I have done many Customization modules in Sale, Purchase, Point of Sale, Inventory, CRM and much more. Also Worked in the Odoo Themes like Business Theme or E-Commerce Theme.
- Develop Jewelery Manufacturing process from Scratch. It have more than 10 Department. Develop PDF and Excel reports for this project around 150 per format.

Jignesh Mehta
On 4/30/16, 3:51 AM

Hello Ahmed,


_coloumn spell is wrong.

Try this :-

Old api :-

from openerp import models,fields, osv

class book(models.Model):

    _name="book.book"

    _description="simple book"

    _columns = {

        'title' : fields.char(string='Title', required=True),

        'desc': fields.text("Description"),

        'author': fields.char(string="Author", size=30, required=True),

    }


New Api :-

from openerp import models,fields, osv

class book(models.Model):

    _name="book.book"

    _description="simple book" 

       

    title =  fields.Char(string='Title', required=True)

    desc = fields.Text("Description")

    author =  fields.Char(string="Author", size=30, required=True)

 

Hope this useful to you.

Thanks,

About This Community

This platform 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.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 4/30/16, 2:55 AM
Seen: 800 times
Last updated: 4/30/16, 3:51 AM