{"id":250616,"date":"2022-08-05T07:54:47","date_gmt":"2022-08-05T07:54:47","guid":{"rendered":"https:\/\/webkul.com\/blog\/?p=250616"},"modified":"2022-08-05T07:57:00","modified_gmt":"2022-08-05T07:57:00","slug":"odoo-fields","status":"publish","type":"post","link":"https:\/\/webkul.com\/blog\/odoo-fields\/","title":{"rendered":"ORM API: Odoo Fields"},"content":{"rendered":"\n<p><code><span style=\"color:#d338b7\" class=\"has-inline-color\"><strong>Odoo<\/strong><\/span><\/code> is basically a web-based open source &amp; modular-based framework\/software which include multiple business solutions like \u201cCRM\u201d, \u201cPOS\u201d, \u201cE-Commerce\u201d, \u201cERP\u201d, \u201cManufacturing\u201d, \u201cInventory Management\u201d, \u201cBilling &amp; Accounting\u201d and \u201cProject Management\u201d. <\/p>\n\n\n\n<p>Also it follows the ORM structure.<\/p>\n\n\n\n<p>In our last blog we studied how to <a href=\"https:\/\/webkul.com\/blog\/how-to-create-a-module-in-odoo\/\">create a new module in Odoo<\/a>.<\/p>\n\n\n\n<p>As we mentioned above, Odoo follows the ORM(\u201c<strong>Object Relational Mapping<\/strong>\u201d) structure which manipulates data from the database into Object-Oriented form.&nbsp;<\/p>\n\n\n\n<p>Classes are represented as tables and fields are represented as columns in Odoo.<\/p>\n\n\n\n<p>So in this article we will talk about Odoo fields.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is the Odoo field?<\/h2>\n\n\n\n<p>Odoo is a modular based framework.<\/p>\n\n\n\n<p>So everything is managed by modules and classes.<\/p>\n\n\n\n<p>Odoo Fields are managed by <a href=\"https:\/\/github.com\/odoo\/odoo\/blob\/fb17af76d791488c69eb3829376940b32998d374\/odoo\/fields.py#L101\">field class<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Attributes of Odoo Fields<\/h2>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>string:<\/strong> It represents the label of Odoo fields eg: string=&#8221; Webkul&#8221;<\/li><li><strong>help<\/strong>: It represents the description of Odoo fields eg: help=\u201d This is Webkul type field\u201d<\/li><li><strong>readonly<\/strong>: If true then the Odoo fields not editable eg: readonly=True\/False<\/li><li><strong>invisible<\/strong>: If true then the Odoo fields not visible to the user eg: invisible=True\/False<\/li><li><strong>required<\/strong>: If true then the Odoo fields compulsory for the user eg: required=True\/False<\/li><li><strong>copy<\/strong>: If true then the record will be copied if any record is duplicate eg: copy=True\/False<\/li><li><strong>index<\/strong>: If true then the field is indexed in database <strong>eg: <\/strong>index=True\/False<\/li><li><strong>store:<\/strong> If true then the field is stored in the database(For computed\/related fields only) <strong>eg: <\/strong>store=True\/False<\/li><li><strong><mark>d<\/mark>efault<\/strong><mark>: It<\/mark> is used to set the value of the field, If a value is passed inside this attribute then during record create that value will be set inside the record.<\/li><li><strong>group<\/strong>: If the comma-separated list of groups XML ids passed then it will restrict the users of these groups to access these fields.<\/li><\/ol>\n\n\n\n<p>And there are many other attributes which are present with the Odoo fields.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Where are these fields stored in Odoo?<\/h2>\n\n\n\n<p>In <strong>Odoo fields<\/strong> are also stored in an object form. All the fields of Odoo are stored inside the \u201c<a href=\"https:\/\/github.com\/odoo\/odoo\/blob\/fb17af76d791488c69eb3829376940b32998d374\/odoo\/addons\/base\/models\/ir_model.py#L332\">i<strong>r.model.fields<\/strong><\/a>\u201d and you can also find the list of fields associated with the models which are also present as records in Odoo inside the \u201c<a href=\"https:\/\/github.com\/odoo\/odoo\/blob\/fb17af76d791488c69eb3829376940b32998d374\/odoo\/addons\/base\/models\/ir_model.py#L90\"><strong>ir.model<\/strong><\/a>\u201d model.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">How many types of fields in Odoo?<\/h2>\n\n\n\n<p>In Odoo data is stored in the simple, relational, and computed form.<\/p>\n\n\n\n<p>Currently, in Odoo, there are three major types of fields which are given below,<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Basic Fields<\/h3>\n\n\n\n<p>It contains the fields which are stored in the simplified form.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Boolean<\/h4>\n\n\n\n<p>This field stores value in 0\/1(False\/True) and represented by class <a href=\"https:\/\/github.com\/odoo\/odoo\/blob\/13.0\/odoo\/fields.py#L1131\"><strong>Boolean<\/strong><\/a>.<\/p>\n\n\n\n<p>If false then it stores 0 and if true then value will be 1.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><code><span style=\"color:#235f2e\" class=\"has-inline-color\"><strong>eg:<\/strong> field_name = fields.<strong>Boolean<\/strong>(string=\u201dField Label\u201d)<\/span><\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Character<\/h4>\n\n\n\n<p>This field stores value in string form and represented by class <a href=\"https:\/\/github.com\/odoo\/odoo\/blob\/13.0\/odoo\/fields.py#L1489\"><strong>Char<\/strong><\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><code><span style=\"color:#235f2e\" class=\"has-inline-color\"><strong>eg:<\/strong> field_name = fields.<strong>Char<\/strong>(string=\u201dField Label\u201d)<\/span><\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Integer<\/h4>\n\n\n\n<p>This field stores value in numeric form and represented by class <a href=\"https:\/\/github.com\/odoo\/odoo\/blob\/13.0\/odoo\/fields.py#L1146\"><strong>Integer<\/strong><\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><span style=\"color:#235f2e\" class=\"has-inline-color\"><code><strong>eg:<\/strong> field_name = fields.<strong>Integer<\/strong>(string=\u201dField Label\u201d)<\/code><\/span><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Float<\/h4>\n\n\n\n<p>This field stores value in decimal form and represented by class <a href=\"https:\/\/github.com\/odoo\/odoo\/blob\/13.0\/odoo\/fields.py#L1185\"><strong>Float<\/strong><\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><code><span style=\"color:#235f2e\" class=\"has-inline-color\"><strong>eg:<\/strong> field_name = fields.<strong>Float<\/strong>(string=\u201dField Label\u201d)<\/span><\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Advanced Fields<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">Presentable<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">Binary<\/h5>\n\n\n\n<p>This field stores value in binary form.<\/p>\n\n\n\n<p>It store the attachments like file, images, musical files, etc, and represented by class <a href=\"https:\/\/github.com\/odoo\/odoo\/blob\/13.0\/odoo\/fields.py#L1850\"><strong>Binary<\/strong><\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><code><span style=\"color:#235f2e\" class=\"has-inline-color\"><strong>eg:<\/strong> field_name = fields.<strong>Binary<\/strong>(string=\u201dField Label\u201d)<\/span><\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\">HTML<\/h5>\n\n\n\n<p>This field stores value in string form and it is used to present the data in html form. HTML field is represented by class <a href=\"https:\/\/github.com\/odoo\/odoo\/blob\/13.0\/odoo\/fields.py#L1569\"><strong>HTML<\/strong><\/a>. Parameters like <strong>sanitize, sanitize_tags, sanitize_style<\/strong> etc, are used inside the html fields,<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><span style=\"color:#235f2e\" class=\"has-inline-color\"><code><strong>eg:<\/strong> field_name = fields.<strong>HTML<\/strong>(string=\u201dField Label\u201d)<\/code><\/span><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\">Image<\/h5>\n\n\n\n<p>This field stores value in binary form and used to present the data in image form. The image field is inherited by binary class and represented by class <a href=\"https:\/\/github.com\/odoo\/odoo\/blob\/13.0\/odoo\/fields.py#L2039\"><strong>Image<\/strong><\/a>. Parameters like <strong>max_width, max_height<\/strong> etc, are used inside the image fields,<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><code><span style=\"color:#235f2e\" class=\"has-inline-color\"><strong>eg:<\/strong> field_name = fields.<strong>Image<\/strong>(string=\u201dField Label\u201d)<\/span><\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\">Monetary<\/h5>\n\n\n\n<p>This field stores value in decimal form and used to present the money along with the currency and represented by class <a href=\"https:\/\/github.com\/odoo\/odoo\/blob\/13.0\/odoo\/fields.py#L1252\"><strong>Monetary<\/strong><\/a>. Parameters <strong>currency field(<\/strong><em>a many2one field of res.currency object<\/em><strong>)<\/strong> etc and used inside the monetary fields,<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><span style=\"color:#235f2e\" class=\"has-inline-color\"><code><strong>eg:<\/strong> field_name = fields.<strong>Monetary<\/strong>(string=\u201dField Label\u201d)<\/code><\/span><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\">Selection<\/h5>\n\n\n\n<p>This field stores value in string form and this field helps to provide the selection to the user. Selection field is represented by class <a href=\"https:\/\/github.com\/odoo\/odoo\/blob\/13.0\/odoo\/fields.py#L2095\"><strong>Selection<\/strong><\/a>. It uses the below attribute to represent the selection to the user,<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>selection = [(&#8216;a&#8217;, &#8216;A&#8217;), (&#8216;b&#8217;, &#8216;B&#8217;)]<\/strong><\/li><li><strong>selection_add = [(&#8216;c&#8217;, &#8216;C&#8217;), (&#8216;b&#8217;,)]<\/strong><\/li><\/ul>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><span style=\"color:#235f2e\" class=\"has-inline-color\"><code><strong>eg:<\/strong>field_name = fields.<strong>Selection<\/strong>([(\u2018<strong>a<\/strong>\u2019, \u2018A\u2019), (\u2018<strong>b<\/strong>\u2019, \u2018B\u2019)], <strong>string<\/strong>=\u201dField Label\u201d, <strong>default<\/strong>=\u2019a\u2019)<\/code><\/span><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Text<\/h4>\n\n\n\n<p>This field stores value in string form. Basically this field helps to store the long text at Odoo end and represented by class <a href=\"https:\/\/github.com\/odoo\/odoo\/blob\/13.0\/odoo\/fields.py#L1548\"><strong>Text<\/strong><\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><code><span style=\"color:#235f2e\" class=\"has-inline-color\"><strong>eg:<\/strong> field_name = fields.<strong>Text<\/strong>(string=\u201dField Label\u201d)<\/span><\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Date(Time)<\/h4>\n\n\n\n<h5 class=\"wp-block-heading\">Date<\/h5>\n\n\n\n<p>This field stores value in object form and used to present the date view to the user. Which helps the user to select the date and represented by class <a href=\"https:\/\/github.com\/odoo\/odoo\/blob\/13.0\/odoo\/fields.py#L1642\"><strong>Date<\/strong><\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><code><span style=\"color:#235f2e\" class=\"has-inline-color\"><strong>eg:<\/strong> field_name = fields.<strong>Date<\/strong>(string=\u201dField Label\u201d)<\/span><\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h5 class=\"wp-block-heading\">Datetime<\/h5>\n\n\n\n<p>This field stores value in object form. It present the datetime view to the user. This helps the user to select the date and time as well and represented by class <a href=\"https:\/\/github.com\/odoo\/odoo\/blob\/13.0\/odoo\/fields.py#L1741\"><strong>Datetime<\/strong><\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><span style=\"color:#235f2e\" class=\"has-inline-color\"><code><strong>eg:<\/strong> field_name = fields.<strong>Datetime<\/strong>(string=\u201dField Label\u201d)<\/code><\/span><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Relational Fields<\/h3>\n\n\n\n<p>It contains the fields which provide the relation between the two tables and represented by the <a href=\"https:\/\/github.com\/odoo\/odoo\/blob\/13.0\/odoo\/fields.py#L2295\">Relational<\/a> class.<\/p>\n\n\n\n<h4 class=\"wp-block-heading\">Many2one<\/h4>\n\n\n\n<p>This field stores recordset(<strong><em>0 or 1 record for the related table<\/em><\/strong>). The \u201c<strong>comodel_name<\/strong>\u201d attribute helps to define the target model and represented by class <a href=\"https:\/\/github.com\/odoo\/odoo\/blob\/13.0\/odoo\/fields.py#L2360\"><strong>Many2one<\/strong><\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><code><span style=\"color:#235f2e\" class=\"has-inline-color\"><strong>eg:<\/strong> field_name = fields.<strong>Many2one<\/strong>(<strong>comodel_name<\/strong>=\u201dwebkul.webkul\u201d, <strong>string<\/strong>=\u201dField Label\u201d)<\/span><\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">Many2many<\/h4>\n\n\n\n<p>These field store recordsets (<strong><em>0 or 1 or more records for the related table<\/em><\/strong>). \u201c<strong>comodel_name<\/strong>\u201d attribute helps to define the target model and represented by class <a href=\"https:\/\/github.com\/odoo\/odoo\/blob\/13.0\/odoo\/fields.py#L3126\"><strong>Many2many<\/strong><\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><span style=\"color:#235f2e\" class=\"has-inline-color\"><code><strong>eg:<\/strong> field_name = fields.<strong>Many2many<\/strong>(<strong>comodel_name<\/strong>=\u201dwebkul.webkul\u201d, <strong>relation<\/strong>=\u201dwebkul_software_rel\u201d <strong>string<\/strong>=\u201dField Label\u201d)<\/code><\/span><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\">One2many<\/h4>\n\n\n\n<p>These field store recordsets (<strong><em>0 or 1 or more records for the related table<\/em><\/strong>). \u201c<strong>comodel_name<\/strong>\u201d attribute helps to define the target model and represented by class <a href=\"https:\/\/github.com\/odoo\/odoo\/blob\/13.0\/odoo\/fields.py#L2863\"><strong>One2many<\/strong><\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><span style=\"color:#235f2e\" class=\"has-inline-color\"><code><strong>eg:<\/strong> field_name = fields.<strong>One2many<\/strong>(<strong>comodel_name<\/strong>=\u201dwebkul.webkul\u201d, <strong>inverse_name <\/strong>=\u201dwebkul_id\u201d <strong>string<\/strong>=\u201dField Label\u201d)<\/code><\/span><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Related Fields<\/h3>\n\n\n\n<p>Dynamically typed field.<\/p>\n\n\n\n<p>It stores the subfield of tables. It uses the related attribute.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><span style=\"color:#235f2e\" class=\"has-inline-color\"><code><strong>eg:<\/strong> field_name = fields.<strong>Char<\/strong>(<strong>related<\/strong>=\u201dwebkul_id.name\u201d, <strong>string<\/strong>=\u201dField Label\u201d)<\/code><\/span><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Computed Fields<\/h3>\n\n\n\n<p>This field helps to store value as per the requirement. This field uses the <strong>compute<\/strong> attribute.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><span style=\"color:#235f2e\" class=\"has-inline-color\"><code><strong>eg:<\/strong> field_name = fields.<strong>Char<\/strong>(<strong>compute<\/strong>=\u201dget_data\u201d, <strong>string<\/strong>=\u201dField Label\u201d)<\/code><\/span><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>We Would Love to Hear From You!<\/strong><\/h3>\n\n\n\n<p><em>Hope you find the blog informative! Please feel free to share your feedback in the comments below.<\/em><\/p>\n\n\n\n<p><em>Also, check <\/em><a href=\"https:\/\/store.webkul.com\/Odoo.html\"><em>our store page <\/em><\/a><em>to go through our other modules.<\/em><\/p>\n\n\n\n<p><em>If you still have any issues\/queries then please raise a ticket at <\/em><a href=\"https:\/\/webkul.uvdesk.com\/en\/customer\/create-ticket\/\"><em>https:\/\/webkul.uvdesk.com\/en\/customer\/create-ticket\/<\/em><\/a><\/p>\n\n\n\n<p><em>For any doubt contact us at <\/em><em>support@webkul.com<\/em><em>.<\/em><\/p>\n\n\n\n<p><em>Thanks for paying attention!!<\/em><\/p>\n\n\n\n<p>\ud83d\ude42 \ud83d\ude0a<br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Odoo is basically a web-based open source &amp; modular-based framework\/software which include multiple business solutions like \u201cCRM\u201d, \u201cPOS\u201d, \u201cE-Commerce\u201d, \u201cERP\u201d, \u201cManufacturing\u201d, \u201cInventory Management\u201d, \u201cBilling &amp; Accounting\u201d and \u201cProject Management\u201d. Also it follows the ORM structure. In our last blog we studied how to create a new module in Odoo. As we mentioned above, Odoo follows <a href=\"https:\/\/webkul.com\/blog\/odoo-fields\/\">[&#8230;]<\/a><\/p>\n","protected":false},"author":90,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-250616","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Odoo Fields | Object Relational Mapping<\/title>\n<meta name=\"description\" content=\"Odoo follows the Object Relational Mapping structure which manipulates data from the database into Object-Oriented form.\u00a0Classes are represented as tables and fields are represented as columns in Odoo. So in this article we will talk about Odoo Fields.\" \/>\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\/odoo-fields\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Odoo Fields | Object Relational Mapping\" \/>\n<meta property=\"og:description\" content=\"Odoo follows the Object Relational Mapping structure which manipulates data from the database into Object-Oriented form.\u00a0Classes are represented as tables and fields are represented as columns in Odoo. So in this article we will talk about Odoo Fields.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/webkul.com\/blog\/odoo-fields\/\" \/>\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=\"2022-08-05T07:54:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-08-05T07:57:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-og.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\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=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/webkul.com\/blog\/odoo-fields\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/odoo-fields\/\"},\"author\":{\"name\":\"Ashish Singh\",\"@id\":\"https:\/\/webkul.com\/blog\/#\/schema\/person\/3b92c698256ce0bcb9613acf8bbf5b2d\"},\"headline\":\"ORM API: Odoo Fields\",\"datePublished\":\"2022-08-05T07:54:47+00:00\",\"dateModified\":\"2022-08-05T07:57:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/webkul.com\/blog\/odoo-fields\/\"},\"wordCount\":979,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/webkul.com\/blog\/#organization\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/webkul.com\/blog\/odoo-fields\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/webkul.com\/blog\/odoo-fields\/\",\"url\":\"https:\/\/webkul.com\/blog\/odoo-fields\/\",\"name\":\"Odoo Fields | Object Relational Mapping\",\"isPartOf\":{\"@id\":\"https:\/\/webkul.com\/blog\/#website\"},\"datePublished\":\"2022-08-05T07:54:47+00:00\",\"dateModified\":\"2022-08-05T07:57:00+00:00\",\"description\":\"Odoo follows the Object Relational Mapping structure which manipulates data from the database into Object-Oriented form.\u00a0Classes are represented as tables and fields are represented as columns in Odoo. So in this article we will talk about Odoo Fields.\",\"breadcrumb\":{\"@id\":\"https:\/\/webkul.com\/blog\/odoo-fields\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/webkul.com\/blog\/odoo-fields\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/webkul.com\/blog\/odoo-fields\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/webkul.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ORM API: Odoo Fields\"}]},{\"@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":"Odoo Fields | Object Relational Mapping","description":"Odoo follows the Object Relational Mapping structure which manipulates data from the database into Object-Oriented form.\u00a0Classes are represented as tables and fields are represented as columns in Odoo. So in this article we will talk about Odoo Fields.","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\/odoo-fields\/","og_locale":"en_US","og_type":"article","og_title":"Odoo Fields | Object Relational Mapping","og_description":"Odoo follows the Object Relational Mapping structure which manipulates data from the database into Object-Oriented form.\u00a0Classes are represented as tables and fields are represented as columns in Odoo. So in this article we will talk about Odoo Fields.","og_url":"https:\/\/webkul.com\/blog\/odoo-fields\/","og_site_name":"Webkul Blog","article_publisher":"https:\/\/www.facebook.com\/webkul\/","article_published_time":"2022-08-05T07:54:47+00:00","article_modified_time":"2022-08-05T07:57:00+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/cdnblog.webkul.com\/blog\/wp-content\/uploads\/2021\/08\/webkul-og.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":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/webkul.com\/blog\/odoo-fields\/#article","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/odoo-fields\/"},"author":{"name":"Ashish Singh","@id":"https:\/\/webkul.com\/blog\/#\/schema\/person\/3b92c698256ce0bcb9613acf8bbf5b2d"},"headline":"ORM API: Odoo Fields","datePublished":"2022-08-05T07:54:47+00:00","dateModified":"2022-08-05T07:57:00+00:00","mainEntityOfPage":{"@id":"https:\/\/webkul.com\/blog\/odoo-fields\/"},"wordCount":979,"commentCount":0,"publisher":{"@id":"https:\/\/webkul.com\/blog\/#organization"},"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/webkul.com\/blog\/odoo-fields\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/webkul.com\/blog\/odoo-fields\/","url":"https:\/\/webkul.com\/blog\/odoo-fields\/","name":"Odoo Fields | Object Relational Mapping","isPartOf":{"@id":"https:\/\/webkul.com\/blog\/#website"},"datePublished":"2022-08-05T07:54:47+00:00","dateModified":"2022-08-05T07:57:00+00:00","description":"Odoo follows the Object Relational Mapping structure which manipulates data from the database into Object-Oriented form.\u00a0Classes are represented as tables and fields are represented as columns in Odoo. So in this article we will talk about Odoo Fields.","breadcrumb":{"@id":"https:\/\/webkul.com\/blog\/odoo-fields\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/webkul.com\/blog\/odoo-fields\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/webkul.com\/blog\/odoo-fields\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/webkul.com\/blog\/"},{"@type":"ListItem","position":2,"name":"ORM API: Odoo Fields"}]},{"@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\/250616","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=250616"}],"version-history":[{"count":3,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/250616\/revisions"}],"predecessor-version":[{"id":347166,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/posts\/250616\/revisions\/347166"}],"wp:attachment":[{"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/media?parent=250616"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/categories?post=250616"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webkul.com\/blog\/wp-json\/wp\/v2\/tags?post=250616"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}