YouTube2Text

Understanding Model Inheritance and View Inheritance in Odoo 17. days 8. — Transcript

by Odoo Tech · 1,123 words · 181 segments · language en · Watch on YouTube

Full transcript

  1. 0:00hello so welcome to my YouTube channel
  2. 0:03now let me open the
  3. 0:06training okay so training course okay so
  4. 0:10here you can see the eight days here is
  5. 0:13the first topic is the model inheritance
  6. 0:15after that view inheritance okay today
  7. 0:18we will see model inheritance and VI
  8. 0:21inheritance how to use and what will
  9. 0:24what is the use and we can use how to
  10. 0:27use in the hood okay so let's start do
  11. 0:31not waste more time okay so first I'm
  12. 0:35tell you what I'm doing
  13. 0:37okay go to the sales module so this is
  14. 0:42the default module which is created in
  15. 0:45the adance by default okay basically go
  16. 0:49to the apps and install active the M
  17. 0:53once active the module this module will
  18. 0:55be so this way okay so I want to
  19. 1:00add one one field this object like here
  20. 1:04is the customer second is the order date
  21. 1:07and second after that the payment
  22. 1:08reference so I want to add one more
  23. 1:11field in existing models okay so how we
  24. 1:15can so let's we need to
  25. 1:19First inherit the existing modu after
  26. 1:22that we can add and how we will s in the
  27. 1:25front view okay so let's do it
  28. 1:30go to the py
  29. 1:34charm I'm inside the py charm go to the
  30. 1:39adance here is the advance see student
  31. 1:44management modules so now I'm creating
  32. 1:48one more file here which is called sales
  33. 1:54holder okay now enter here un P the
  34. 2:00import models and Fields and API after
  35. 2:05that I want to inherit sales class sale
  36. 2:11mod after that enter and
  37. 2:16inherit sale do order object why
  38. 2:20am WR here the sale do order why because
  39. 2:24of this model name is the sale order
  40. 2:28so here and inherit the existing module
  41. 2:32here and indentation correct control
  42. 2:36shift V
  43. 2:39okay now I want to add here one more
  44. 2:42field like
  45. 2:45uh sale order reference I want to add
  46. 2:48one field here sale order reference okay
  47. 2:52sale reference ref now name field this
  48. 2:55field will be correct type
  49. 2:59after that passing the parameter is a
  50. 3:02string
  51. 3:03sale R
  52. 3:06okay need to link with an internal init
  53. 3:10file form dot
  54. 3:12import sale order okay once I link this
  55. 3:17file in the internal files after that
  56. 3:21upgrade the modu and simply
  57. 3:27refresh once I refresh coming in the
  58. 3:29error is's saying the sale order module
  59. 3:33does not exist in the registry why why
  60. 3:35is coming this error because this object
  61. 3:39is
  62. 3:40created another model where is created
  63. 3:44this is created inside the sale module
  64. 3:46here see my mouse cursor okay there is
  65. 3:50adance inside the adance module name is
  66. 3:52the sale is the sale model where is the
  67. 3:54created name isal to sale do order okay
  68. 3:58need to add in the dependency
  69. 4:02sale what
  70. 4:03do sorry I need to
  71. 4:07link here WR
  72. 4:09sale after that need to
  73. 4:12run once I
  74. 4:15run and refresh the
  75. 4:18page see my my field is not coming here
  76. 4:22because I'm not add in the
  77. 4:25views I'm not inherit the views right
  78. 4:28now only inherit edit models if you can
  79. 4:32see here sale reference my field is
  80. 4:34coming or not here you can see my field
  81. 4:36is coming but this field is not showing
  82. 4:39in the form view because I'm not
  83. 4:41inhering the form views okay uh let's
  84. 4:46inherit the form view click on the
  85. 4:48developer mode go to the edit View and
  86. 4:53this
  87. 4:55F this external ID need to copy and
  88. 4:59control shift
  89. 5:01V search in the
  90. 5:03XML
  91. 5:05and anyone in herit code is copy let
  92. 5:11once I copy let then explain
  93. 5:15okay now need
  94. 5:17to create new one more file this file
  95. 5:21name will be
  96. 5:23S S
  97. 5:26View okay inside the
  98. 5:30starting
  99. 5:31tago and paste here so
  100. 5:35now in
  101. 5:38s renamed of ID
  102. 5:42this after that so inherit ID so this
  103. 5:48this ID will be pasted in the inherited
  104. 5:51line reference attribute is string okay
  105. 5:56after that where we where we want to add
  106. 5:59this field where we want to show okay I
  107. 6:01want to show this field after the
  108. 6:04payment term payment term ID payment
  109. 6:06term ID copy payment term ID and paste
  110. 6:09it here I want to add this uh sale
  111. 6:13reference field after the payment term
  112. 6:16ID okay let's now this we need to link
  113. 6:21in the manest file go to the Manifest
  114. 6:24and Link
  115. 6:27here okay after that upgrade the module
  116. 6:31once I upgrade the modu go to the sale
  117. 6:34order and refresh the page my field is
  118. 6:37coming so I can write here something
  119. 6:40else
  120. 6:41okay
  121. 6:44so okay then
  122. 6:47save okay or you can add this field by
  123. 6:51the
  124. 6:52xath
  125. 6:55okay if I'm adding through the field or
  126. 6:59after that I'm adding them xath through
  127. 7:01the xath X PA and ex ex PR this is the
  128. 7:06syntax first where we can okay I want to
  129. 7:11add after the this fi so first is start
  130. 7:14the starting tag is the seat inside the
  131. 7:17seat one group name this inside this
  132. 7:21group name after the this group group
  133. 7:25name this will be this okay inside I
  134. 7:28want to add this field inside the this
  135. 7:32group okay so first call
  136. 7:38Se seat inside the seat group is group
  137. 7:43group name this group inside the
  138. 7:48group there is the two group first group
  139. 7:51is the param partner details second in
  140. 7:53the order detail I want to add this
  141. 7:56field Group in order details group the
  142. 7:59name
  143. 8:00name
  144. 8:02is this one after
  145. 8:06the
  146. 8:08position
  147. 8:09after okay after that I'm add here now
  148. 8:16comment above so once I upgrade the modu
  149. 8:21and go go back to the sale order and
  150. 8:24refresh so my field coming
  151. 8:27here okay so I want to add this uh
  152. 8:32previously okay so go to the again
  153. 8:36form and go to the G
  154. 8:40form see inside this group inside this
  155. 8:45group one field is the payment term ID
  156. 8:49so here
  157. 8:52field at great
  158. 8:54name name will be
  159. 8:58payment okay
  160. 9:03so go to the home and refresh now my
  161. 9:08field coming previously after the
  162. 9:10payment okay so here you can use
  163. 9:15inherit okay so I may inherit the views
  164. 9:19and also inherit the sale
  165. 9:22order sorry sale order you can inherit
  166. 9:25the models like this way and also you
  167. 9:29can inherit the views with with
  168. 9:31inherited ID okay so this is the two
  169. 9:36topics if you have any confusion you can
  170. 9:38write the comment box one more thing
  171. 9:41this is the developer extension click on
  172. 9:43the
  173. 9:45extension and manage extension and go to
  174. 9:48the
  175. 9:49Chrome my system is not link with data
  176. 9:53let me link the data
  177. 10:02so it's link now
  178. 10:05refresh so here search de
  179. 10:10de then enter so this one is the oo
  180. 10:14developer mode simply install and pin
  181. 10:18here okay so thank you

About this transcript

This page contains the full transcript of Understanding Model Inheritance and View Inheritance in Odoo 17. days 8. by Odoo Tech , generated from the public captions YouTube serves with the video. The transcript has 1,123 words across 181 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.