我在Odoo 10上,我想在函数create中检索字段的值,以便在执行此函数时复制它。这是我的代码:
@api.multi
def button_for_run_update(self, vals):
vals = {'test': "Test numéro 1", 'test2': 'Test numéro 2'}
res = self.env['test.test'].create(vals)
return vals
示例:我想从字段中获取先前的值并将其添加到新值。 怎么做 ?谢谢
@api.multi
def button_for_run_update(self, vals):
vals = {'test': "what to put here?", 'test2': 'Test numéro 2'}
res = self.env['test.test'].create(vals)
return vals