跳至内容
菜单
此问题已终结
2 回复
2570 查看

Hi,

I would like to uppercase the city name displayed in the adress field of the contact widget. How can I do?

形象
丢弃
编写者 最佳答案

Got it. Overriding _display_address in res_partner works for me.

形象
丢弃
最佳答案

To uppercase, works perfectly.

city_name = fields.Char()


@api.onchange('city_name')

def caps_name(self):

    if self.city_name :

        self.city_name = str(self.city_name).upper()

形象
丢弃