Create first compute filed with Odoo


1.create __init__.py

import vetclinic

2. create __openerp__.py

{
‘name’ : ‘Vet Clinic’,
‘version’ : ‘1.0’,
‘author’ : ‘ananthu’,
‘website’ : ‘http://www.odoo.com’,
‘category’ : ‘Tools’,
‘depends’ : [‘base’],
‘description’ : ‘Vet Clinic for Animals’,
‘data’ : [‘vetclinic_view.xml’],
‘installable’: True,
‘auto_install’:False
}

3. create vetclinic.py

Capture

4. create vetclinic_view.xml

 

<?xml version=”1.0″ encoding=”utf-8″ ?>
<openerp>
<data>

<record model=”ir.actions.act_window” id=”vetclinc_animals_view”>
<field name=”name”>Animals</field>
<field name=”res_model”>vetclinic.animals</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”>Create the first course
</p>
</field>
</record>
<record model=”ir.ui.view” id=”vetclinc_animals_form_view”>
<field name=”name”>Animals.Form</field>
<field name=”model”>vetclinic.animals</field>
<field name=”arch” type=”xml”>
<form string=”Animals”>
<sheet>
<group>
<field name=”name”/>
<field name=”age”/>
<field name=”group” readonly=”0″/>
</group>
</sheet>
</form>
</field>
</record>

<record model=”ir.ui.view” id=”base_view_partner_form”>
<field name=”name”>Sales History</field>
<field name=”model”>res.partner</field>
<field name=”inherit_id” ref=”base.view_partner_form”/>
<field name=”arch” type=”xml”>
<notebook position=”inside”>
<page string=”Sales History”>
<field name=”sales_history”/>
</page>
</notebook>
</field>
</record>

<menuitem id=”vetclinic_menu” name=”VetClinic”/>
<menuitem id=”vetclinic_submenu” name=”VetClinic” parent=”vetclinic_menu”/>
<menuitem id=”vetclinic_animals” name=”Animals” parent=”vetclinic_submenu” action=”vetclinc_animals_view”/>
</data>
</openerp>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s