Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
2
Replies
1817
Views
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"?>
<odoo>
<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">
<form>
<sheet>
<group>
<field name="name"/>
</group>
</sheet>
</form>
</field>
</record>
<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">
<tree>
<field name="name"/>
</tree>
</field>
</record>
<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>
</record>
<menuitem name="Custom Class" id="custom_class_menu" action="action_custom_class"/>
</odoo>
Hope it works for you.
Thanks,
No its not works add the parent tag also in the menuitem
also add the menuitem tag first ,then add the parent
Refer Odoo Documentaion
https://www.odoo.com/documentation/8.0/
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
how to create own custom field in cutom modual like this 'test' : fields.custom('string')