Odoo Help

4

0
26 Answers
1
Atchuthan India
5/31/13, 7:52 AM
Hi guyz,
  This is my suggestion for my question: 
     Just delete the __openerp__.py file and retype the code again, also restart the openerp server. This worked for me whenever I got this problem.

     Technically, the error occurs @ action window (found by checking the code by eclipse debugger).
2 Comments
sridhar India
5/31/13, 8:02 AM

Where is updated code...

Atchuthan India
5/31/13, 8:19 AM

<record model="ir.actions.act_window" id="action_rest_form"> <field name="name">rest</field> <field name="res_model">rest</field> </record>

1

The problem is here:

    'update_xml': [""],
    'demo_xml': [""],

 just specify the empty brackets:

 'update_xml': [],
'demo_xml': [],
0

{
'name':'Todo application',
'description':'ce module permet de gerer vos différentes taches.',
'author':'SORO',
'depends':['mail'],
'application':True,
'data':[

'todo_view.xml'
'security/todo_access_rules.xml'
'security/ir.model.access.csv'

]

}


0
Insemo.ch Switzerland
6/28/17, 10:07 AM

I solved this issue by:

1 - deleting all .pyc file in the folder

2 - restart postrgresql service

3 - restart openerp service

4 - upgrade module in Odoo interface

I' can't explain why it works, but... It works...

0
shiva India
10/17/16, 8:04 AM

check your File permission using chmod 777 -R file_name

0
sridhar India
5/22/13, 7:24 AM
Update this code:

    {
    'name': 'rest',
    'version': '1.0',
    'depends': ['base'],
    'author': 'author',
    'category': 'category',
    'description': """This module provide : test""",
    'update_xml': [],
    "data" : ['rest_view.xml'],
    'installable': True,
    'active': False,
}

rest_view.xml
<?xml version="1.0" encoding="UTF-8"?>
<openerp>
    <data>
               <record model="ir.ui.view" id="rest_form_view">
                <field name="name">rest.form</field>
                <field name="model">rest</field>
                <field name="type">form</field>
                <field name="arch" type="xml">
                    <form string="form_rest">
                        <field name="name" select="1"/>
                    </form>
                </field>
            </record>

            <act_window 
                name="rest_act"
                res_model="rest"
                src_model="rest"
                id="act_rest_id"/>
    <menuitem id="oone_id" name="oone" />
    <menuitem id="ttwo_id" name="ttwo" parent="oone_id" />
    <menuitem id="tthree_id" name="tthree" parent="ttwo_id" action="act_rest_id"/>

        </data>
</openerp>

rest.py
from openerp.osv import fields, osv



class rest(osv.osv):
    _name = 'rest'
    _columns = {
        'name':fields.char('Test',size=64),
    }
rest()

update this code it should be work.
18 Comments
Atchuthan India
5/22/13, 7:58 AM

Hi Sridhar, I have changed the code according to what u have given, then also the same error is coming...

sridhar India
5/22/13, 8:08 AM

update this __openerp__.py code

Atchuthan India
5/22/13, 8:42 AM

after updating :

2013-05-22 10:41:01,162 12660 ERROR today openerp.osv.orm: Can't find field 'name' in the following view parts composing the view of object model 'rest': * rest.form

Either you wrongly customized this view, or some modules bringing those views are not compatible with your current data model 2013-05-22 10:41:01,197 12660 ERROR today openerp.addons.base.ir.ir_ui_view: Can't render view for model: rest

Atchuthan India
5/22/13, 8:45 AM

When i tried your code before you modified your answer, I had the same error: IOError: File not found.

sridhar India
5/22/13, 8:57 AM

send ur mail id i send it here it is working perfectly, or, uninstall the module and try it will work.

sridhar India
5/22/13, 9:01 AM

in test_view.xml file go step by by step definitely it work. <openerp> <data> <record model="ir.ui.view" id="rest_form_view"> <field name="name">rest.form</field> <field name="model">rest</field> <field name="type">form</field> <field name="arch" type="xml"> <form string="form_rest"> <field name="name" select="1"/> </form> </field> </record> </data> </openerp> till run it. then,

sridhar India
5/22/13, 9:03 AM

<openerp> <data> <record model="ir.ui.view" id="rest_form_view"> <field name="name">rest.form</field> <field name="model">rest</field> <field name="type">form</field> <field name="arch" type="xml"> <form string="form_rest"> <field name="name" select="1"/> </form> </field> </record>

    &lt;act_window 
        name="rest_act"
        res_model="rest"
        src_model="rest"
        id="act_rest_id"/&gt;

</data> </openerp> till run here, it will install here, then the final step add the full file your menu will come there.

Atchuthan India
5/23/13, 3:30 AM

Now after editing,

TypeError: VARCHAR parameter should be an int, got <type 'set'> 2013-05-23 05:27:18,591 6144 ERROR zzz openerp.netsvc: VARCHAR parameter should be an int, got <type 'set'>

sridhar India
5/23/13, 4:13 AM

u replace your code and put it my code it will work sure.

Atchuthan India
5/24/13, 5:21 AM

I replaced to your code and its working fine, but there is no change in my code except change from "data" to "update_xml".

Atchuthan India
5/24/13, 5:21 AM

What was wrong in my files...?

sridhar India
5/24/13, 6:02 AM

__openerp__.py have some changes "" is changed to single ' ' , some indent error solved in rest.py file that it.

sridhar India
5/24/13, 6:03 AM

put right mark for this question..

Atchuthan India
5/27/13, 2:53 AM

We can use either " " or ' '. So what is the problem?

sridhar India
5/27/13, 5:00 AM

"data" : ["rest_view.xml"], 'update_xml': [""], that is the main problem for this error, use ' single course that is better for coding.

sridhar India
5/27/13, 6:59 AM

"data" : ["rest_view.xml"], 'update_xml': [""], its a syntax error that is the reason.

Atchuthan India
5/27/13, 7:20 AM

see this link in openerp documentation : https://doc.openerp.com/trunk/server/03_module_dev_01/#manifest-file-openerp-py

they have given that... we can use data instead of init_xml and update_xml...

Atchuthan India
5/27/13, 7:23 AM

i had made query regarding putting the view.xml file in init_xml and update_xml : http://help.openerp.com/question/17417/where-to-put-my-model_viewxml-in-initxml-or-updatexml/

Ask a Question
Writer
Tag
Keep Informed
2 follower(s)
About This Community

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

Register
Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now