@ -0,0 +1,49 @@ |
|||||
|
.. image:: https://img.shields.io/badge/license-LGPL--3-green.svg |
||||
|
:target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html |
||||
|
:alt: License: LGPL-3 |
||||
|
|
||||
|
Product 360 Degree View in Website |
||||
|
================================== |
||||
|
* This module allows to view the products in 360 degree, |
||||
|
we can see the all angles of the product by setting the different images. |
||||
|
|
||||
|
Configuration |
||||
|
============= |
||||
|
No additional configuration required |
||||
|
|
||||
|
Company |
||||
|
------- |
||||
|
* `Cybrosys Techno Solutions <https://cybrosys.com/>`__ |
||||
|
|
||||
|
License |
||||
|
------- |
||||
|
General Public License, Version 3 (LGPL v3). |
||||
|
(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) |
||||
|
|
||||
|
Credits |
||||
|
------- |
||||
|
Developer: V(16) Thasni CP, |
||||
|
V(17) Mufeeda Shirin , |
||||
|
V(18) Nivedhya T, |
||||
|
Contact : odoo@cybrosys.com |
||||
|
|
||||
|
Contacts |
||||
|
-------- |
||||
|
* Mail Contact : odoo@cybrosys.com |
||||
|
* Website : https://cybrosys.com |
||||
|
|
||||
|
Bug Tracker |
||||
|
----------- |
||||
|
Bugs are tracked on GitHub Issues. In case of trouble, please check there if your issue has already been reported. |
||||
|
|
||||
|
Maintainer |
||||
|
========== |
||||
|
.. image:: https://cybrosys.com/images/logo.png |
||||
|
:target: https://cybrosys.com |
||||
|
|
||||
|
This module is maintained by Cybrosys Technologies. |
||||
|
For support and more information, please visit `Our Website <https://cybrosys.com/>`__ |
||||
|
|
||||
|
Further information |
||||
|
=================== |
||||
|
HTML Description: `<static/description/index.html>`__ |
@ -0,0 +1,22 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Technologies(odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from .import models |
@ -0,0 +1,49 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Technologies(odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
{ |
||||
|
'name': "Product 360 Degree View in Website", |
||||
|
'version': '18.0.1.0.0', |
||||
|
'category': 'eCommerce', |
||||
|
'summary': """To see the product from all angles in eCommerce.""", |
||||
|
'description': "By configuring different photos, this module enables us to " |
||||
|
"view products in 360 degrees, giving us access to all" |
||||
|
" of their angles", |
||||
|
'author': 'Cybrosys Techno Solutions', |
||||
|
'company': 'Cybrosys Techno Solutions', |
||||
|
'maintainer': 'Cybrosys Techno Solutions', |
||||
|
'website': "https://www.cybrosys.com", |
||||
|
'depends': ['product', 'website_sale'], |
||||
|
'data': ['security/ir.model.access.csv', |
||||
|
'views/product_template_views.xml', |
||||
|
'views/product_product_views.xml', |
||||
|
'views/360_view_templates.xml', |
||||
|
], |
||||
|
'assets': {'web.assets_frontend': [ |
||||
|
'product_360_degree_view_in_website/static/src/js/360_view.js', |
||||
|
'product_360_degree_view_in_website/static/src/css/360_view.css' |
||||
|
], }, |
||||
|
'images': ['static/description/banner.jpg'], |
||||
|
'license': 'LGPL-3', |
||||
|
'installable': True, |
||||
|
'application': False, |
||||
|
'auto_install': False, |
||||
|
} |
@ -0,0 +1,7 @@ |
|||||
|
## Module <product_360_degree_view_in_website> |
||||
|
|
||||
|
#### 15.03.2025 |
||||
|
#### Version 18.0.1.0.0 |
||||
|
#### ADD |
||||
|
|
||||
|
- Initial commit for Product 360 Degree View in Website |
@ -0,0 +1,25 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Technologies(odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from . import image_view |
||||
|
from . import product_image_view |
||||
|
from . import product_product |
||||
|
from . import product_template |
@ -0,0 +1,37 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Technologies(odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class ImageView(models.Model): |
||||
|
"""To add multiple images in product form, so |
||||
|
this images can be seen in the form 360 degree view orderline in product.template""" |
||||
|
_name = 'image.view' |
||||
|
_description = 'Image View' |
||||
|
|
||||
|
image_130 = fields.Image(string="Image", attachment=True, required=True, |
||||
|
help="To add images of the product") |
||||
|
name = fields.Char(string='Label', required=True, |
||||
|
help='To identify the order of the images') |
||||
|
image_id = fields.Many2one('product.template', |
||||
|
string="Image view", |
||||
|
help='To get the relation of product template') |
@ -0,0 +1,38 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Technologies(odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class ProductImageView(models.Model): |
||||
|
"""To add multiple images in product form, so |
||||
|
this images can be seen in the form 360 degree view, orderline in product.product""" |
||||
|
_name = 'product.image.view' |
||||
|
_description = 'Product Image View' |
||||
|
|
||||
|
image_130 = fields.Image(string="Image", attachment=True, required=True, |
||||
|
help="To add images of the product") |
||||
|
name = fields.Char(string='Label', required=True, |
||||
|
help='To identify the order of the images') |
||||
|
product_image_id = fields.Many2one('product.product', |
||||
|
string="Image view", |
||||
|
help='To get the relation of ' |
||||
|
'product template') |
@ -0,0 +1,39 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Technologies(odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class ProductProduct(models.Model): |
||||
|
"""If we check the display 360 image it will |
||||
|
show a page to add images in product .template """ |
||||
|
_inherit = 'product.product' |
||||
|
|
||||
|
product_image_view_ids = fields.One2many('product.image.view', |
||||
|
'product_image_id', |
||||
|
string="Image lines", |
||||
|
help="To add different dimensions " |
||||
|
"of the product") |
||||
|
is_boolean = fields.Boolean(string='Display 360° Image', |
||||
|
help='After enabling this field we can see a' |
||||
|
' tab for adding images for the product') |
||||
|
is_stop = fields.Boolean(string='STOP', |
||||
|
help='To set the views to stop') |
@ -0,0 +1,38 @@ |
|||||
|
# -*- coding: utf-8 -*- |
||||
|
############################################################################# |
||||
|
# |
||||
|
# Cybrosys Technologies Pvt. Ltd. |
||||
|
# |
||||
|
# Copyright (C) 2025-TODAY Cybrosys Technologies(<https://www.cybrosys.com>) |
||||
|
# Author: Cybrosys Technologies(odoo@cybrosys.com) |
||||
|
# |
||||
|
# You can modify it under the terms of the GNU LESSER |
||||
|
# GENERAL PUBLIC LICENSE (LGPL v3), Version 3. |
||||
|
# |
||||
|
# This program is distributed in the hope that it will be useful, |
||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
|
# GNU LESSER GENERAL PUBLIC LICENSE (LGPL v3) for more details. |
||||
|
# |
||||
|
# You should have received a copy of the GNU LESSER GENERAL PUBLIC LICENSE |
||||
|
# (LGPL v3) along with this program. |
||||
|
# If not, see <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################# |
||||
|
from odoo import fields, models |
||||
|
|
||||
|
|
||||
|
class ProductTemplate(models.Model): |
||||
|
"""If we check the display 360 image it will |
||||
|
show a page to add images in product.template """ |
||||
|
_inherit = 'product.template' |
||||
|
|
||||
|
image_view_ids = fields.One2many('image.view', 'image_id', |
||||
|
string="Image lines", |
||||
|
help="To add different dimensions " |
||||
|
"of the product") |
||||
|
is_boolean = fields.Boolean(string='Display 360° Image', |
||||
|
help='After enabling this field we can see a' |
||||
|
' tab for adding images for the product') |
||||
|
is_stop = fields.Boolean(string='STOP', |
||||
|
help='To set the views to stop') |
|
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 28 KiB |
After Width: | Height: | Size: 628 KiB |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 210 KiB |
After Width: | Height: | Size: 209 KiB |
After Width: | Height: | Size: 109 KiB |
After Width: | Height: | Size: 495 B |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 624 B |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 214 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 929 B |
After Width: | Height: | Size: 1.3 KiB |
After Width: | Height: | Size: 3.3 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 542 B |
After Width: | Height: | Size: 576 B |
After Width: | Height: | Size: 733 B |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 4.0 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 453 KiB |
After Width: | Height: | Size: 2.2 KiB |
After Width: | Height: | Size: 911 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 600 B |
After Width: | Height: | Size: 673 B |
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 462 B |
After Width: | Height: | Size: 2.1 KiB |
After Width: | Height: | Size: 926 B |
After Width: | Height: | Size: 9.0 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 878 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 653 B |
After Width: | Height: | Size: 800 B |
After Width: | Height: | Size: 905 B |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 839 B |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 5.9 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 34 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 1.9 KiB |
After Width: | Height: | Size: 2.3 KiB |
After Width: | Height: | Size: 427 B |
After Width: | Height: | Size: 627 B |
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 988 B |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 875 B |
After Width: | Height: | Size: 1.2 KiB |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 93 KiB |
After Width: | Height: | Size: 93 KiB |
After Width: | Height: | Size: 189 KiB |
After Width: | Height: | Size: 85 KiB |
After Width: | Height: | Size: 1.0 MiB |
After Width: | Height: | Size: 115 KiB |
After Width: | Height: | Size: 154 KiB |
After Width: | Height: | Size: 202 KiB |
After Width: | Height: | Size: 255 KiB |
After Width: | Height: | Size: 252 KiB |
After Width: | Height: | Size: 251 KiB |
After Width: | Height: | Size: 245 KiB |
After Width: | Height: | Size: 880 KiB |
After Width: | Height: | Size: 761 KiB |
After Width: | Height: | Size: 82 KiB |
@ -0,0 +1,23 @@ |
|||||
|
@charset "utf-8"; |
||||
|
body, ul, li { |
||||
|
margin: 0; |
||||
|
padding: 0; |
||||
|
} |
||||
|
ul, li { |
||||
|
list-style: none; |
||||
|
} |
||||
|
#image_360 { |
||||
|
width: 400px; |
||||
|
|
||||
|
margin: 30px auto 0; |
||||
|
overflow: hidden; |
||||
|
} |
||||
|
#image_360 ul { |
||||
|
width: 400px; |
||||
|
height: 280px; |
||||
|
} |
||||
|
#image_360 ul li img { |
||||
|
display: block; |
||||
|
width: 400px; |
||||
|
height: 280px; |
||||
|
} |
@ -0,0 +1,52 @@ |
|||||
|
/** @odoo-module **/ |
||||
|
import publicWidget from "@web/legacy/js/public/public_widget"; |
||||
|
var pic_W = $('.list').width() / 2; |
||||
|
var center_X = 0 + pic_W; |
||||
|
var movestop = pic_W / 10; |
||||
|
|
||||
|
publicWidget.registry.product_view = publicWidget.Widget.extend({ |
||||
|
selector: '.degree_360_view', |
||||
|
events: { |
||||
|
'mousemove.list': 'Move360Image', |
||||
|
'click .360_view': '_360ViewClick', |
||||
|
'click .stop_view': '_stopViewClick', |
||||
|
}, |
||||
|
setup: function () { |
||||
|
// Calling the moveImg function
|
||||
|
this._super.apply(this, arguments); |
||||
|
this.moveImg(); |
||||
|
}, |
||||
|
// Function for calculating the movements of the picture
|
||||
|
moveImg: function (m_X, m_Y, dir) { |
||||
|
var index = Math.ceil(Math.abs(m_X - center_X) / movestop); |
||||
|
if (dir) { |
||||
|
this.$el.find('.list li').eq(index).show().siblings().hide(); |
||||
|
} else { |
||||
|
this.$el.find('.list li').eq(18 - index).show().siblings().hide(); |
||||
|
} |
||||
|
}, |
||||
|
// Mousemove of the image
|
||||
|
Move360Image: function (ev) { |
||||
|
var mouse_X = ev.pageX; |
||||
|
var mouse_Y = ev.pageY; |
||||
|
if (mouse_X - center_X <= 0) { |
||||
|
this.moveImg(mouse_X, mouse_Y, 'left'); |
||||
|
} else { |
||||
|
this.moveImg(mouse_X, mouse_Y); |
||||
|
} |
||||
|
}, |
||||
|
// Click function of the image to change the 360 degree
|
||||
|
_360ViewClick: function (ev) { |
||||
|
this.$el.find('.carousel-inner, .product_detail_img').css({ 'display': 'none' }); |
||||
|
this.$el.find('#image_360').css({ 'display': 'block' }); |
||||
|
this.$el.find('.360_view').addClass('d-none'); // Hide the 360 view button
|
||||
|
this.$el.find('.stop_view').removeClass('d-none'); // Show the stop button
|
||||
|
}, |
||||
|
// Function for the button stop
|
||||
|
_stopViewClick: function (ev) { |
||||
|
this.$el.find('#image_360').css({ 'display': 'none' }); |
||||
|
this.$el.find('.product_detail_img').css({ 'display': 'block' }); |
||||
|
this.$el.find('.stop_view').addClass('d-none'); // Hide the stop button
|
||||
|
this.$el.find('.360_view').removeClass('d-none'); // Show the 360 view button
|
||||
|
}, |
||||
|
}); |
@ -0,0 +1,46 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8" ?> |
||||
|
<!--TO VIEW THE PRODUCT IN 360 DEGREE FORM IN WEBSITE --> |
||||
|
<odoo> |
||||
|
<template id="product_image_360" name="Add to wishlist in product page" |
||||
|
inherit_id="website_sale.product"> |
||||
|
<xpath expr="//section[@id='product_detail']/div[last()]/div[1]" |
||||
|
position="replace"> |
||||
|
<div class="col-sm-6 degree_360_view"> |
||||
|
<div> |
||||
|
<br/> |
||||
|
<t t-if="product.is_boolean==True"> |
||||
|
<div class="360_view" |
||||
|
style="float: right;cursor: pointer;"> |
||||
|
<button class="btn btn-primary d-block">360° |
||||
|
<i class="fa fa-spinner"/> |
||||
|
</button> |
||||
|
</div> |
||||
|
</t> |
||||
|
<button class="btn btn-primary d-none stop_view">Stop |
||||
|
</button> |
||||
|
</div> |
||||
|
<br/> |
||||
|
<span itemprop="image" |
||||
|
t-attf-content="{{request.httprequest.url}}web/image/product.template/{{product.id}}/image_1920" |
||||
|
t-field="product.image_1920" |
||||
|
t-options="{'widget': 'image', 'class': 'product_detail_img', 'alt-field': 'name'}"/> |
||||
|
<div class="slide"> |
||||
|
<div class="carousel-outer"> |
||||
|
<div id="image_360" class="menu carousel-inner" |
||||
|
style="display:none;"> |
||||
|
<ul class="list"> |
||||
|
<t t-foreach="product.image_view_ids" |
||||
|
t-as="webimg"> |
||||
|
<li> |
||||
|
<img t-attf-src="data:image_130/png;base64,{{webimg['image_130']}}" |
||||
|
class="img img-fluid o_image_130"/> |
||||
|
</li> |
||||
|
</t> |
||||
|
</ul> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</xpath> |
||||
|
</template> |
||||
|
</odoo> |
@ -0,0 +1,30 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8" ?> |
||||
|
<!--TO ADD PICTURES IN PRODUCT PRODUCT FORM--> |
||||
|
<odoo> |
||||
|
<record id="product_normal_form_view" model="ir.ui.view"> |
||||
|
<field name="name"> |
||||
|
product.product.view.form.view.inherit.product.360.degree.view.in.website |
||||
|
</field> |
||||
|
<field name="model">product.product</field> |
||||
|
<field name="inherit_id" ref="product.product_normal_form_view"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//field[@name='sale_ok']" position="before"> |
||||
|
<field name="is_boolean"/> |
||||
|
<label for="is_boolean" string="Display 360° Image"/> |
||||
|
</xpath> |
||||
|
<xpath expr="//page[@name='inventory']" position="after"> |
||||
|
<page name="360_view" |
||||
|
string="360° View" |
||||
|
invisible=" not is_boolean "> |
||||
|
<field name="product_image_view_ids"> |
||||
|
<list editable="bottom"> |
||||
|
<field name="name"/> |
||||
|
<field name="image_130" widget="image" |
||||
|
class="oe_avatar"/> |
||||
|
</list> |
||||
|
</field> |
||||
|
</page> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |
@ -0,0 +1,30 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8" ?> |
||||
|
<!--TO ADD PICTURES IN PRODUCT TEMPLATE FORM--> |
||||
|
<odoo> |
||||
|
<record id="product_template_only_form_view" model="ir.ui.view"> |
||||
|
<field name="name"> |
||||
|
product.template.view.form.view.inherit.product.360.degree.view.in.website |
||||
|
</field> |
||||
|
<field name="model">product.template</field> |
||||
|
<field name="inherit_id" ref="product.product_template_only_form_view"/> |
||||
|
<field name="arch" type="xml"> |
||||
|
<xpath expr="//field[@name='sale_ok']" position="before"> |
||||
|
<field name="is_boolean"/> |
||||
|
<label for="is_boolean" string="Display 360° Image"/> |
||||
|
</xpath> |
||||
|
<xpath expr="//page[@name='inventory']" position="before"> |
||||
|
<page name="360_view" |
||||
|
string="360° View" |
||||
|
invisible=" not is_boolean"> |
||||
|
<field name="image_view_ids"> |
||||
|
<list editable="bottom"> |
||||
|
<field name="name"/> |
||||
|
<field name="image_130" widget="image" |
||||
|
class="oe_avatar"/> |
||||
|
</list> |
||||
|
</field> |
||||
|
</page> |
||||
|
</xpath> |
||||
|
</field> |
||||
|
</record> |
||||
|
</odoo> |