slider.py 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. # -*- coding: utf-8 -*-
  2. # Part of Biztech Consultancy. See LICENSE file for full copyright and licensing details.
  3. from openerp import api, fields, models
  4. class ProductCategorySlider(models.Model):
  5. _name = 'product.category.slider.config'
  6. name = fields.Char(string="Nombre del Slider", default='Ultimas Tendencias de la Moda', required=True,
  7. translate=True,
  8. help="Nombre del Titulo que sera mostrado en la página web...")
  9. active = fields.Boolean(string="Activo", default=True)
  10. no_of_counts = fields.Selection([('3', '3'), ('4', '4'), ('5', '5'), ('6', '6')], string="Cantidad",
  11. default='4', required=True,
  12. help="Cantidad de Productos que seran mostrados en el slide.")
  13. prod_cat_type = fields.Selection([('product', 'Producto'), ('category', 'Categoria')],
  14. string="Tipo de Slider", default='product', required=True,
  15. help="Elija Producto o Categoira para mostrar en este slider.")
  16. auto_rotate = fields.Boolean(string='Auto Rotar Slider', default=True)
  17. sliding_speed = fields.Integer(string="Velocidad del Slider", default='5000',
  18. help='Velocidad del Slide en milisegundos.')
  19. collections_product = fields.Many2many('product.template', 'king_pro_product_slider_rel', 'slider_id',
  20. 'prod_id', string="Colecciones de Productos")
  21. collections_category = fields.Many2many('product.public.category', 'king_pro_category_slider_rel',
  22. 'slider_id', 'cat_id', string="Colecciones de Categorias")
  23. class BlogSlider(models.Model):
  24. _name = 'blog.slider.config'
  25. name = fields.Char(string="Nombre de Slider", default='Blogs', translate=True,
  26. help="Nombre del Slide que sera mostrado en la página web..",
  27. required=True)
  28. active = fields.Boolean(string="Activo", default=True)
  29. no_of_counts = fields.Selection([('1', '1'), ('2', '2'), ('3', '3')], string="Cantidad",
  30. default='3', help="Cantidad de Blogs que seran mostrados en la página web.", required=True)
  31. auto_rotate = fields.Boolean(string='Auto Rotar Slider', default=True)
  32. sliding_speed = fields.Integer(string="Velocidad del Slider", default='5000',
  33. help='Velocidad del Slider en milisegundos.')
  34. collections_blog_post = fields.Many2many('blog.post', 'blogpost_slider_rel', 'slider_id',
  35. 'post_id', string="Colecciones de publicaciones del blog", required=True)
  36. class MultiSlider(models.Model):
  37. _name = 'multi.slider.config'
  38. name = fields.Char(string="Nombre del Slider", default='Lanzamientos',
  39. required=True, translate=True,
  40. help="Slider title to be displayed on website like Best products, Latest and etc...")
  41. active = fields.Boolean(string="Activo", default=True)
  42. auto_rotate = fields.Boolean(string='Auto-rotar Slide', default=True)
  43. sliding_speed = fields.Integer(string="Velocidad de deslizamiento", default='5000',
  44. help='Velocidad del Slider en milisegundos.')
  45. no_of_collection = fields.Selection([('2', '2'), ('3', '3'), ('4', '4'), ('5', '5')],
  46. string="No. de Pestañas a Mostrar", default='2',
  47. required=True,
  48. help="Numero de Colecciones a mostrar.")
  49. label_collection_1 = fields.Char(string="1er pestaña a Motrar", default='Primera Colección',
  50. required=True, translate=True,
  51. help="Collection label to be displayed in website like Men, Women, Kids, etc...")
  52. collection_1_ids = fields.Many2many('product.template', 'product_slider_collection_1_rel', 'slider_id',
  53. 'prod_id',
  54. required=True,
  55. string="1ro Seleccionar Productos")
  56. label_collection_2 = fields.Char(string="2da pestaña a Motrar", default='Segunda Colección',
  57. required=True, translate=True,
  58. help="Collection label to be displayed in website like Men, Women, Kids, etc...")
  59. collection_2_ids = fields.Many2many('product.template', 'product_slider_collection_2_rel', 'slider_id',
  60. 'prod_id',
  61. required=True,
  62. string="2do Seleccionar Productos")
  63. label_collection_3 = fields.Char(string="3ra pestaña a Motrar", default='Tercera Colección',
  64. translate=True,
  65. # required=True,
  66. help="Collection label to be displayed in website like Men, Women, Kids, etc...")
  67. collection_3_ids = fields.Many2many('product.template', 'product_slider_collection_3_rel', 'slider_id',
  68. 'prod_id',
  69. # required=True,
  70. string="3ro. Seleccionar Productos")
  71. label_collection_4 = fields.Char(string="4th pestaña a Motrar", default='Cuarta Colección', translate=True,
  72. # required=True,
  73. help="Collection label to be displayed in website like Men, Women, Kids, etc...")
  74. collection_4_ids = fields.Many2many('product.template', 'product_slider_collection_4_rel', 'slider_id',
  75. 'prod_id',
  76. # required=True,
  77. string="4to Seleccionar Productos")
  78. label_collection_5 = fields.Char(string="5th pestaña a Motrar", default='Quita Colección', translate=True,
  79. # required=True,
  80. help="Collection label to be displayed in website like Men, Women, Kids, etc...")
  81. collection_5_ids = fields.Many2many('product.template', 'product_slider_collection_5_rel', 'slider_id',
  82. 'prod_id',
  83. # required=True,
  84. string="5to Seleccionar Productos")