Odoo.py Odoo 14
$ git push https HEAD:feature-1
Gorgeous Gaur
$ git push https HEAD:feature-1
start_datetime = fields.Datetime('Start time', default=lambda self: fields.Datetime.now())
unidecode
'version': '0.2',
$ git add requirements.txt
$ git add my_module
$ git commit -m "[IMP] my_module: automatically remove special chars in my_module.my_module name field"
$ git push
@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)
from odoo import models, fields, api
'version': '0.3',