Odoo Help

Welcome!

This community 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.

0

ParseError: "Wrong value for ir.ui.view.type: 'data'"

By
Nada MES
on 9/2/16, 2:34 PM 348 views

I just created a module using this code :

<record id="cym_form" model="ir.ui.view">
      <field name="name">CYM Tag</field>
      <field name="model">cym.tag</field>
      <field name="priority">1</field>
      <field name="arch" type="xml">
	<data><field name="cym_tag"/>
	<field name="modules" widget="one2many_tags"/>
      </data></field>
    </record>

And when I try to istall it I get this error :

ParseError: "Wrong value for ir.ui.view.type: 'data'" while parsing /home/production/odoo/addons/crm_cym/form_cym_view.xml:4

I really don't understand where it came from. Is it the use of wigdet ? The model ?

Here is my py code :

class ir_module(osv.osv):
    _inherit = 'ir.module.module'
    _columns = {
        'tag_id': fields.many2one('cym.tag', 'tag_name'),
    }

class cym_tag(osv.osv):
    _name = 'cym.tag'
    _order = 'name asc'

    _columns = {
        'tag_name': fields.char(u'Nom du Tag', size=128, required=True),
        'modules': fields.one2many('ir.module.module', 'tag_id', 'Modules'),
    }

0
Nada MES
On 9/3/16, 7:06 AM

Actually I didn't notice it but in my code there is no data tag after

<field name="arch" type="xml"> but it's written in the error when I want to install my module !

0
Ajeet Yadav
On 9/3/16, 12:23 AM

I think you use data tag  after <field name="arch" type="xml">.
You can use below code-

<record id="cym_form" model="ir.ui.view">
      <field name="name">CYM Tag</field>
      <field name="model">cym.tag</field>
      <field name="priority">1</field>
      <field name="arch" type="xml">
	<form><field name="cym_tag"/>
	<field name="modules" widget="one2many_tags"/>
      </form></field>
    </record>


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 9/2/16, 2:34 PM
Seen: 348 times
Last updated: 9/3/16, 7:06 AM