{"id":83422,"date":"2017-05-11T17:01:52","date_gmt":"2017-05-11T17:01:52","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=83422"},"modified":"2025-02-05T08:40:39","modified_gmt":"2025-02-05T08:40:39","slug":"install-module-programmatically-odoo","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/","title":{"rendered":"Install Module Programmatically in Odoo"},"content":{"rendered":"<p>If you want to install <a href=\"https:\/\/store.webkul.com\/Odoo.html\" target=\"_blank\" rel=\"noopener\">Odoo modules<\/a> without using user interface or via terminal then this blog will help you to install module programmatically.<\/p>\n<p>There have multiple ways to install module in Odoo. You can install module via commands or programmatically as well. Programmatically\u00a0you can install module using below ways.<\/p>\n<ul>\n<li>Install module during database creation.<\/li>\n<li>Install module by clicking on button or any action.<\/li>\n<\/ul>\n<div class=\"panel panel-success\">\n<div class=\"panel-heading\">\n<div>\n<h3 class=\"panel-title\">Install module on\u00a0database creation<\/h3>\n<\/div>\n<\/div>\n<div class=\"panel-body\">\n<div>\n<p>In order to install module during database creation simply add below tag in &#8220;<strong><span style=\"color: #cc99ff;\">__manifest__.py<\/span><\/strong>&#8221; file or\u00a0if Odoo version older than 10.0 then add below tag inside &#8220;<strong><span style=\"color: #cc99ff;\">__openerp__.py<\/span><\/strong>&#8220;.<\/p>\n<pre class=\"brush:py\">{\n'auto_install': True,\n}<\/pre>\n<p>Make this tag <strong>&#8220;true&#8221;\u00a0<\/strong>in order to install module during database creation.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"panel panel-success\">\n<div class=\"panel-heading\">\n<div>\n<h3 class=\"panel-title\">Install module by clicking on button or any action<\/h3>\n<\/div>\n<\/div>\n<div class=\"panel-body\">\n<div>\n<p>In order to install module during any action or button click use below code.<\/p>\n<pre class=\"brush:py\">irModuleObj = self.env['ir.module.module']\nirModuleObj.update_list()\nmoduleIds = irModuleObj.search(\n                               [\n                                ('state', '!=', 'installed'),\n                                ('name', '=', 'technical name of module')\n                               ]\n                              )\nif moduleIds:\n   moduleIds[0].button_immediate_install()<\/pre>\n<p>Above code will help to install module programmatically.<\/p>\n<ul>\n<li><strong>update_list()<\/strong>: This method helps to update module list reason why this method should use before installation because if any new module is placed on server then without running this method that module will not come on module list.<\/li>\n<li><strong>moduleIds:\u00a0<\/strong>In this line we check module is currently installed or not.<\/li>\n<li><strong>button_immediate_install():\u00a0<\/strong>This method helps to install module of given id.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>If you want to install Odoo modules without using user interface or via terminal then this blog will help you to install module programmatically. There have multiple ways to install module in Odoo. You can install module via commands or programmatically as well. Programmatically\u00a0you can install module using below ways. Install module during database creation. <a href=\"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":90,"featured_media":45511,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2007],"tags":[2997,2059,1267,590],"class_list":["post-83422","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-odoo","tag-install","tag-module","tag-odoo","tag-webkul"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Install Module Programmatically in Odoo<\/title>\n<meta name=\"description\" content=\"If you want to install Odoo modules without using user interface or via terminal then this blog will help you to install module programmatically.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Install Module Programmatically in Odoo\" \/>\n<meta property=\"og:description\" content=\"If you want to install Odoo modules without using user interface or via terminal then this blog will help you to install module programmatically.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/\" \/>\n<meta property=\"og:site_name\" content=\"Webkul Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webkul\/\" \/>\n<meta property=\"article:published_time\" content=\"2017-05-11T17:01:52+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-05T08:40:39+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Odoo-Code-Snippet-banner.png\" \/>\n\t<meta property=\"og:image:width\" content=\"825\" \/>\n\t<meta property=\"og:image:height\" content=\"260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ashish Singh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@webkul\" \/>\n<meta name=\"twitter:site\" content=\"@webkul\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ashish Singh\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/\"},\"author\":{\"name\":\"Ashish Singh\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/3b92c698256ce0bcb9613acf8bbf5b2d\"},\"headline\":\"Install Module Programmatically in Odoo\",\"datePublished\":\"2017-05-11T17:01:52+00:00\",\"dateModified\":\"2025-02-05T08:40:39+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/\"},\"wordCount\":210,\"commentCount\":2,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Odoo-Code-Snippet-banner.png\",\"keywords\":[\"install\",\"module\",\"odoo\",\"webkul\"],\"articleSection\":[\"Odoo\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/\",\"url\":\"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/\",\"name\":\"Install Module Programmatically in Odoo\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Odoo-Code-Snippet-banner.png\",\"datePublished\":\"2017-05-11T17:01:52+00:00\",\"dateModified\":\"2025-02-05T08:40:39+00:00\",\"description\":\"If you want to install Odoo modules without using user interface or via terminal then this blog will help you to install module programmatically.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Odoo-Code-Snippet-banner.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Odoo-Code-Snippet-banner.png\",\"width\":825,\"height\":260},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Install Module Programmatically in Odoo\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/webkul.com\/blog\/#website\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"name\":\"Webkul Blog\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/webkul.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/webkul.com\/blog\/#organization\",\"name\":\"WebKul Software Private Limited\",\"url\":\"https:\/\/webkul.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png\",\"width\":380,\"height\":380,\"caption\":\"WebKul Software Private Limited\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webkul\/\",\"https:\/\/x.com\/webkul\",\"https:\/\/www.instagram.com\/webkul\/\",\"https:\/\/www.linkedin.com\/company\/webkul\",\"https:\/\/www.youtube.com\/user\/webkul\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/3b92c698256ce0bcb9613acf8bbf5b2d\",\"name\":\"Ashish Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ef2c82640f6054d8a8cfca9e3edd7edaf800ff1873b6d103c7bbf0b47dfefc1e?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ef2c82640f6054d8a8cfca9e3edd7edaf800ff1873b6d103c7bbf0b47dfefc1e?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Ashish Singh\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/ashish067\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Install Module Programmatically in Odoo","description":"If you want to install Odoo modules without using user interface or via terminal then this blog will help you to install module programmatically.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/","og_locale":"en_US","og_type":"article","og_title":"Install Module Programmatically in Odoo","og_description":"If you want to install Odoo modules without using user interface or via terminal then this blog will help you to install module programmatically.","og_url":"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2017-05-11T17:01:52+00:00","article_modified_time":"2025-02-05T08:40:39+00:00","og_image":[{"width":825,"height":260,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Odoo-Code-Snippet-banner.png","type":"image\/png"}],"author":"Ashish Singh","twitter_card":"summary_large_image","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Ashish Singh","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/"},"author":{"name":"Ashish Singh","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/3b92c698256ce0bcb9613acf8bbf5b2d"},"headline":"Install Module Programmatically in Odoo","datePublished":"2017-05-11T17:01:52+00:00","dateModified":"2025-02-05T08:40:39+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/"},"wordCount":210,"commentCount":2,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Odoo-Code-Snippet-banner.png","keywords":["install","module","odoo","webkul"],"articleSection":["Odoo"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/","url":"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/","name":"Install Module Programmatically in Odoo","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Odoo-Code-Snippet-banner.png","datePublished":"2017-05-11T17:01:52+00:00","dateModified":"2025-02-05T08:40:39+00:00","description":"If you want to install Odoo modules without using user interface or via terminal then this blog will help you to install module programmatically.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Odoo-Code-Snippet-banner.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2016\/04\/Odoo-Code-Snippet-banner.png","width":825,"height":260},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/install-module-programmatically-odoo\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Install Module Programmatically in Odoo"}]},{"@type":"WebSite","@id":"https:\/\/webkul.com\/blog\/#website","url":"https:\/\/webkul.com\/blog\/","name":"Webkul Blog","description":"","publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/webkul.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/webkul.com\/blog\/#organization","name":"WebKul Software Private Limited","url":"https:\/\/webkul.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-logo-accent-sq.png","width":380,"height":380,"caption":"WebKul Software Private Limited"},"image":{"@id":"https:\/\/webkul.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webkul\/","https:\/\/x.com\/webkul","https:\/\/www.instagram.com\/webkul\/","https:\/\/www.linkedin.com\/company\/webkul","https:\/\/www.youtube.com\/user\/webkul\/"]},{"@type":"Person","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/3b92c698256ce0bcb9613acf8bbf5b2d","name":"Ashish Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ef2c82640f6054d8a8cfca9e3edd7edaf800ff1873b6d103c7bbf0b47dfefc1e?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ef2c82640f6054d8a8cfca9e3edd7edaf800ff1873b6d103c7bbf0b47dfefc1e?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Ashish Singh"},"url":"https:\/\/webkul.com\/blog\/author\/ashish067\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/83422","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/users\/90"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=83422"}],"version-history":[{"count":6,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/83422\/revisions"}],"predecessor-version":[{"id":482467,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/83422\/revisions\/482467"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media\/45511"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=83422"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=83422"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=83422"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}