تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
4535 أدوات العرض

Following is the python code of class, All I have done is created many2one fields with ** fleet.vehicle **. There are some other fields too but those working fine records is being saved. But as soon as I click this one error pops out.

class FleetRequest (models.Model):

         _name = 'fleet.request'

         _rec_name = 'seq_name' 

         requested_model = fields.Many2one ('fleet.vehicle', string = 'Vehicle')         

When I click on it from front-end it gives following error:

  File "C: \ Users \ User \ AppData \ Roaming \ Python \ Python37 \ site-packages \ psycopg2 \ extensions.py", line 120, in getquoted 
    pobjs = [adapt (o) for o in self._seq] 
  File "C: \ Users \ User \ AppData \ Roaming \ Python \ Python37 \ site-packages \ psycopg2 \ extensions.py", line 120, in 
    pobjs = [adapt (o) for o in self._seq] 
Exception 
The above exception was the direct cause of the following exception: 
Traceback (most recent call last):


  File "D: \ Odoo \ odoo-14.0 \ odoo \ http.py", line 638, in _handle_exception 
    return super (JsonRequest, self) ._ handle_exception (exception) 
  File "D: \ Odoo \ odoo-14.0 \ odoo \ http.py", line 314, in _handle_exception 
    raise exception.with_traceback (None) from new_cause
psycopg2.ProgrammingError: can't adapt type 'lazy'
الصورة الرمزية
إهمال
أفضل إجابة

Hi. I´m using Odoo 14 and I get the same error when trying to use fleet_vehicle. Did you finally find the solution?

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
يوليو 25
2216
2
يوليو 25
7708
2
يوليو 25
4128
2
يوليو 25
3878
2
يونيو 25
2489