Hello,
I created a new many2one field in res.partner (inherited):
Py file:
city = fields.Many2one('res.country.state.city', "Department")
XML View:
<field name="city" options="{'no_open': True}" placeholder="Cuidad" attrs="{'readonly':[('change_country', '=', False)], 'invisible':[('state_id', '=', False)]}" />
As you see I am trying to modify / extend the address in res.partner.
In my module res.partner it looks very good, so the city is shown correctly (e.g. "New York")
When I open another module where the address is used, e.g. state.order, the variable city is not shown correctly as the type of the field changed from Char to many2one. Instead of showing the city, I get this value in sale.order:
res.country.state.city(820,) 63
Obviously I want to see the city and not some numbers :-). I assume that any other module is trying to read the variable as a Char, but the type changed to many2one.
Any ideas on how to solve this issue? Is there a way to transform values of many2one filed to simple text / char?