{"id":409688,"date":"2023-11-15T05:12:05","date_gmt":"2023-11-15T05:12:05","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=409688"},"modified":"2023-11-15T05:12:12","modified_gmt":"2023-11-15T05:12:12","slug":"database-population-using-odoo-cli","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/","title":{"rendered":"Database Population using ODOO CLI"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"1200\" height=\"675\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/database-population-using-odoo-cli.png\" alt=\"database-population-using-odoo-cli\" class=\"wp-image-411546\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/database-population-using-odoo-cli.png 1200w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/database-population-using-odoo-cli-300x169.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/database-population-using-odoo-cli-250x141.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/database-population-using-odoo-cli-768x432.png 768w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p>Odoo CLI supports Database Population.<\/p>\n\n\n\n<p>This article gives an overview of how we can work with the Database Population in Odoo as a developer.<\/p>\n\n\n\n<p>Before starting this tutorial, you should have a basic idea of CLI in Odoo. Besides, If you don\u2019t have basic knowledge of Odoo CLI, read a beginner guide to <a href=\"https:\/\/webkul.com\/blog\/beginner-guide-odoo-clicommand-line-interface\/\" target=\"_blank\" rel=\"noreferrer noopener\">Odoo CLI<\/a><strong>.<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Why do we need a Database Population in Odoo CLI?<\/strong><\/h2>\n\n\n\n<p>You can test your modules in the database by automatic data generation of the model\u2019s records<\/p>\n\n\n\n<p>Before moving ahead, check out our&nbsp;<a href=\"https:\/\/webkul.com\/odoo-development\/\" target=\"_blank\" rel=\"noreferrer noopener\">Odoo development<\/a>&nbsp;services &amp; an extensive range of quality&nbsp;<a href=\"https:\/\/store.webkul.com\/Odoo.html\" target=\"_blank\" rel=\"noreferrer noopener\">Odoo Apps<\/a><em>.<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>How does Database Population work in Odoo CLI?<\/strong><\/h2>\n\n\n\n<p><strong>Syntax<\/strong>:-<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">odoo-bin populate \u2013-models product.category,product.template \u2013-size small -d demo \u2013-db_user odoo --db_password=webkul<\/pre>\n\n\n\n<p><strong>Output for upper command<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"800\" height=\"200\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/database-population-code.png\" alt=\"database-population-code\" class=\"wp-image-411544\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/database-population-code.png 800w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/database-population-code-300x75.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/database-population-code-250x63.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/database-population-code-768x192.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"800\" height=\"400\" src=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/populated-database-odoo.png\" alt=\"populated-database-odoo\" class=\"wp-image-411545\" srcset=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/populated-database-odoo.png 800w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/populated-database-odoo-300x150.png 300w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/populated-database-odoo-250x125.png 250w, https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/populated-database-odoo-768x384.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" loading=\"lazy\" \/><\/figure>\n\n\n\n<p><strong>Parameters<\/strong>:-<\/p>\n\n\n\n<p><strong>&#8211; -models<\/strong><\/p>\n\n\n\n<p>list of models for which the database should be filled.<\/p>\n\n\n\n<p><strong>&#8211; -size(small | medium | large)<\/strong><\/p>\n\n\n\n<p>The total number of the records to be created is depends on the model\u2019s <strong>populate_size<\/strong> attribute<\/p>\n\n\n\n<p>The generated records content is specified by the <strong>_populate_factories()<\/strong> method of a given model.<\/p>\n\n\n\n<p><strong>-d<\/strong><\/p>\n\n\n\n<p>Name of the db<\/p>\n\n\n\n<p><strong>&#8211;db_user<\/strong><\/p>\n\n\n\n<p>Name of the DB User<\/p>\n\n\n\n<p><strong>&#8211;db_password<\/strong><\/p>\n\n\n\n<p>Password for the DB User<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Implement <strong>Features on a Given Model<\/strong><\/h2>\n\n\n\n<p><strong>Define the following methods and attributes to populate a given model:-<\/strong><\/p>\n\n\n\n<p><strong>i)<\/strong> <strong>Model._populate_sizes<\/strong><\/p>\n\n\n\n<p>The default population sizes are:<\/p>\n\n\n\n<p>Small: 10<\/p>\n\n\n\n<p>Medium: 100<\/p>\n\n\n\n<p>Large: 1000<\/p>\n\n\n\n<p>populate sizes are the number of records that <strong>_populate()<\/strong> should create.<\/p>\n\n\n\n<p><strong>ii)<\/strong> <strong>Model._populate_dependencies<\/strong><\/p>\n\n\n\n<p>Return the list of models which have to be populated before the current one.<\/p>\n\n\n\n<p><strong>iii)<\/strong> <strong>Model._populate(size)<\/strong><\/p>\n\n\n\n<p>Create records to populate this model.<\/p>\n\n\n\n<p><strong>iv) Model._populate_factories()<\/strong><\/p>\n\n\n\n<p>Generates a factory for the different fields of the model.<\/p>\n\n\n\n<p><code>factory<\/code>&nbsp;is a generator of values (dict of field values).<\/p>\n\n\n\n<p>Factory skeleton:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">def generator(iterator, field_name, model_name):\n    for counter, values in enumerate(iterator):\n        # values.update(dict())\n        yield values<\/pre>\n\n\n\n<p><strong>Note<\/strong>*: You have to define at least<strong> _populate()<\/strong> or <strong>_populate_factories()<\/strong> on the model to enable database population.<\/p>\n\n\n\n<p><strong>Example:<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\">from odoo.tools import populate\n\nclass WebkulModel(models.Model)\n    _inherit = &quot;webkul.some_model&quot;\n    _populate_sizes = {&quot;small&quot;: 100, &quot;medium&quot;: 2000, &quot;large&quot;: 10000}\n    _populate_dependencies = &#091;&quot;webkul.some_other_model&quot;]\n\n    def _populate_factories(self):\n        # Record ids of previously populated models are accessible in the registry\n        some_other_ids = self.env.registry.populated_models&#091;&quot;webkul.some_other_model&quot;]\n\n        def get_some_field(values=None, random=None, **kwargs):\n            &quot;&quot;&quot; Choose a value for some_field depending on other fields values.\n\n            :param dict values:\n            :param random: seeded :class:`random.Random` object\n            &quot;&quot;&quot;\n            field_1 = values&#091;&#039;field_1&#039;]\n            if field_1 in &#091;value2, value3]:\n                return random.choice(some_field_values)\n            return False\n\n        return &#091;\n            (&quot;field_1&quot;, populate.randomize(&#091;value1, value2, value3])),\n            (&quot;field_2&quot;, populate.randomize(&#091;value_a, value_b], &#091;0.5, 0.5])),\n            (&quot;some_other_id&quot;, populate.randomize(some_other_ids)),\n            (&quot;some_field&quot;, populate.compute(get_some_field, seed=&quot;some_field&quot;)),\n            (&#039;active&#039;, populate.cartesian(&#091;True, False])),\n        ]\n\n    def _populate(self, size):\n        records = super()._populate(size)\n\n        # If you want to update the generated records\n        # E.g setting the parent-child relationships\n        records.do_something()\n\n        return records<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Population Tools<\/strong><\/h3>\n\n\n\n<p>Multiple population tools are available to easily create the needed data generators.<\/p>\n\n\n\n<p><strong>i) odoo.tools.populate.cartesian(vals, weights=None, seed=False, formatter=&lt;function format_str&gt;, then=None)<\/strong><\/p>\n\n\n\n<p>Return a factory for an iterator of values dicts that combines all&nbsp;<code>vals<\/code>&nbsp;for the field with the other field values in input.<\/p>\n\n\n\n<p><strong><em>Parameters<\/em><\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>vals<\/strong>&nbsp;(<em>list<\/em>) \u2013 list in which a value will be chosen, depending on&nbsp;<code>weights<\/code><\/li>\n\n\n\n<li><strong>weights<\/strong>&nbsp;(<em>list<\/em>) \u2013 list of probabilistic weights<\/li>\n\n\n\n<li><strong>seed<\/strong>&nbsp;\u2013 optional initialization of the random number generator<\/li>\n\n\n\n<li><strong>formatter<\/strong>&nbsp;(<em>function<\/em>) \u2013 (val, counter, values) \u2013&gt; formatted_value<\/li>\n\n\n\n<li><strong>then<\/strong>&nbsp;(<em>function<\/em>) \u2013 if defined, factory used when vals has been consumed.<\/li>\n<\/ul>\n\n\n\n<p><strong><em>Returns<\/em><\/strong>: function of the form (iterator, field_name, model_name) -&gt; values<\/p>\n\n\n\n<p><strong><em>Return type<\/em><\/strong>: function (iterator,&nbsp;str,&nbsp;str) -&gt; dict<\/p>\n\n\n\n<p><strong>ii) odoo.tools.populate.compute(function, seed=None)<\/strong><\/p>\n\n\n\n<p>Return a factory for an iterator of values dictionary (dicts) that computes the field value as&nbsp;a function (values,&nbsp;counter,&nbsp;random), where&nbsp;values&nbsp;are the other field value,&nbsp;counter is an integer, and&nbsp;<code>random<\/code>&nbsp;is a pseudo-random number generator.<\/p>\n\n\n\n<p><strong><em>Parameters<\/em><\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>function<\/strong>&nbsp;(<em>callable<\/em>) \u2013 (values, counter, random) \u2013&gt; field_values<\/li>\n\n\n\n<li><strong>seed<\/strong>&nbsp;\u2013 optional initialization of the random number generator<\/li>\n<\/ul>\n\n\n\n<p><strong><em>Returns<\/em><\/strong>: function of the form (iterator, field_name, model_name) -&gt; values<\/p>\n\n\n\n<p><strong><em>Return type:<\/em><\/strong> function (iterator,&nbsp;str,&nbsp;str) -&gt; dict<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>iii) odoo.tools.populate.constant(val, formatter=&lt;function format_str&gt;)<\/strong><\/p>\n\n\n\n<p>Return a factory for an iterator of values dicts that sets the field to the given value in each input dict.<\/p>\n\n\n\n<p><strong><em>Returns<\/em><\/strong>: function of the form (iterator, field_name, model_name) -&gt; values<\/p>\n\n\n\n<p><strong><em>Return type<\/em><\/strong>: function (iterator,&nbsp;str,&nbsp;str) -&gt; dict<\/p>\n\n\n\n<p><strong>iv) odoo.tools.populate.iterate(vals, weights=None, seed=False, formatter=&lt;function format_str&gt;, then=None)<\/strong>.<\/p>\n\n\n\n<p>Return a factory for an iterator of values dicts that picks a value among&nbsp;<code>vals<\/code>&nbsp;for each input. Once all&nbsp;<code>vals<\/code>&nbsp;have been used once, resume as&nbsp;<code>then<\/code>&nbsp;or as a&nbsp;<code>randomize<\/code>&nbsp;generator.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Parameters:<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>vals<\/strong>&nbsp;(<em>list<\/em>) \u2013 list in which a value will be chosen, depending on&nbsp;<code>weights<\/code><\/li>\n\n\n\n<li><strong>weights<\/strong>&nbsp;(<em>list<\/em>) \u2013 list of probabilistic weights<\/li>\n\n\n\n<li><strong>seed<\/strong>&nbsp;\u2013 optional initialization of the random number generator<\/li>\n\n\n\n<li><strong>formatter<\/strong>&nbsp;(<em>function<\/em>) \u2013 (val, counter, values) \u2013&gt; formatted_value<\/li>\n\n\n\n<li><strong>then<\/strong>&nbsp;(<em>function<\/em>) \u2013 if defined, factory used when vals has been consumed.<\/li>\n<\/ul>\n\n\n\n<p><strong><em>Returns<\/em><\/strong>: function of the form (iterator, field_name, model_name) -&gt; values<\/p>\n\n\n\n<p><strong><em>Return type<\/em><\/strong>: function (iterator,&nbsp;str,&nbsp;str) -&gt; dict<\/p>\n\n\n\n<p><strong>v) odoo.tools.populate.randint(a, b, seed=None)<\/strong><\/p>\n\n\n\n<p>Return a factory for an iterator of values dicts that sets the field to a random integer between a and b included in each input dict.<\/p>\n\n\n\n<p><strong>Parameters<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>a<\/strong>&nbsp;(<em>int<\/em>) \u2013 minimal random value<\/li>\n\n\n\n<li><strong>b<\/strong>&nbsp;(<em>int<\/em>) \u2013 maximal random value<\/li>\n\n\n\n<li><strong>seed<\/strong>&nbsp;(int) \u2013<\/li>\n<\/ul>\n\n\n\n<p><strong><em>Returns<\/em><\/strong>: function of the form (iterator, field_name, model_name) -&gt; values<\/p>\n\n\n\n<p><strong><em>Return type<\/em><\/strong>: function (iterator,&nbsp;str,&nbsp;str) -&gt; dict<\/p>\n\n\n\n<p><strong>vi) odoo.tools.populate.randomize(vals, weights=None, seed=False, formatter=&lt;function format_str&gt;, counter_offset=0)<\/strong><\/p>\n\n\n\n<p>Return a factory for an iterator of values dicts with pseudo-randomly chosen values (among&nbsp;<code>vals<\/code>) for a field.<\/p>\n\n\n\n<p><strong><em>Parameters<\/em><\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>vals<\/strong>&nbsp;(<em>list<\/em>) \u2013 list in which a value will be chosen, depending on&nbsp;<code>weights<\/code><\/li>\n\n\n\n<li><strong>weights<\/strong>&nbsp;(<em>list<\/em>) \u2013 list of probabilistic weights<\/li>\n\n\n\n<li><strong>seed<\/strong>&nbsp;\u2013 optional initialization of the random number generator<\/li>\n\n\n\n<li><strong>formatter<\/strong>&nbsp;(<em>function<\/em>) \u2013 (val, counter, values) \u2013&gt; formatted_value<\/li>\n\n\n\n<li><strong>counter_offset<\/strong>&nbsp;(<em>int<\/em>) \u2013<\/li>\n<\/ul>\n\n\n\n<p><strong><em>Returns:<\/em><\/strong> function of the form (iterator, field_name, model_name) -&gt; values<\/p>\n\n\n\n<p><strong><em>Return type<\/em><\/strong>: function (iterator,&nbsp;str,&nbsp;str) -&gt; dict<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>NEED HELP?<\/strong><\/h2>\n\n\n\n<p>Hope you find the guide helpful! Please feel free to share your feedback in the comments below.<\/p>\n\n\n\n<p>If you still have any issues\/queries regarding the same, please raise a ticket at the&nbsp;<a href=\"https:\/\/webkul.uvdesk.com\/en\/customer\/create-ticket\/\" target=\"_blank\" rel=\"noreferrer noopener\">UV Desk<\/a>.<\/p>\n\n\n\n<p>For any doubt, contact us at our&nbsp;<a href=\"mailto:support@webkul.com\" target=\"_blank\" rel=\"noreferrer noopener\">support mail<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Odoo CLI supports Database Population. This article gives an overview of how we can work with the Database Population in Odoo as a developer. Before starting this tutorial, you should have a basic idea of CLI in Odoo. Besides, If you don\u2019t have basic knowledge of Odoo CLI, read a beginner guide to Odoo CLI. <a href=\"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":576,"featured_media":411546,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[6464,15025,15141,15140,1267,13605,3651],"class_list":["post-409688","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-cli","tag-command-line-interface","tag-database-population","tag-database-population-using-odoo-cli","tag-odoo","tag-odoo-app","tag-odoo-cli"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Database Population using ODOO CLI - Webkul Blog | Odoo CLI<\/title>\n<meta name=\"description\" content=\"Database Population using Odoo CLI allows implementing database population on given model to automate data generation of the model&#039;s records.\" \/>\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\/database-population-using-odoo-cli\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Database Population Using Odoo CLI\" \/>\n<meta property=\"og:description\" content=\"Database Population helps to fill a database on demand with the necessary test data number.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/\" \/>\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=\"2023-11-15T05:12:05+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-15T05:12:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/database-population-using-odoo-cli.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"675\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Vijyant Patel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:title\" content=\"Database Population Using Odoo CLI\" \/>\n<meta name=\"twitter:description\" content=\"Database Population helps to fill a database on demand with the necessary test data number.\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/database-population-using-odoo-cli.png\" \/>\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=\"Vijyant Patel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/\"},\"author\":{\"name\":\"Vijyant Patel\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/fafcc97d153849abf007b395cba86653\"},\"headline\":\"Database Population using ODOO CLI\",\"datePublished\":\"2023-11-15T05:12:05+00:00\",\"dateModified\":\"2023-11-15T05:12:12+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/\"},\"wordCount\":951,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/database-population-using-odoo-cli.png\",\"keywords\":[\"cli\",\"Command Line Interface\",\"Database Population\",\"Database Population using ODOO CLI\",\"odoo\",\"odoo app\",\"odoo cli\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/\",\"url\":\"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/\",\"name\":\"Database Population using ODOO CLI - Webkul Blog | Odoo CLI\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/database-population-using-odoo-cli.png\",\"datePublished\":\"2023-11-15T05:12:05+00:00\",\"dateModified\":\"2023-11-15T05:12:12+00:00\",\"description\":\"Database Population using Odoo CLI allows implementing database population on given model to automate data generation of the model's records.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/#primaryimage\",\"url\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/database-population-using-odoo-cli.png\",\"contentUrl\":\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/database-population-using-odoo-cli.png\",\"width\":1200,\"height\":675,\"caption\":\"database-population-using-odoo-cli\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Database Population using ODOO CLI\"}]},{\"@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\/fafcc97d153849abf007b395cba86653\",\"name\":\"Vijyant Patel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/c6a1fa061e12e4f6bbef68814d048ae9d446407d7ad0194698aeec1da6d82de6?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\/c6a1fa061e12e4f6bbef68814d048ae9d446407d7ad0194698aeec1da6d82de6?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g\",\"caption\":\"Vijyant Patel\"},\"url\":\"https:\/\/webkul.com\/blog\/author\/vijyant-patel\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Database Population using ODOO CLI - Webkul Blog | Odoo CLI","description":"Database Population using Odoo CLI allows implementing database population on given model to automate data generation of the model's records.","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\/database-population-using-odoo-cli\/","og_locale":"en_US","og_type":"article","og_title":"Database Population Using Odoo CLI","og_description":"Database Population helps to fill a database on demand with the necessary test data number.","og_url":"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2023-11-15T05:12:05+00:00","article_modified_time":"2023-11-15T05:12:12+00:00","og_image":[{"width":1200,"height":675,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/database-population-using-odoo-cli.png","type":"image\/png"}],"author":"Vijyant Patel","twitter_card":"summary_large_image","twitter_title":"Database Population Using Odoo CLI","twitter_description":"Database Population helps to fill a database on demand with the necessary test data number.","twitter_image":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/database-population-using-odoo-cli.png","twitter_creator":"@webkul","twitter_site":"@webkul","twitter_misc":{"Written by":"Vijyant Patel","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/"},"author":{"name":"Vijyant Patel","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/fafcc97d153849abf007b395cba86653"},"headline":"Database Population using ODOO CLI","datePublished":"2023-11-15T05:12:05+00:00","dateModified":"2023-11-15T05:12:12+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/"},"wordCount":951,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"image":{"@id":"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/database-population-using-odoo-cli.png","keywords":["cli","Command Line Interface","Database Population","Database Population using ODOO CLI","odoo","odoo app","odoo cli"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/","url":"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/","name":"Database Population using ODOO CLI - Webkul Blog | Odoo CLI","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/#primaryimage"},"image":{"@id":"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/#primaryimage"},"thumbnailUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/database-population-using-odoo-cli.png","datePublished":"2023-11-15T05:12:05+00:00","dateModified":"2023-11-15T05:12:12+00:00","description":"Database Population using Odoo CLI allows implementing database population on given model to automate data generation of the model's records.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/#primaryimage","url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/database-population-using-odoo-cli.png","contentUrl":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2023\/11\/database-population-using-odoo-cli.png","width":1200,"height":675,"caption":"database-population-using-odoo-cli"},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/database-population-using-odoo-cli\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Database Population using ODOO CLI"}]},{"@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\/fafcc97d153849abf007b395cba86653","name":"Vijyant Patel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/c6a1fa061e12e4f6bbef68814d048ae9d446407d7ad0194698aeec1da6d82de6?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\/c6a1fa061e12e4f6bbef68814d048ae9d446407d7ad0194698aeec1da6d82de6?s=96&d=https%3A%2F%2Fcdnblog.webkul.com%2Fblog%2Fwp-content%2Fuploads%2F2019%2F10%2Fmike.png&r=g","caption":"Vijyant Patel"},"url":"https:\/\/webkul.com\/blog\/author\/vijyant-patel\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/409688","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\/576"}],"replies":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/comments?post=409688"}],"version-history":[{"count":29,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/409688\/revisions"}],"predecessor-version":[{"id":411551,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/409688\/revisions\/411551"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media\/411546"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=409688"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=409688"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=409688"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}