Skip to Content
Menu
This question has been flagged
1 Reply
942 Views

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

Avatar
Discard
Best Answer

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

Avatar
Discard