Hi
I created a new module odoo 9 witch was correctly installed
but when i trayed to save new information it shows me this error
Odoo Server Error
Traceback (most recent call last): File "C:\Program Files\Odoo 9.0-20160413\server\.\openerp\http.py", line 643, in _handle_exception File "C:\Program Files\Odoo 9.0-20160413\server\.\openerp\http.py", line 680, in dispatch File "C:\Program Files\Odoo 9.0-20160413\server\.\openerp\http.py", line 316, in _call_function File "C:\Program Files\Odoo 9.0-20160413\server\.\openerp\service\model.py", line 118, in wrapper File "C:\Program Files\Odoo 9.0-20160413\server\.\openerp\http.py", line 309, in checked_call File "C:\Program Files\Odoo 9.0-20160413\server\.\openerp\http.py", line 959, in __call__ File "C:\Program Files\Odoo 9.0-20160413\server\.\openerp\http.py", line 509, in response_wrap File "C:\Program Files\Odoo 9.0-20160413\server\openerp\addons\web\controllers\main.py", line 892, in call_kw File "C:\Program Files\Odoo 9.0-20160413\server\openerp\addons\web\controllers\main.py", line 884, in _call_kw File "C:\Program Files\Odoo 9.0-20160413\server\.\openerp\api.py", line 250, in wrapper File "C:\Program Files\Odoo 9.0-20160413\server\.\openerp\api.py", line 354, in old_api File "C:\Program Files\Odoo 9.0-20160413\server\.\openerp\models.py", line 4150, in create File "C:\Program Files\Odoo 9.0-20160413\server\.\openerp\api.py", line 248, in wrapper File "C:\Program Files\Odoo 9.0-20160413\server\.\openerp\api.py", line 490, in new_api File "C:\Program Files\Odoo 9.0-20160413\server\.\openerp\models.py", line 4270, in _create File "C:\Program Files\Odoo 9.0-20160413\server\.\openerp\api.py", line 250, in wrapper File "C:\Program Files\Odoo 9.0-20160413\server\.\openerp\api.py", line 354, in old_api File "C:\Program Files\Odoo 9.0-20160413\server\.\openerp\models.py", line 2244, in _check_selection_field_value File "C:\Program Files\Odoo 9.0-20160413\server\.\openerp\fields.py", line 1529, in convert_to_cache ValueError: Wrong value for mon_module.cas_sexe: u'\u0630\u0643\u0631'
can you post your code ?
this is the code: # encoding: utf-8 from openerp.osv import osv, fields class monmodule(osv.osv): _name = 'mon_module' _columns = { 'cas_lastname':fields.char('الإسم', size=50, required=True, readonly=False), 'cas_firstname':fields.char('اللقب', size=50, required=True, readonly=False), 'cas_birthday':fields.date('تاريخ الولادة'), 'cas_lieunaiss':fields.char('مكان الولادة', size=50, required=False, readonly=False), 'cas_cin': fields.integer('رقم بطاقة التعريف الوطنية'), 'cas_lieu_cin':fields.char('مكان اصدارها', size=64, required=False, readonly=False), 'cas_datecin': fields.date('تاريخ اصدارها'), 'cas_photo':fields.binary('صورة', filters=None), 'cas_ref':fields.char('المعرف',size=50,required=True,readonly=False), 'cas_sexe':fields.Selection(selection=[('femme','أنثى'),('homme','ذكر')],'الجنس'), 'cas_pere_id':fields.many2one('mon_module', 'الأب', required=False), 'cas_mere_id':fields.many2one('mon_module', 'الأم', required=False), 'cas_telcontacts_ids':fields.one2many('mon_module.telcontacts', 'cas_id','قائمة الهواتف', required=False), 'cas_etatcivil_ids':fields.one2many('mon_module.etatcivile', 'cas_id', 'الحالة المدنية', required=False), 'cas_adr_ids':fields.one2many('mon_module.address', 'cas_id', 'عناوين الحالات', required=False), 'cas_boulot_ids':fields.one2many('mon_module.boulot', 'cas_id', 'الشغل', required=False), 'cas_visite_ids':fields.one2many('mon_module.visite', 'cas_id', 'الزيارات', required=False), 'cas_aide_ids':fields.one2many('mon_module.aide', 'cas_id', 'المساعدات', required=False), 'cas_logement_ids':fields.one2many('mon_module.logement', 'cas_id', 'المسكن', required=False), }
i think this ligne of code is the source of this error : 'cas_sexe':fields.Selection(selection=[('femme','أنثى'),('homme','ذكر') o],'الجنس'),