Odoo Help

0

Tutorial to create my own module in Odoo9

By
Lince
on 5/19/16, 10:18 AM 732 views

Hello,

Do you know some tutorials to create (step by step) a new module in Odoo9 ?

Thank you.

1
Lindsay Slazakowski
On 5/19/16, 3:58 PM

If you're willing to spend a little money, the Odoo Development Cookbook is a great, new resource. Udemy has a decent video tutorial as well, but it's a bit pricier.

https://www.packtpub.com/big-data-and-business-intelligence/odoo-development-cookbook

https://www.udemy.com/odoo-technical/

2

Yenthe

--Yenthe--
7242
| 7 7 8
Turnhout, Belgium
--Yenthe--

My Odoo blog: http://www.odoo.yenthevg.com/

My Twitter: https://twitter.com/Yenthe666

Yenthe
On 5/19/16, 10:36 AM

Hi Lince,

You can find an official tutorial (written by Odoo) here: https://www.odoo.com/documentation/9.0/howtos/backend.html
It explains the basic concepts pretty good. For further and more advanced things there are usually some tutorials on the internet too.

Yenthe


0

Shameem iWesabe

--Shameem iWesabe--
880
| 5 3 5
الخبر, Saudi Arabia
--Shameem iWesabe--

Activities     :    Youtube

                           Stackoverflow 

Experience

           iWesabe                                  ◉

           Axon Communications        ❍

           Cybrosys Technologies        ❍


Shameem iWesabe
On 3/28/17, 1:08 AM

See the  simple example structure

 ◲ custom_module
|___ ◲ models
| |___◫ __init__.py
| |___◫ custom_models.py
|
|___ ◲ views
 |    |___◫ custom_view.xml
|
 |___ ◫ __init__.py
 |___ ◫ __openerp__.py

You can watch this on YouTube:  Create and install new custom module in odoo 10 

                        Note : __openerp__.py for odoo 9 and  __manifest__.py for odoo 10

Following are contents of each files.


custom_module/__init__.py

import models

custom_module/__openerp__.py

{ 'name': 'Custom Module', 
'description': 'Description about your module',
'depends': ['base'],
'data': ['views/custom_view.xml'],
}

custom_module/models/__init__.py

import custom_models

custom_module/models/custom_models.py

from odoo import models, fields, api 

class CustomModel(models.Model):
_name = 'custom.model'

name = fields.Char(string='Name')
custom_module/views/custom_view.xml
 <!--Create Top Menu-->
<menuitem name="Top Menu" id="custom_top_menu"/>

<!--Create Sub Child Menu-->
<menuitem name="Sub Child Menu" id="custom_sub_menu" parent="custom_top_menu"/>

<!--Tree view-->
<record id="tree_custom_model" model="ir.ui.view">
  <field name="name">custom.model.tree</field>
<field name="model">custom.model</field>
<field name="arch" type="xml">
<tree>
 <field name="name"/>
 </tree>
</field>
</record>
<!--Form View-->
<record id="form_custom_model" model="ir.ui.view">
<field name="name">custom.model.form</field>
 <field name="model">custom.model</field>
 <field name="arch" type="xml">
<form>
 <sheet>
<group>
 <group>
<field name="name" required="1"/>
</group>
<group/>
 </group>
</sheet>
</form>
</field>
 </record>
<!--Define custom_action-->
<record id="custom_action" model="ir.actions.act_window">
<field name="name">Child Menu</field>
  <field name="res_model">custom.model</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="help" type="html">
 <p class="oe_view_nocontent_create">
Click here to create new item !
</p>
</field>
</record>
<!--Create child menu /Action menu-->
<menuitem name="Child Menu" id="custom_child_menu" parent="custom_sub_menu"
action="custom_action"/>
0
Hector McAmazing
On 5/19/16, 10:57 AM

I recomend download some module examples from gitHub and adapt the code.

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

2 follower(s)

Stats

Asked: 5/19/16, 10:18 AM
Seen: 732 times
Last updated: 3/28/17, 1:08 AM