← Back to team overview

credativ team mailing list archive

Creating ang installing personnal module

 

Hello everyone it's me again. Please i need help about openerp module
installation. I try to understant openerp work so i've modified class.py
file;   __init_.py file; __openerp__.py file and view file from example
module but when i install i get error:

ValidateError
Error occurred while validating the field(s) res_model,src_model:
Invalid model name in the action definition:


my class:

from osv import fields, osv

class vigne(osv.osv):
    _name = 'vigne.class'
    _columns = {
    'name': fields.char('Name'),
    }
vigne()



my View:

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <menuitem
            id="menu_vigne"
            name="Vigne"
            sequence="1"
            groups="base.group_system"/>
        <!--==========
        Example Views
        ==========
        -->

    <record id="view_vigne_class_form" model="ir.ui.view">
            <field name="name">vigne.class.form</field>
            <field name="model">vigne.class</field>
            <field name="type">form</field>
            <field name="arch" type="xml">
                <form string="Vigne">
                    <group colspan="4" col="2">
                        <field name="name"/>
                    </group>
                </form>
            </field>
        </record>



    <record id="view_vigne_class_tree" model="ir.ui.view">
            <field name="name">vigne.class.tree</field>
            <field name="model">vigne.class</field>
            <field name="type">tree</field>
            <field name="arch" type="xml">
                <tree string="Examples">
                    <field name="name" select="1"/>
                </tree>
            </field>
        </record>



        <record id="open_view_vigne_class_list_my"
model="ir.actions.act_window">
            <field name="name">Examples</field>
            <field name="res_model">vigne.class</field>
            <field name="view_type">form</field>
            <field name="view_id" ref="view_vigne_class_tree"/>
        </record>
        <menuitem
            action="open_view_vigne_class_list_my"
            id="menu_open_view_example_class_list_my"
            parent="menu_vigne"
            sequence="5"/>


    <record id="open_view_view_class_new" model="ir.actions.act_window">
            <field name="name">New Example</field>
            <field name="res_model">vigne.class</field>
            <field name="view_type">form</field>
            <field name="view_id" ref="view_vigne_class_form"/>
        </record>
        <menuitem
            action="open_view_view_class_new"
            id="menu_open_view_vigne_class_new"
            parent="menu_vigne"
            sequence="10"/>


    </data>
</openerp>
-- 
This message was sent from Launchpad by
ange bouabre (https://launchpad.net/~angebouabre)
to each member of the OpenERP Framework Experts team using the "Contact this
team" link on the OpenERP Framework Experts team page
(https://launchpad.net/~openerp-expert-framework).
For more information see
https://help.launchpad.net/YourAccount/ContactingPeople