1

Having this py file: from osv import osv, fields

class my_class(osv.osv_memory):
 _name = 'my.class'
  _columns = {
   'column1': fields.integer('Column1:'),
   'column2': fields.integer('Column2:'),
 } 
my_class()

a viue like:

  <record model="ir.ui.view" id="view_my_class">
    <field name="name">my.class.form</field>
    <field name="model">my.class</field>
    <field name="type">form</field>
    <field name="arch" type="xml">
     <field name="Column1"/>
     <field name="Column2"/>
    </field>
  </record>

and an action view inside xml with this format:

  <record model="ir.actions.act_window" id="action_my_action'">
    <field name="name">Stuff,,,</field>
    <field name="res_model">my.class</field>
    <field name="view_type">form</field>
    <field name="view_mode">form</field>
    <field name="view_id" ref="view_my_class"/>
    <field name="target">new</field>
  </record>  

It appears this errror:

Validate Error An error has occurred while the field (s) res_model, src_model validated: Invalid model name in the action definition.

Why?

PD: its a wizard part of my own module.

Vinh VO
  • 705
  • 1
  • 7
  • 28
Mark
  • 684
  • 2
  • 9
  • 25

1 Answers1

0

main init imports main addon file, wizard init imports its correct file, what else you need? – Mark Dec 12 '15 at 11:30

4 years later... do you check your main __init__.py for wizard imports? anyway, take it as a state of mind :) It has taken me years too...

nairoby
  • 55
  • 4