slider_view.xml 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <openerp>
  3. <data>
  4. <menuitem id="menu_slider_config" parent="base.menu_base_partner" name="Slider Configuration" sequence="101"/>
  5. <!-- Product Category Slider -->
  6. <!-- Product Category Slider Form View-->
  7. <record id="prod_cat_slider_form_view" model="ir.ui.view">
  8. <field name="name">product.category.slider.form.view</field>
  9. <field name="model">product.category.slider.config</field>
  10. <field name="arch" type="xml">
  11. <form string="Product/Category Slider">
  12. <sheet>
  13. <group>
  14. <field name="name"/>
  15. <field name="active"/>
  16. <field name="no_of_counts"/>
  17. <field name="prod_cat_type"/>
  18. <field name="auto_rotate"/>
  19. <field name="sliding_speed"
  20. attrs="{'invisible': [('auto_rotate', '=', False)]}"/>
  21. <field name="collections_product"
  22. attrs="{'invisible': [('prod_cat_type', '=', 'category')],
  23. 'required': [('prod_cat_type', '=', 'product')]}"
  24. widget="many2many_tags"/>
  25. <field name="collections_category"
  26. attrs="{'invisible': [('prod_cat_type', '=', 'product')],
  27. 'required': [('prod_cat_type', '=', 'category')]}"
  28. widget="many2many_tags"/>
  29. </group>
  30. </sheet>
  31. </form>
  32. </field>
  33. </record>
  34. <!-- Product Category Slider List View-->
  35. <record id="prod_cat_slider_list_view" model="ir.ui.view">
  36. <field name="name">product.category.slider.list.view</field>
  37. <field name="model">product.category.slider.config</field>
  38. <field name="arch" type="xml">
  39. <tree string="Product/Category Slider">
  40. <field name="name"/>
  41. <field name="no_of_counts"/>
  42. <field name="prod_cat_type"/>
  43. <!-- <field name="auto_rotate"/>
  44. <field name="sliding_speed"/>
  45. <field name="collections"/> -->
  46. </tree>
  47. </field>
  48. </record>
  49. <!-- Product Category Slider Action -->
  50. <record id="prod_cat_slider_action" model="ir.actions.act_window">
  51. <field name="name">Product/Category Slider</field>
  52. <field name="type">ir.actions.act_window</field>
  53. <field name="res_model">product.category.slider.config</field>
  54. <field name="view_type">form</field>
  55. <field name="view_mode">tree,form</field>
  56. <field name="view_id" eval="False"/>
  57. <field name="help" type="html">
  58. <p class="oe_view_nocontent_create">
  59. Click to define a new slider.
  60. </p>
  61. </field>
  62. </record>
  63. <!-- Product Category menu in slider config -->
  64. <menuitem id="prod_cat_slider_menu"
  65. name="Product/Category Slider Configuraton"
  66. action="prod_cat_slider_action"
  67. parent="kingfisher_pro.menu_slider_config"
  68. sequence="60"/>
  69. <!-- Brands slider -->
  70. <record id="product_brandz_search_view" model="ir.ui.view">
  71. <field name="name">product.brands.search.form</field>
  72. <field name="model">product.brands</field>
  73. <field name="arch" type="xml">
  74. <search string="Product Brands">
  75. <field name="name"/>
  76. </search>
  77. </field>
  78. </record>
  79. <!-- Brand Products -->
  80. <act_window id="action_open_brand_products"
  81. name="Brand Products"
  82. res_model="product.template"
  83. view_type="form"
  84. view_mode="kanban,form,tree"
  85. domain="[('product_brand_id', '=', active_id)]"/>
  86. <!-- Product Brand -->
  87. <act_window id="action_open_single_product_brand"
  88. name="Product Brand"
  89. res_model="product.brands"
  90. view_type="form"
  91. view_mode="kanban,form,tree"
  92. target="current"
  93. domain="[('product_ids', 'in', active_id)]"/>
  94. <!-- Product brand form view -->
  95. <record id="view_product_brands_form_view" model="ir.ui.view">
  96. <field name="name">product.brands.form</field>
  97. <field name="model">product.brands</field>
  98. <field name="arch" type="xml">
  99. <form string="Product Brands">
  100. <sheet>
  101. <field name="brand_logo" widget="image" class="oe_avatar oe_left"/>
  102. <div class="oe_title">
  103. <div class="oe_edit_only">
  104. <label for="name" string="Brand Name"/>
  105. </div>
  106. <h1>
  107. <field name="name"/>
  108. </h1>
  109. </div>
  110. <div class="oe_right oe_button_box">
  111. <button
  112. class="oe_inline oe_stat_button"
  113. type="action"
  114. name="%(action_open_brand_products)d"
  115. icon="fa-cubes">
  116. <field name="products_count" string="Products" widget="statinfo" />
  117. </button>
  118. </div>
  119. <group string="Brand Cover">
  120. <field name="brand_cover"
  121. height="74px"
  122. nolabel='1' widget="image"/>
  123. </group>
  124. <group string="Description">
  125. <field name="brand_description" nolabel="1"/>
  126. </group>
  127. </sheet>
  128. </form>
  129. </field>
  130. </record>
  131. <!-- Product brand tree view -->
  132. <record id="view_product_brands_tree_view" model="ir.ui.view">
  133. <field name="name">product.brands.tree</field>
  134. <field name="model">product.brands</field>
  135. <field name="arch" type="xml">
  136. <tree string="product.brands">
  137. <field name="name"/>
  138. <field name="brand_description"/>
  139. </tree>
  140. </field>
  141. </record>
  142. <!-- Product brand kanban view -->
  143. <record id="view_product_brands_kanban_view" model="ir.ui.view">
  144. <field name="name">product.brands.kanban</field>
  145. <field name="model">product.brands</field>
  146. <field name="arch" type="xml">
  147. <kanban>
  148. <field name="brand_logo"/>
  149. <field name="products_count"/>
  150. <field name="brand_description"/>
  151. <templates>
  152. <t t-name="kanban-box">
  153. <div class="oe_kanban_vignette oe_semantic_html_override">
  154. <a type="open">
  155. <img t-att-src="kanban_image('product.product', 'brand_logo', record.id.value)"
  156. height="74"
  157. width="74"
  158. class="o_kanban_image"/>
  159. </a>
  160. <div class="oe_kanban_details">
  161. <h4>
  162. <a type="open">
  163. <field name="name"/>
  164. </a>
  165. </h4>
  166. <div>
  167. <a name="%(kingfisher_pro.action_open_brand_products)d"
  168. type="action">
  169. <t t-esc="record.products_count.value"/> Products
  170. </a>
  171. </div>
  172. <span>
  173. <t t-raw="record.brand_description.value.substr(0,200)"/>
  174. <t t-if="record.brand_description.value.length > 200">
  175. <a type="open"><b>...</b></a>
  176. </t>
  177. </span>
  178. </div>
  179. </div>
  180. </t>
  181. </templates>
  182. </kanban>
  183. </field>
  184. </record>
  185. <!-- Product brand search view -->
  186. <record id="inherit_product_search_view" model="ir.ui.view">
  187. <field name="name">inherited.product.search.form</field>
  188. <field name="model">product.product</field>
  189. <field name="inherit_id" ref="product.product_search_form_view"/>
  190. <field name="arch" type="xml">
  191. <field name="name" position="after">
  192. <field name="product_brand_id"/>
  193. </field>
  194. <filter name="services" position='after'>
  195. <filter string="Brands" name="groupby_brand" domain="[]"
  196. context="{'group_by' : 'product_brand_id'}"/>
  197. </filter>
  198. </field>
  199. </record>
  200. <!-- Product template inherited search view -->
  201. <record id="inherited_view_product_template_search_brand" model="ir.ui.view">
  202. <field name="name">product.template.search.brand</field>
  203. <field name="model">product.template</field>
  204. <field name="inherit_id" ref="product.product_template_search_view"/>
  205. <field name="arch" type="xml">
  206. <field name="name" position="after">
  207. <field name="product_brand_id"/>
  208. </field>
  209. <filter name="services" position='after'>
  210. <filter string="Brand" name="groupby_brand" domain="[]"
  211. context="{'group_by' : 'product_brand_id'}"/>
  212. </filter>
  213. </field>
  214. </record>
  215. <!-- Product product inherited search view -->
  216. <record id="inherited_product_template_form_brand_add" model="ir.ui.view">
  217. <field name="name">product.template.product.form</field>
  218. <field name="model">product.template</field>
  219. <field name="inherit_id" ref="product.product_template_form_view" />
  220. <field name="arch" type="xml">
  221. <field name="name" position="after" >
  222. <field name="product_brand_id" placeholder="Brand"/>
  223. </field>
  224. </field>
  225. </record>
  226. <!-- Product template inherited kanban view -->
  227. <record id="inherited_view_product_template_kanban_brand" model="ir.ui.view">
  228. <field name="name">product kanban view: add brand</field>
  229. <field name="model">product.template</field>
  230. <field name="inherit_id" ref="product.product_template_kanban_view" />
  231. <field name="arch" type="xml">
  232. <xpath expr="//div[@class='oe_kanban_details']/strong" position="after">
  233. <div>
  234. <a t-if="record.product_brand_id" type="action"
  235. name="%(action_open_single_product_brand)d">
  236. <field name="product_brand_id"/>
  237. </a>
  238. </div>
  239. </xpath>
  240. </field>
  241. </record>
  242. <!-- Product product inherited kanban view -->
  243. <record id="inherited_view_product_variant_kanban_brand" model="ir.ui.view">
  244. <field name="name">product variant kanban view: add brand</field>
  245. <field name="model">product.product</field>
  246. <field name="inherit_id" ref="product.product_kanban_view" />
  247. <field name="arch" type="xml">
  248. <xpath expr="//div[@class='oe_kanban_details']/strong" position="after">
  249. <div>
  250. <a t-if="record.product_brand_id" type="open">
  251. <field name="product_brand_id"/>
  252. </a>
  253. </div>
  254. </xpath>
  255. </field>
  256. </record>
  257. <!-- Product template inherited tree view -->
  258. <record id="inherited_view_product_template_tree_brand" model="ir.ui.view">
  259. <field name="name">product tree view: add brand</field>
  260. <field name="model">product.template</field>
  261. <field name="inherit_id" ref="product.product_template_tree_view" />
  262. <field name="arch" type="xml">
  263. <field name="name" position="after">
  264. <field name="product_brand_id"/>
  265. </field>
  266. </field>
  267. </record>
  268. <!-- Product product inherited tree view -->
  269. <record id="inherited_view_product_variant_tree_brand" model="ir.ui.view">
  270. <field name="name">product variant tree view: add brand</field>
  271. <field name="model">product.product</field>
  272. <field name="inherit_id" ref="product.product_product_tree_view" />
  273. <field name="arch" type="xml">
  274. <field name="name" position="after">
  275. <field name="product_brand_id"/>
  276. </field>
  277. </field>
  278. </record>
  279. <!-- Product brand action -->
  280. <record model="ir.actions.act_window" id="action_product_brand">
  281. <field name="name">Brands</field>
  282. <field name="res_model">product.brands</field>
  283. <field name="view_type">form</field>
  284. <field name="view_mode">kanban,form,tree</field>
  285. </record>
  286. <!-- Brand Menu -->
  287. <menuitem id="menu_product_brand"
  288. name="Product Brands"
  289. action="action_product_brand"
  290. parent="kingfisher_pro.menu_slider_config"/>
  291. <!-- Blog Slider -->
  292. <!-- Blog Slider Form View-->
  293. <record id="dynamic_blog_slider_form_view" model="ir.ui.view">
  294. <field name="name">dynamic.blog.slider.form.view</field>
  295. <field name="model">blog.slider.config</field>
  296. <field name="arch" type="xml">
  297. <form string="Blog Post Slider">
  298. <sheet>
  299. <group>
  300. <field name="name"/>
  301. <field name="active"/>
  302. <field name="no_of_counts"/>
  303. <field name="auto_rotate"/>
  304. <field name="sliding_speed"
  305. attrs="{'invisible': [('auto_rotate', '=', False)]}"/>
  306. <field name="collections_blog_post"
  307. widget="many2many_tags"/>
  308. </group>
  309. </sheet>
  310. </form>
  311. </field>
  312. </record>
  313. <!-- Blog Slider List View-->
  314. <record id="dynamic_blog_slider_list_view" model="ir.ui.view">
  315. <field name="name">dynamic.blog.slider.list.view</field>
  316. <field name="model">blog.slider.config</field>
  317. <field name="arch" type="xml">
  318. <tree string="Blog Post Slider">
  319. <field name="name"/>
  320. <field name="no_of_counts"/>
  321. </tree>
  322. </field>
  323. </record>
  324. <!-- Blog Slider Action -->
  325. <record id="dynamic_blog_slider_action" model="ir.actions.act_window">
  326. <field name="name">Blog Post Slider</field>
  327. <field name="type">ir.actions.act_window</field>
  328. <field name="res_model">blog.slider.config</field>
  329. <field name="view_type">form</field>
  330. <field name="view_mode">tree,form</field>
  331. <field name="view_id" eval="False"/>
  332. <field name="help" type="html">
  333. <p class="oe_view_nocontent_create">
  334. Click to define a new slider.
  335. </p>
  336. </field>
  337. </record>
  338. <!-- Blog slider main menu in config -->
  339. <menuitem id="dynamic_blog_slider_menu"
  340. name="Blog Slider Configuraton"
  341. action="dynamic_blog_slider_action"
  342. parent="website_blog.menu_website_blog_root"
  343. sequence="60"/>
  344. <!-- Multi Product Slider Form View-->
  345. <record id="multi_slider_form_view" model="ir.ui.view">
  346. <field name="name">multi.slider.form.view</field>
  347. <field name="model">multi.slider.config</field>
  348. <field name="arch" type="xml">
  349. <form string="Multi Slider">
  350. <sheet>
  351. <group>
  352. <field name="name"/>
  353. <field name="active"/>
  354. </group>
  355. <group string="Slider configuration">
  356. <field name="auto_rotate"/>
  357. <field name="sliding_speed"
  358. attrs="{'invisible': [('auto_rotate', '=', False)]}"/>
  359. </group>
  360. <group string="Collection configuration">
  361. <field name="no_of_collection"/>
  362. <field name="label_collection_1"
  363. attrs="{'invisible': [('no_of_collection', '=', False)]}"/>
  364. <field name="collection_1_ids"
  365. attrs="{'invisible': [('no_of_collection', '=', False)]}"
  366. widget='many2many_tags'/>
  367. <field name="label_collection_2"
  368. attrs="{'invisible': [('no_of_collection', '=', False)]}" />
  369. <field name="collection_2_ids"
  370. attrs="{'invisible': [('no_of_collection', '=', False)]}"
  371. widget='many2many_tags'/>
  372. <field name="label_collection_3"
  373. attrs="{'invisible': ['|', ('no_of_collection', '=', False),
  374. ('no_of_collection', 'not in', ('3', '4', '5'))],
  375. 'required': [('no_of_collection', 'in', ('3', '4', '5'))]}"/>
  376. <field name="collection_3_ids"
  377. attrs="{'invisible': ['|', ('no_of_collection', '=', False),
  378. ('no_of_collection', 'not in', ('3', '4', '5'))],
  379. 'required': ['|', ('no_of_collection', 'in', ('3', '4', '5'))]}"
  380. widget='many2many_tags'/>
  381. <field name="label_collection_4"
  382. attrs="{'invisible': ['|', ('no_of_collection', '=', False),
  383. ('no_of_collection', 'not in', ('4', '5'))],
  384. 'required': [('no_of_collection', 'in', ('4', '5'))]}"/>
  385. <field name="collection_4_ids"
  386. attrs="{'invisible': ['|', ('no_of_collection', '=', False),
  387. ('no_of_collection', 'not in', ('4', '5'))],
  388. 'required': [('no_of_collection', 'in', ('4', '5'))]}"
  389. widget='many2many_tags'/>
  390. <field name="label_collection_5"
  391. attrs="{'invisible': ['|', ('no_of_collection', '=', False),
  392. ('no_of_collection', '!=', '5')],
  393. 'required': [('no_of_collection', '=', '5')]}"/>
  394. <field name="collection_5_ids"
  395. attrs="{'invisible': ['|', ('no_of_collection', '=', False),
  396. ('no_of_collection', '!=', '5')],
  397. 'required': [('no_of_collection', '=', '5')]}"
  398. widget='many2many_tags'/>
  399. </group>
  400. </sheet>
  401. </form>
  402. </field>
  403. </record>
  404. <!-- Multi Product Slider List View-->
  405. <record id="multi_slider_list_view" model="ir.ui.view">
  406. <field name="name">multi.slider.list.view</field>
  407. <field name="model">multi.slider.config</field>
  408. <field name="arch" type="xml">
  409. <tree string="Dynamic Slider">
  410. <field name="name"/>
  411. <field name="active"/>
  412. <field name="no_of_collection"/>
  413. </tree>
  414. </field>
  415. </record>
  416. <!-- Multi Product Slider Action -->
  417. <record id="multi_slider_action" model="ir.actions.act_window">
  418. <field name="name">Multi Slider</field>
  419. <field name="type">ir.actions.act_window</field>
  420. <field name="res_model">multi.slider.config</field>
  421. <field name="view_type">form</field>
  422. <field name="view_mode">tree,form</field>
  423. <field name="view_id" eval="False"/>
  424. <field name="help" type="html">
  425. <p class="oe_view_nocontent_create">
  426. Click to define a new slider.
  427. </p>
  428. </field>
  429. </record>
  430. <!-- Main menu in config -->
  431. <menuitem id="multi_slider_menu"
  432. name="Multi Product Slider Configuraton"
  433. action="multi_slider_action"
  434. parent="kingfisher_pro.menu_slider_config"
  435. sequence="70"/>
  436. </data>
  437. </openerp>