Trợ giúp


xml Error

Moath Hasan

i try to use odoo 14

i put  function in the data file using @api.model to create some records before start using my customer app

but i get this error :: while parsing file:/c:/users/dell/desktop/odoo14/extra_addons/tools/data/data_tool.xml:4, near
<function model="tools.tool" name="add_tooling"/>

 xml code::

<?xml version="1.0" encoding="UTF-8"?>
<function model="tools.tool" name="add_tooling"/>
Ảnh đại diện
Huỷ bỏ
1 Trả lời
Best Answer

If you want to run a function or perform any actions before installing a module or after installation or uninstalling a module you can use hooks. In your case you are trying to call a function after installation, do you can use post_init_hook.

This blog will help you to understand about hooks


Ảnh đại diện
Huỷ bỏ