Hello!
I used the software "Dia" to develop a module with OpenERP and I had this error,
"TypeError: __init__() takes exactly 3 arguments (2 given)
" and I do not see why
Here is my code with python:
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
from osv import fields,osv
class Recrutement_ONAEA(osv.osv):
"""(NULL)"""
_name = 'Recrutement.ONAEA'
_columns = {
'Nom': fields.char('ONAEA',size="64"),
'Adresse': fields.char('1bp 251, 37 Chemain Bachir El Ibrahimi-El Biar',size="64",),
'NumTelephone': fields.char('021 92 13 03/04',size="64",,
'WilayaOffice': fields.one2many('Recrutement.Annexe','Wilaya','Office annexe'),
}
Recrutement_ONAEA()
class Recrutement_Annexe(osv.osv):
"""(NULL)"""
_name = 'Recrutement.Annexe'
_columns = {
'Adresse': fields.char(''),
'NumTelephone': fields.char(''),
'Wilaya': fields.many2one('Recrutement.ONAEA','Annexe Office'),
'WialayaCand': fields.one2many('Recrutement.Candidat','WilayaCandidat','Annexe candidat'),
}
Recrutement_Annexe()
class Recrutement_Candidat(osv.osv):
"""(NULL)"""
_name = 'Recrutement.Candidat'
_columns = {
'Nom': fields.char('Nom',size="10"),
'Prenom': fields.char('Prénom',size="20"),
'DateNaissance': fields.date(),
'WilayaCandidat': fields.many2one('Recrutement.Annexe','Candidat annexe'),
'Adresse': fields.text(),
'CodePostal': fields.char('NNNNN',size="5"),
'EMail': fields.char(),
'NumTel': fields.char(size="10"),
}
Recrutement_Candidat()
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
If someone can help me I would be very grateful.
Thank you in advance.