i'm creating a moudle in odoo 11 and i wanna use many2one as selection field , the problem is on the of the city'ville en francais' the dropdown works and it saves the id of the city(from database) but the name is like obj.ville,1(it shows the name of the module, id instead of the name of the city in database)
Code:
from odoo import models, fields, api
Class villeMO(models.Model):
_name = 'ville.mo'
ville = fields.Char(string="ville",required=True)
Class paya(models. Model):
_name='paya.mo'
city = fields.Many2one('ville.mo',ondelete="cascade",string="city")