跳至內容
選單
此問題已被標幟
1 回覆
1334 瀏覽次數

this is my model

name = fields.Char(string='Nama Pasien', required=True, translate=True, tracking=True)
age = fields.Integer(string='Umur', required=True, translate=True, tracking=True)
gender = fields.Selection([
('laki-laki', 'Laki-laki'),
('perempuan', 'Perempuan'),
],string='Jenis Kelamin', required=True, translate=True, tracking=True)


this is error

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "D:\odoo15\server\odoo\http.py", line 643, in _handle_exception
    return super(JsonRequest, self)._handle_exception(exception)
  File "D:\odoo15\server\odoo\http.py", line 301, in _handle_exception
    raise exception.with_traceback(None) from new_cause
psycopg2.errors.DatatypeMismatch: COALESCE types text and integer cannot be matched

this hapen when after submitting the data then odoo want to display the data in view form

how to solve this please

頭像
捨棄
最佳答案

Hi,

Could you remove the translate attribute from the age field and see if the issue will get resolved or not.

Remove translate=True from age, restart the service and upgrade the module.


Thanks & Regards
Walnut Software Solution

頭像
捨棄