0

我已经创建了自定义模块,并且更改没有反映出来。更新这些模块的命令是什么。

4

2 回答 2

0

When adding a custom addon a couple of things are necessary to have Odoo realise the changes in an addon or become alerted to the presence of a new addon.

Easiest way. Restart the server. Go to the apps section search for your app. Select it and update.

If you are really wanting a command line method. You can use erppeek and execute the following as admin.

model('ir.module.module').update_list()
client.upgrade('your_addon')

Or in an odoo shell you can execute.

env['ir.module.module'].update_list()
env['ir.module.module'].search([('name','=','your_addon')]).button_immediate_upgrade()

Or when starting your server you can append -u to upgrade and addon at start up.

Odoo8 / Odoo9 Example

./odoo.py -d <your_db_name> -c <your_config_path> -u <your_addon>

Odoo10 Example

./odoo-bin -d <your_db_name> -c <your_config_path> -u <your_addon>
于 2017-01-06T04:44:04.950 回答
0

请在脚本参数中提及您的模块名称,后跟“-u”。

例子:-u vendor_management

这将从命令行更新您的模块

于 2017-01-06T05:18:42.307 回答