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

__openerp_.py file depends issue?

By
Vaibhav
on 9/11/13, 4:01 AM 2,748 views

I have created new module in which I wanted to extend Functionality of Recruitment module as per new requirements. So I have mentioned following details in __openerp__.py file. But it is giving me error while installing my newly created module. __openerp__.py file content:

          {
              "name"          : "XXX Application v 0.0",
               "version"      : "0.0",
              "author"        : "XXX Pvt.Ltd.",
               'website'      : 'http://www.xxx.co.in',
               "category"   : "Other",
               "depends"    : [ "base","hr","sale", "crm","account",'decimal_precision'],
               "init_xml"      : [],
               "demo_xml"      : [],
                "update_xml"    :  "security/security.xml",'security/ir.model.access.csv',"xxx_application_view.xml"],
                "installable"   : True,
                'auto_install'  : False,
                'description'   : """ """,
                'images'        : [],
                "active"        : True,
                }

I have tried with mentioning "hr_recruitment" and "hr_applicant" in depends but also it is showing error.

Error Message is :

     File "/home/fabian/openerp-7_default/openerp/osv/orm.py", line 874, in create_instance
     'You may need to add a dependency on the parent class\' module.' % (name, parent_name))
     TypeError: The model "hr.applicant" specifies an unexisting parent class "hr.applicant"
     You may need to add a dependency on the parent class' module.

give hr module in depends list and see whether there is any change. Thanks

Abhishek H Menon
on 9/11/13, 11:02 AM

I have already mentioned hr module in depends :(

Vaibhav
on 9/12/13, 3:29 AM

but you have given base in depends. no need to give that because hr module is parent of base module. So give hr only

Abhishek H Menon
on 9/13/13, 4:19 AM
2

Jagdish Panchal

--Jagdish Panchal--
2674
| 5 3 6
Gandhinagar, India
--Jagdish Panchal--

OpenERP Developer

Jagdish Panchal
On 9/11/13, 10:19 AM

Hello

You have error at

"update_xml" : "security/security.xml",'security/ir.model.access.csv',"xxx_application_view.xml"],

Replace with below

"update_xml" : [ "security/security.xml",'security/ir.model.access.csv',"xxx_application_view.xml"],

Thanks

good observation Jack that is typo mistake which I have done. I have corrected it but i faced same problem.

Vaibhav
on 9/12/13, 3:46 AM

Vaibhav, I think your not passing all module in depends part that you use..

Jagdish Panchal
on 9/12/13, 6:43 AM
1

Ahmed M.Elmubarak

--Ahmed M.Elmubarak--
2988
| 5 3 5
Sudan
--Ahmed M.Elmubarak--


Ahmed M.Elmubarak
On 9/11/13, 10:04 AM

Hello, I just copy and past your __openerp__.py ...

and I found that the update_xml key has not opening "[" so I added it, and change the names of fields inside it to be suitable with my own, and It works for me,

note: OpenERP 7 uses data instead of update_xml... [and actually all of them will work]

Regards...

it is working fine but when I was giving "hr_applicant" or "hr_recruitment" I got above error.

Vaibhav
on 9/12/13, 3:49 AM

For example in same file "depends" : [ "base","hr","sale", "crm","account",'decimal_precision',"h_recriutment"],

Vaibhav
on 9/12/13, 3:51 AM

the hr_recriutment already depends on hr , try to omit the "hr" from your depends , and check it again...

Ahmed M.Elmubarak
on 9/12/13, 4:44 AM

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

0 follower(s)

Stats

Asked: 9/11/13, 4:01 AM
Seen: 2748 times
Last updated: 3/16/15, 8:10 AM