Odoo - How to update xml views and fields in database through command line

2.2k views Asked by At

I have created custom modules and the changes are not reflecting. What is the command to update these modules.

2

There are 2 answers

3
sfx On BEST ANSWER

Please mention your module name in the script parameters followed by "-u".

Example: -u vendor_management

this will update your module form the command line

0
Phillip Stack On

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>