简体   繁体   中英

Parse Error on Installing Module OpenERP v8

I am working on OpenERP v8 on Ubuntu 14.04. I have developed a simple module . Now when I try to install it through addons folder , it gives a strange error and I m unable to install the module. The error says
ParseError: "Wrong value for ir.ui.view.type: 'data'" I have no such idea about this issue that what its trying to say here. Here is my xml code

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
         <record id="employee_salary_change_form_view" model="ir.ui.view">
         <field name="name">Menu</field>
         <field name="model">employee.salary.change</field>
         <field name="arch" type="xml">
            <form string="Proposal For Change in Salary">
              <header>
                <button name="prop_approve" string="Approve" class="oe_highlight"/>
                <field name="proposal_state" widget="statusbar" clickable="1"/>                   
            </header>

            <group>
               <field name="proposal_date"/>
               <field name="effective_date" />
            </group>     

            <label for="department_id" string="From Department" />
            <field name="department_id" style="width: 26%%" on_change="myfunc"/>
                   <p></p><p></p>
            <field name="effective_employee_ids" nolabel="1" colspan="3">
                <tree string="For Employee" editable="top">
                    <field name="employee_name" widget="selection"/>
                        <field name="zeo_number" /> 
                    <field name="emp_basic"/>
                    <field name="emp_allowance" />
                    <field name="emp_current_total"/>
                    <field name="emp_propose_basic"/>
                    <field name="emp_propose_allowance" />
                    <field name="emp_propose_total"/>
                </tree>
            </field>
        </form>
        <div class="oe_chatter">
            <field name="message_follower_ids" widget="mail_followers" groups="base.group_user"/>
            <field name="message_ids" widget="mail_thread"/>
        </div>  
    </field>
</record>

<record id="employee_salary_change_tree_view" model="ir.ui.view">
            <field name="name">Payroll Change Tree</field>
            <field name="model">employee.salary.change</field>          
            <field eval="7" name="priority"/>
            <field name="arch" type="xml">
              <tree>
                      <field name="proposal_date"/>
                      <field name="effective_date"/>
                      <field name="department_id"/>                         
              </tree>                       
            </field>
</record>

<act_window id="employee_salary_change_action" name="Wage Changes" res_model="employee.salary.change" view_mode="tree,form" />

<menuitem id="employee_salary_change_menu" name="Wage Change" parent="hr_payroll.menu_hr_root_payroll" sequence="21" action="employee_salary_change_action" />

</data>
</openerp>

I really need guidance on this one. Hopes for suggestion. Thanks n Regards

I had the exact same issue when I was going to install a custom module on my live-server that I had developed on my test-server where it was working perfectly fine.

Finally to make it work I had to comment out everything except the -tags. Odoo would then install the view without any errors. Next I took away the comment-tags so I had the code intact again, I could make an update and odoo parsed the XML without errors.

I have no idea why this worked though.

Put the block inside the . 块放在For clarification refer of sale module ,请参考销售模块的

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM