我正在创建一个简单的服务器操作,它只打印一个简单的测试,但是当我运行代码时,我收到以下错误
odoo.tools.convert.ParseError: "null value in column "activity_user_type" violates not-null constraint
DETAIL: Failing row contains (617, Confirm, ir.actions.server, null, 552, action, 1, 2020-10-24 02:50:49.149867, 1, 2020-10-24 02:50:49.149867, ir_actions_server, code, 5, 552, null, action = model.print_test(), null, null, null, null, null, null, null, null, null, null, null).
" while parsing /home/odoo/odoo12/project1/bearings_module/views/shortfall.xml:52, near
代码
<record id="model_custom_shortfall_action_confirm" model="ir.actions.server">
<field name="name">Confirm</field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="bearings_module.model_custom_shortfall"/>
<field name="binding_model_id" ref="bearings_module.model_custom_shortfall"/>
<field name="state">code</field>
<field name="code">action = model.print_test()</field>
</record>
def print_test(self):
print("Test")
qq_笑_17
相关分类