I am using odoo 14. I created a custom addon. in my addon there is a model below
class Merchant(models.Model):
_name = "ecommece_advance.merchant"
name = fields.Char( required=True)
email = fields.Char(required=True)
address = fields.Char()
website = fields.Char()
latitude = fields.Float(digits=(3,6))
longitude = fields.Float(digits=(3,6))
contact = fields.Char(required=True)
alternative_contact = fields.Char()
market_id = fields.Many2one('ecommece_advance.market',
ondelete='cascade', string="Market", required=True)
I created a web controller for external use and return a list of merchant data. Odoo says my model is not serializable to return from the controller. I find no way to serialize my model. please help me out. thanks in advance.
below sample solution is not accepted --- *return data from the model by creating JSON *get data and create JSON in the controller