📜  odoo.py odoo 14 - 任何代码示例

📅  最后修改于: 2022-03-11 14:59:16.090000             🧑  作者: Mango

代码示例9
@api.model
def create(self, values):
    if 'name' in values:
        values['name'] = unidecode(values['name'])
    return super(my_module, self).create(values)

def write(self, values):
    if 'name' in values:
        values['name'] = unidecode(values['name'])
    return super(my_module, self).write(values)