product_view.xml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <odoo>
  3. <record id="kingfisher_pro_form_view_for_biz_product_images" model="ir.ui.view">
  4. <field name="name">biztech.product.images</field>
  5. <field name="model">biztech.product.images</field>
  6. <field name="arch" type="xml">
  7. <form string="Multiple Image">
  8. <group>
  9. <field name="name"/>
  10. <field name="alt"/>
  11. <field name="attach_type" widget='radio'/>
  12. <field name="image"
  13. widget="image" class="oe_avatar"
  14. height='90' width="90" options='{"preview_image":"image"}'
  15. attrs="{'invisible': [('attach_type', '=', 'video')]}"/>
  16. <field name="video_type" attrs="{'invisible': [('attach_type', '=', 'image')]}"/>
  17. </group>
  18. <group col="4">
  19. <field name="cover_image"
  20. widget="image" class="oe_avatar"
  21. height="90" width="90" options='{"preview_image":"cover_image"}'
  22. attrs="{'invisible': ['|', ('attach_type', '=', 'image'), ('video_type', '=', 'youtube')]}"/>
  23. <!-- <label string="It is required"
  24. attrs="{'invisible': ['|', ('attach_type', '=', 'image'), ('video_type', '=', 'youtube')]}"/> -->
  25. </group>
  26. <group>
  27. <field name="video_id"
  28. attrs="{'invisible': ['|', ('attach_type', '=', 'image'), ('video_type', '=', 'html5video')]}"/>
  29. <field name="video_ogv"
  30. attrs="{'invisible': ['|', ('attach_type', '=', 'image'), ('video_type', 'in', ('youtube', 'vimeo'))]}"/>
  31. <field name="video_webm"
  32. attrs="{'invisible': ['|', ('attach_type', '=', 'image'), ('video_type', 'in', ('youtube', 'vimeo'))]}"/>
  33. <field name="video_mp4"
  34. attrs="{'invisible': ['|', ('attach_type', '=', 'image'), ('video_type', 'in', ('youtube', 'vimeo'))]}"/>
  35. <field name="sequence"/>
  36. <field name="more_view_exclude"/>
  37. </group>
  38. </form>
  39. </field>
  40. </record>
  41. <record id="kingfisher_pro_list_view_for_biz_product_images" model="ir.ui.view">
  42. <field name="name">biztech.product.images</field>
  43. <field name="model">biztech.product.images</field>
  44. <field name="arch" type="xml">
  45. <tree name="Multiple Image">
  46. <field name="name"/>
  47. <field name="alt"/>
  48. <field name="attach_type"/>
  49. <field name="image" widget='image' height='64px' width="64"
  50. attrs="{'invisible': [('attach_type', '=', 'video')]}" options='{"preview_image":"image"}'/>
  51. <field name="video_type" attrs="{'invisible': [('attach_type', '=', 'image')]}"/>
  52. <field name="video_id" attrs="{'invisible': [('attach_type', '=', 'image')]}"/>
  53. <field name="sequence"/>
  54. <field name="more_view_exclude"/>
  55. </tree>
  56. </field>
  57. </record>
  58. <!-- Product Form View Inherited -->
  59. <record id="view_product_template_form_multiple_image" model="ir.ui.view">
  60. <field name="name">product.template.form.view.inherited</field>
  61. <field name="model">product.template</field>
  62. <field name="inherit_id" ref="product.product_template_only_form_view"/>
  63. <field name="arch" type="xml">
  64. <xpath expr="//div[@name='options']" position="inside">
  65. <field name="multi_image" nolabel="1"/>
  66. <label for="multi_image"/>
  67. </xpath>
  68. <xpath expr="//div[@name='options']" position="inside">
  69. <div>
  70. <field name="is_flip_image" nolabel="1"/>
  71. <label for="is_flip_image"/>
  72. </div>
  73. </xpath>
  74. <xpath expr="//notebook" position="inside">
  75. <page attrs="{'invisible':[('multi_image','!=',True)]}" name="product multi image" string="Product Multiple Images">
  76. <field name="images" nolabel="1" context="{'default_product_id': id, 'tree_view_ref':'kingfisher_pro.kingfisher_pro_list_view_for_biz_product_images', 'form_view_ref':'kingfisher_pro_structure.kingfisher_pro_form_view_for_biz_product_images'}"/>
  77. </page>
  78. <page attrs="{'invisible':[('is_flip_image','!=',True)]}" name="flip_image_page" string="Product Flip Image">
  79. <h4>Add flip image which will be visible on product hover in website</h4>
  80. <field name="flip_image" widget='image'
  81. height='90' width="90"
  82. options='{"preview_image":"flip_image"}'/>
  83. </page>
  84. </xpath>
  85. <field name="website_style_ids" position="after">
  86. <field name="product_style_tag_id"/>
  87. </field>
  88. </field>
  89. </record>
  90. <!-- Product Tag Form View-->
  91. <record id="form_view_for_biztech_product_tags" model="ir.ui.view">
  92. <field name="name">Biztech Product Tags Form View</field>
  93. <field name="model">biztech.product.tags</field>
  94. <field name="arch" type="xml">
  95. <form>
  96. <sheet>
  97. <group>
  98. <group>
  99. <field name="name"/>
  100. <field name="sequence" string="Sequence"/>
  101. </group>
  102. <group>
  103. <field name="active"/>
  104. </group>
  105. </group>
  106. <notebook>
  107. <page string="Products">
  108. <field name="product_ids"/>
  109. </page>
  110. </notebook>
  111. </sheet>
  112. </form>
  113. </field>
  114. </record>
  115. <!-- Product Tag List View-->
  116. <record id="list_view_for_biztech_product_tags" model="ir.ui.view">
  117. <field name="name">Biztech Product Tags List View</field>
  118. <field name="model">biztech.product.tags</field>
  119. <field name="arch" type="xml">
  120. <tree>
  121. <field name="name"/>
  122. <field name="sequence" string="Sequence"/>
  123. <field name="active"/>
  124. </tree>
  125. </field>
  126. </record>
  127. <!-- Action for product tags -->
  128. <record id="action_for_biztech_product_tags" model="ir.actions.act_window">
  129. <field name="name">Product Tags</field>
  130. <field name="type">ir.actions.act_window</field>
  131. <field name="res_model">biztech.product.tags</field>
  132. <field name="view_type">form</field>
  133. <field name="view_mode">list,form</field>
  134. </record>
  135. <!-- Menu for Product Tags -->
  136. <menuitem name="Product Tags"
  137. id="biztech_product_tags"
  138. parent="sale.menu_sale_config"
  139. sequence="70"
  140. action="action_for_biztech_product_tags"/>
  141. <!-- Product Sorting -->
  142. <!-- Product sorting form view -->
  143. <record id="biztech_form_view_for_product_sorting" model="ir.ui.view">
  144. <field name="name">Biztech Product Sorting Form View</field>
  145. <field name="model">biztech.product.sortby</field>
  146. <field name="arch" type="xml">
  147. <form name="Product Sorting">
  148. <sheet>
  149. <group>
  150. <group>
  151. <field name="name"/>
  152. <field name="sort_on"/>
  153. </group>
  154. <group>
  155. <field name="sort_type" string="Order By"/>
  156. </group>
  157. </group>
  158. </sheet>
  159. </form>
  160. </field>
  161. </record>
  162. <!-- Product sorting list View -->
  163. <record id="biztech_list_view_for_product_sorting" model="ir.ui.view">
  164. <field name="name">Biztech Product Sorting List View</field>
  165. <field name="model">biztech.product.sortby</field>
  166. <field name="arch" type="xml">
  167. <tree name="Product Sorting">
  168. <field name="name"/>
  169. <field name="sort_on"/>
  170. <field name="sort_type"/>
  171. </tree>
  172. </field>
  173. </record>
  174. <!-- Action for product sorting -->
  175. <record id="action_for_product_sorting" model="ir.actions.act_window">
  176. <field name="name">Product Sorting</field>
  177. <field name="res_model">biztech.product.sortby</field>
  178. <field name="view_type">form</field>
  179. <field name="view_mode">list,form</field>
  180. </record>
  181. <!-- Menu for product sorting -->
  182. <menuitem name="Product Sorting"
  183. id="sub_menu_sort_by"
  184. parent="sale.menu_sale_config"
  185. sequence="80"
  186. action="action_for_product_sorting"/>
  187. <!-- Product Public Category -->
  188. <record id="view_product_public_category_inherit" model="ir.ui.view">
  189. <field name="name">Inherited Product Public Category Form View</field>
  190. <field name="model">product.public.category</field>
  191. <field name="inherit_id" ref="website_sale.product_public_category_form_view"/>
  192. <field name="arch" type="xml">
  193. <xpath expr="//field[@name='sequence']" position="after">
  194. <field name="include_in_megamenu"/>
  195. </xpath>
  196. <xpath expr="//div[hasclass('oe_left')]" position="attributes">
  197. <attribute name="style">width:500px;</attribute>
  198. </xpath>
  199. <xpath expr="//div[hasclass('oe_left')]/group" position="after">
  200. <group attrs="{'invisible': [('include_in_megamenu', '=', False)]}">
  201. <field name="menu_id"
  202. domain= "[('is_megamenu', '=', True)]"
  203. attrs="{'required': [('include_in_megamenu', '=', True)]}"/>
  204. <field name="description"/>
  205. </group>
  206. </xpath>
  207. </field>
  208. </record>
  209. <!-- Website product paging -->
  210. <record id="action_product_per_page" model="ir.actions.act_window">
  211. <field name="name">Website Product Pagination</field>
  212. <field name="res_model">product.per.page</field>
  213. <field name="view_mode">list,form</field>
  214. <field name="context">{'search_default_my_websites':1}</field>
  215. </record>
  216. <record id="list_view_product_per_page" model="ir.ui.view">
  217. <field name="name">Product Per Page List View</field>
  218. <field name="model">product.per.page</field>
  219. <field name="arch" type="xml">
  220. <tree string="Website Product Pagination" create="false" delete="false">
  221. <field name="name"/>
  222. </tree>
  223. </field>
  224. </record>
  225. <record id="form_view_product_per_page" model="ir.ui.view">
  226. <field name="name">Product Per Page Form View</field>
  227. <field name="model">product.per.page</field>
  228. <field name="arch" type="xml">
  229. <form string="Website Product Pagination" create="false" delete="false">
  230. <sheet>
  231. <group>
  232. <field name="name"/>
  233. <field name="no_ids"/>
  234. </group>
  235. </sheet>
  236. </form>
  237. </field>
  238. </record>
  239. <record id="form_view_product_per_page_no" model="ir.ui.view">
  240. <field name="name">Product Per Page No Form View</field>
  241. <field name="model">product.per.page.no</field>
  242. <field name="arch" type="xml">
  243. <form string="Product Per Page No">
  244. <group>
  245. <field name="name"/>
  246. <field name="set_default_check"/>
  247. </group>
  248. </form>
  249. </field>
  250. </record>
  251. <record id="list_view_product_per_page_no" model="ir.ui.view">
  252. <field name="name">Product Per Page No List View</field>
  253. <field name="model">product.per.page.no</field>
  254. <field name="arch" type="xml">
  255. <tree editable="bottom">
  256. <field name="name"/>
  257. <field name="set_default_check"/>
  258. </tree>
  259. </field>
  260. </record>
  261. <!-- For website config settings -->
  262. <!-- <record id="view_website_config_settings_f_l_pager" model="ir.ui.view">
  263. <field name="name">Website config Template First Last Pager</field>
  264. <field name="model">website.config.settings</field>
  265. <field name="inherit_id" ref="website.view_website_config_settings"/>
  266. <field name="arch" type="xml">
  267. <group name="advanced" position='before'>
  268. <group string="Website Product Pager Settings">
  269. <field name="enable_first_last_pager"/>
  270. </group>
  271. </group>
  272. </field>
  273. </record> -->
  274. <!-- Menu for Product Pagination -->
  275. <menuitem name="Website Product Paging"
  276. id="view_res_config_ppp"
  277. parent="sale.menu_sale_config"
  278. sequence="70"
  279. action="action_product_per_page"/>
  280. <!-- <record id="view_res_config_ppp" model="ir.ui.view">
  281. <field name="name">sale.config.settings</field>
  282. <field name="model">sale.config.settings</field>
  283. <field name="inherit_id" ref="sale.view_sales_config"/>
  284. <field name="arch" type="xml">
  285. <xpath expr="//group[@id='sale']" position="after">
  286. <group string="Website Product Paging">
  287. <button type="action"
  288. name="%(kingfisher_pro.action_product_per_page)d"
  289. string="Configure website product pagination" class="oe_link"/>
  290. </group>
  291. </xpath>
  292. </field>
  293. </record> -->
  294. <!-- Product style tag Form View-->
  295. <record id="form_view_for_biztech_product_style_tag" model="ir.ui.view">
  296. <field name="name">Biztech Product Style Tag Form View</field>
  297. <field name="model">biztech.product.style.tag</field>
  298. <field name="arch" type="xml">
  299. <form>
  300. <sheet>
  301. <group>
  302. <group>
  303. <field name="name"/>
  304. </group>
  305. <group>
  306. <field name="color"/>
  307. </group>
  308. </group>
  309. </sheet>
  310. </form>
  311. </field>
  312. </record>
  313. <!-- Product Tag List View-->
  314. <record id="list_view_for_biztech_product_style_tag" model="ir.ui.view">
  315. <field name="name">Biztech Product Style Tag List View</field>
  316. <field name="model">biztech.product.style.tag</field>
  317. <field name="arch" type="xml">
  318. <tree>
  319. <field name="name"/>
  320. <field name="color"/>
  321. </tree>
  322. </field>
  323. </record>
  324. <!-- Action for product style tag -->
  325. <record id="action_for_biztech_product_style_tag" model="ir.actions.act_window">
  326. <field name="name">Product Style Tags</field>
  327. <field name="type">ir.actions.act_window</field>
  328. <field name="res_model">biztech.product.style.tag</field>
  329. <field name="view_type">form</field>
  330. <field name="view_mode">list,form</field>
  331. </record>
  332. <!-- Menu for Product Tags -->
  333. <menuitem name="Product Style Tag"
  334. id="biztech_product_style_tag"
  335. parent="sale.menu_sale_config"
  336. sequence="80"
  337. action="action_for_biztech_product_style_tag"/>
  338. <!-- New rating feature for displying only stars in any view for odoo 11 -->
  339. <template id="inherited_message_thread" inherit_id="portal.message_thread">
  340. <xpath expr="//div[@id='discussion']" position="attributes">
  341. <attribute name="t-att-data-rating_val">rating_val or 6</attribute>
  342. <attribute name="t-att-data-only_rating">only_rating or 0</attribute>
  343. </xpath>
  344. </template>
  345. </odoo>