Odoo Help


how to create own custom field in cutom modual

ramoliya nikunj
on 2/19/16, 3:39 AM 442 views

how to create own custom field in cutom modual like this 'test' : fields.custom('string')

ramoliya nikunj
on 2/19/16, 6:46 AM

Jignesh Mehta

--Jignesh Mehta--
| 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 2/19/16, 4:18 AM

Hello Nikunj,

Py File:-

class custom_class(models.Model):

     _name = 'custom.class'

     name = fields.Char('Name')

XML file :-

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


     <record id="custom_class_form_view" model="ir.ui.view">

         <field name="name">custom.class.form.view</field>

        <field name="model">custom.class</field>

         <field name="arch" type="xml">




                         <field name="name"/>






    <record id="custom_class_tree_view" model="ir.ui.view">

         <field name="name">custom.class.treeview</field>

        <field name="model">custom.class</field>

         <field name="arch" type="xml">


                 <field name="name"/>




    <record id="action_custom_class" model="ir.actions.act_window">

        <field name="name">Custom Class</field>

        <field name="res_model">custom.class</field>

        <field name="view_type">form</field>

        <field name="view_mode">tree,form</field>


    <menuitem name="Custom Class" id="custom_class_menu" action="action_custom_class"/>


Hope it works for you.


No its not works add the parent tag also in the menuitem

on 2/19/16, 6:24 AM

also add the menuitem tag first ,then add the parent

on 2/19/16, 6:24 AM


--Odoo --

| 5 2 5
--Odoo --

Working in Odoo TEchnologies

On 2/19/16, 4:10 AM

Refer Odoo Documentaion


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.


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)


Asked: 2/19/16, 3:39 AM
Seen: 442 times
Last updated: 2/19/16, 4:18 AM