I am using openerp 6.1.1 and trying to create an applicant from thunderbird addon.
I have created a custom module to add some extra fields to the hr_applicant model.
The thunderbird OpenERP addon does not show the option to create an Applicant.
When I remove the custom module, I am able to see the option in the thunderibird add on.
I am not clear what am I doing wrong in the custom module:
class hr_applicant_custom (osv.osv):
_name = 'hr.applicant'
_inherit = 'hr.applicant'
_columns = {
'year_passing': fields.integer('Passing Year', help='Year of passing'),
'experience': fields.float('Experience', digits=(3,1)),
}
hr_applicant_custom()
Please advice. Thanks in advance.
In Thunderbird, module you can see the model which are inheriting the model
mail.threadfor this behavior reposnsible method ismessage_capable_models, Which will filter model which are inheriting the modelmail.threadIn your case if you see closely in code of the module
hr_recruitmentyou will findhr.applicantmodel is inheriting themail.thread, so you will see it under TB Push Mai list, now in your module what you are doing is modifying the_inheritattribute of the modelhr.applicantso due to python MRO this will be change to new class and now this model is not eligible for creating new record.Solution : you should try multiple model in
_inheritlikeinherit = ['mail.thread', 'hr.applicant']Hope this will help.