diff --git a/default_product_image/README.rst b/default_product_image/README.rst deleted file mode 100644 index 88b6133..0000000 --- a/default_product_image/README.rst +++ /dev/null @@ -1,50 +0,0 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 - -Default product image v16 -=========================== -You my have some issue to customize the default image of your products, -this module will helpe you to add default image (your logo or custom image) to your products. - -Installation -============ -* Just install the module. - -Configuration -============= -* Go to Setting -* Choose your image in "default image" section -* Enjoy the module ! - -Company -------- -* `Imal-Tech `__ - - -Credits -------- -* Developers: - Version 16: Imal-tech team @imaltech - -Contacts --------- -* Mail Contact : contact@imal-tech.com -* Website : https://imal-tech.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://imal-tech.com/wp-content/uploads/2021/01/imal-tech-logo-.gif - :target: https://imal-tech.com - -This module is maintained by Imal-tech. - -For support and more information, please visit `Our Website `__ - -Further information -=================== -HTML Description: ``__ \ No newline at end of file diff --git a/default_product_image/__init__.py b/default_product_image/__init__.py deleted file mode 100755 index 5305644..0000000 --- a/default_product_image/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -# -*- coding: utf-8 -*- - -from . import models \ No newline at end of file diff --git a/default_product_image/__manifest__.py b/default_product_image/__manifest__.py deleted file mode 100755 index e894592..0000000 --- a/default_product_image/__manifest__.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -{ - 'name': 'Default Product Image', - 'description': """ - This module will help you to add default image to products with no images. - """, - 'summary': 'Module to help you add default image to products', - 'author': 'Imal-Tech', - 'website': 'https://www.imal-tech.com', - 'maintainer': 'Imal-Tech', - 'category': 'Sales', - 'version': '16.0.1.0.0', - 'depends': ['base', 'sale_management'], - 'data': [ - 'views/res_config_views.xml', - ], - 'license': 'LGPL-3', - 'images': ['static/description/banner.gif'], - 'installable': True, - 'application': False, - 'auto_install': False, -} \ No newline at end of file diff --git a/default_product_image/i18n/fr.po b/default_product_image/i18n/fr.po deleted file mode 100644 index b02ee91..0000000 --- a/default_product_image/i18n/fr.po +++ /dev/null @@ -1,49 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * default_product_image -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 16.0\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-11-15 15:43+0000\n" -"PO-Revision-Date: 2022-11-15 15:43+0000\n" -"Last-Translator: \n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: default_product_image -#: model_terms:ir.ui.view,arch_db:default_product_image.res_config_settings_view_form_default_image -msgid "" -"" -msgstr "" - -#. module: default_product_image -#: model_terms:ir.ui.view,arch_db:default_product_image.res_config_settings_view_form_default_image -msgid "Add the default image to products." -msgstr "Ajoutez l'image par défaut aux produits." - -#. module: default_product_image -#: model:ir.model,name:default_product_image.model_res_config_settings -msgid "Config Settings" -msgstr "Paramètres de config" - -#. module: default_product_image -#: model:ir.model.fields,field_description:default_product_image.field_res_config_settings__product_default_image -#: model_terms:ir.ui.view,arch_db:default_product_image.res_config_settings_view_form_default_image -msgid "Default Image" -msgstr "Image par défaut" - -#. module: default_product_image -#: model_terms:ir.ui.view,arch_db:default_product_image.res_config_settings_view_form_default_image -msgid "Default image" -msgstr "Image par défaut" - -#. module: default_product_image -#: model:ir.model,name:default_product_image.model_product_template -msgid "Product" -msgstr "Article" \ No newline at end of file diff --git a/default_product_image/models/__init__.py b/default_product_image/models/__init__.py deleted file mode 100755 index c54cced..0000000 --- a/default_product_image/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# -*- coding: utf-8 -*- - -from . import res_config -from . import product_template \ No newline at end of file diff --git a/default_product_image/models/product_template.py b/default_product_image/models/product_template.py deleted file mode 100755 index 99167ef..0000000 --- a/default_product_image/models/product_template.py +++ /dev/null @@ -1,19 +0,0 @@ -# -*- coding: utf-8 -*- - -from odoo import models, fields, api, tools - - -class ProductTemplate(models.Model): - """ Inherit Product Template Settings to add default image product from setting """ - _inherit = "product.template" - - @api.model_create_multi - def create(self, vals_list): - for val_list in vals_list: - if not val_list['image_1920']: - product_default_image = self.env['ir.config_parameter'].sudo().get_param( - 'res.config.settings.product_default_image') - if product_default_image: - val_list['image_1920'] = product_default_image - - return super(ProductTemplate, self).create(vals_list) diff --git a/default_product_image/models/res_config.py b/default_product_image/models/res_config.py deleted file mode 100755 index e56d993..0000000 --- a/default_product_image/models/res_config.py +++ /dev/null @@ -1,24 +0,0 @@ -# -*- coding: utf-8 -*- - -from odoo import models, fields, _, api - - -class ResConfig(models.TransientModel): - """ Inherit Res Config Settings to add default image product field """ - _inherit = 'res.config.settings' - - product_default_image = fields.Binary(string="Default Image") - - @api.model - def get_values(self): - res = super(ResConfig, self).get_values() - res.update( - product_default_image=self.env['ir.config_parameter'].sudo().get_param( - 'res.config.settings.product_default_image'), - ) - return res - - def set_values(self): - super(ResConfig, self).set_values() - param = self.env['ir.config_parameter'].sudo() - param.set_param('res.config.settings.product_default_image', self.product_default_image) diff --git a/default_product_image/security/ir.model.access.csv b/default_product_image/security/ir.model.access.csv deleted file mode 100755 index 97dd8b9..0000000 --- a/default_product_image/security/ir.model.access.csv +++ /dev/null @@ -1 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink diff --git a/default_product_image/static/description/banner.gif b/default_product_image/static/description/banner.gif deleted file mode 100644 index ece8362..0000000 Binary files a/default_product_image/static/description/banner.gif and /dev/null differ diff --git a/default_product_image/static/description/icon.png b/default_product_image/static/description/icon.png deleted file mode 100644 index c73dd95..0000000 Binary files a/default_product_image/static/description/icon.png and /dev/null differ diff --git a/default_product_image/static/description/images/Imal-Tech_default_product_setting.png b/default_product_image/static/description/images/Imal-Tech_default_product_setting.png deleted file mode 100644 index bb6e7b4..0000000 Binary files a/default_product_image/static/description/images/Imal-Tech_default_product_setting.png and /dev/null differ diff --git a/default_product_image/static/description/images/agriculture.png b/default_product_image/static/description/images/agriculture.png deleted file mode 100755 index 0bc1e5e..0000000 Binary files a/default_product_image/static/description/images/agriculture.png and /dev/null differ diff --git a/default_product_image/static/description/images/e-commerce.png b/default_product_image/static/description/images/e-commerce.png deleted file mode 100755 index f8dc7fd..0000000 Binary files a/default_product_image/static/description/images/e-commerce.png and /dev/null differ diff --git a/default_product_image/static/description/images/e-learning.png b/default_product_image/static/description/images/e-learning.png deleted file mode 100755 index 4af617b..0000000 Binary files a/default_product_image/static/description/images/e-learning.png and /dev/null differ diff --git a/default_product_image/static/description/images/hotel.png b/default_product_image/static/description/images/hotel.png deleted file mode 100755 index 6a7df99..0000000 Binary files a/default_product_image/static/description/images/hotel.png and /dev/null differ diff --git a/default_product_image/static/description/images/logo_imal-tech.png b/default_product_image/static/description/images/logo_imal-tech.png deleted file mode 100755 index 7f3cb64..0000000 Binary files a/default_product_image/static/description/images/logo_imal-tech.png and /dev/null differ diff --git a/default_product_image/static/description/images/manufacturing.png b/default_product_image/static/description/images/manufacturing.png deleted file mode 100755 index e028b8e..0000000 Binary files a/default_product_image/static/description/images/manufacturing.png and /dev/null differ diff --git a/default_product_image/static/description/images/odoo_customization.png b/default_product_image/static/description/images/odoo_customization.png deleted file mode 100755 index 5d825f6..0000000 Binary files a/default_product_image/static/description/images/odoo_customization.png and /dev/null differ diff --git a/default_product_image/static/description/images/odoo_implementation.png b/default_product_image/static/description/images/odoo_implementation.png deleted file mode 100755 index 4b7e61c..0000000 Binary files a/default_product_image/static/description/images/odoo_implementation.png and /dev/null differ diff --git a/default_product_image/static/description/images/odoo_integration.png b/default_product_image/static/description/images/odoo_integration.png deleted file mode 100755 index c805f15..0000000 Binary files a/default_product_image/static/description/images/odoo_integration.png and /dev/null differ diff --git a/default_product_image/static/description/images/odoo_support.png b/default_product_image/static/description/images/odoo_support.png deleted file mode 100755 index e59e3fb..0000000 Binary files a/default_product_image/static/description/images/odoo_support.png and /dev/null differ diff --git a/default_product_image/static/description/images/pos.png b/default_product_image/static/description/images/pos.png deleted file mode 100755 index 766b694..0000000 Binary files a/default_product_image/static/description/images/pos.png and /dev/null differ diff --git a/default_product_image/static/description/images/restaurant.png b/default_product_image/static/description/images/restaurant.png deleted file mode 100755 index 6bb0772..0000000 Binary files a/default_product_image/static/description/images/restaurant.png and /dev/null differ diff --git a/default_product_image/static/description/images/service_managment.png b/default_product_image/static/description/images/service_managment.png deleted file mode 100755 index 1f00d3a..0000000 Binary files a/default_product_image/static/description/images/service_managment.png and /dev/null differ diff --git a/default_product_image/static/description/index.html b/default_product_image/static/description/index.html deleted file mode 100755 index e0d3a1a..0000000 --- a/default_product_image/static/description/index.html +++ /dev/null @@ -1,432 +0,0 @@ -
-
-
-
- -
-
-
- Community -
-
- Enterprise -
-
-
-
-
- - - - - - -
-
-

Key - Overview

-
-
-
-

This module will help you to add default image to products with no images. -

-
-
- - - -
-
-

Key - Features

-
-
-
-
- -
-
-

- Community & Enterprise Support

-

- Available in Odoo 16.0 Community and Enterprise.

-
-
-
-
- -
-
-

- Config default product

-

- Product images will automatically change when you change Default Product Image in the sale configuration page.

-
-
-
- - -
-
-

Key - Screenshots

-
-
- -
-

- Setting

- -
-
- -
-

Our - Services

-
- -
- -
-
-

Our - Industries

-
- -
-
-
-
- Service Management
-
-
-

- - Service Management

-

- Keep track of services and invoice accordingly.

-
-
-
-
-
- Odoo Industry -
-
-
-

- - Hotel Management

-

- An all-inclusive hotel management application.

-
-
-
-
-
- - Odoo Manufacturing
-
-
-

- - Manufacturing

-

- Plan, track and schedule your operations.

-
-
-
-
-
- Odoo Restaurant
-
-
-

- - Restaurant

-

- Run your bar or restaurant methodical.

-
-
-
-
-
- Odoo POS
-
-
-

- - POS

-

- Mobile friendly, awe-inspiring product pages.

-
-
-
-
-
- - Odoo E-commerce
-
-
-

- - E-commerce & Website

-

- An all-inclusive hotel management application.

-
-
-
-
-
- - Odoo Agriculture
-
-
-

- - Agriculture management

-

- Run efficiently your agriculture's products & farms

-
-
-
-
-
- Odoo Education
-
-
-

- - Education

-

- A Collaborative platform for educational management.

-
-
-
-
- -
-
-
-
-

Need Any - Help?

-
-

If you have anything to share with us based on your use of this module, please - let us know. We are ready to offer our support.

-
-
-
- - - -
-
-
Visit us
-

Visit our website for more - information.

- - www.imal-tech.com - -
-
-
Write to us
-

Do you have any queries regarding our - products & services? Let us know.

- contact@imal-tech.com -
- -
-
Follow Us
-

Follow us on social media for latest - updates.

-
-
-
-
-
-
- - - - - - - - -
-
-
- -
-
-
- - - -
- -
-
\ No newline at end of file diff --git a/default_product_image/views/res_config_views.xml b/default_product_image/views/res_config_views.xml deleted file mode 100755 index cf92a2f..0000000 --- a/default_product_image/views/res_config_views.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - res.config.settings.view.form.inherit.sale.frequent - res.config.settings - - - - -

Default image

-
-
-
-
-
-
-
-
-
\ No newline at end of file diff --git a/product_import/README.rst b/product_import/README.rst deleted file mode 100644 index dca56bf..0000000 --- a/product_import/README.rst +++ /dev/null @@ -1,49 +0,0 @@ -.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 - -Product Image from URL -====================== -Product Image from URL and Path - -Configuration -============= -* No additional configurations needed - -Company -------- -* `Cybrosys Techno Solutions `__ - -License -------- -GNU AFFERO GENERAL PUBLIC LICENSE Version 3 (AGPL v3) -(https://www.odoo.com/documentation/user/16.0/legal/licenses/licenses.html) - -Credits -------- -* Developers: Mohammed Shahil MP @cybrosys, Contact: odoo@cybrosys.com - (V14) Minhaj T @cybrosys, Contact: odoo@cybrosys.com - (V15) Minhaj T @cybrosys, Contact: odoo@cybrosys.com - (V16) Amaya Aravind EV @cybrosys, 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 `__ - -Further information -=================== -HTML Description: ``__ diff --git a/product_import/__init__.py b/product_import/__init__.py deleted file mode 100644 index 370a5f6..0000000 --- a/product_import/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################# -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2019-TODAY Cybrosys Technologies(). -# Author: Mohammed Shahil MP @cybrosys(odoo@cybrosys.com) -# -# You can modify it under the terms of the GNU AFFERO -# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. -# -# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE -# (AGPL v3) along with this program. -# If not, see . -# -############################################################################# -from . import models -from . import wizard diff --git a/product_import/__manifest__.py b/product_import/__manifest__.py deleted file mode 100644 index 639860a..0000000 --- a/product_import/__manifest__.py +++ /dev/null @@ -1,47 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################# -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2022-TODAY Cybrosys Technologies(). -# Author: Mohammed Shahil MP @cybrosys(odoo@cybrosys.com) -# -# You can modify it under the terms of the GNU AFFERO -# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. -# -# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE -# (AGPL v3) along with this program. -# If not, see . -# -############################################################################# -{ - 'name': 'Product Image from URL', - 'version': '16.0.1.1.1', - 'category': 'Sales', - 'summary': 'Product Images from Web URL and Path', - 'description': 'users can effortlessly import images by providing a web ' - 'URL, ensuring swift retrieval from online sources. ' - 'Simultaneously, users can opt for a local import, simply ' - 'specifying the file path.', - 'author': 'Cybrosys Techno Solutions', - 'company': 'Cybrosys Techno Solutions', - 'maintainer': 'Cybrosys Techno Solutions', - 'website': 'https://www.cybrosys.com', - 'depends': ['sale_management'], - 'data': [ - 'security/ir.model.access.csv', - 'views/product_product_views.xml', - 'views/product_template_views.xml', - 'wizard/product_import_views.xml', - ], - 'images': ['static/description/banner.png'], - 'license': 'AGPL-3', - 'installable': True, - 'auto_install': False, - 'application': False, -} diff --git a/product_import/demo/phone.jpeg b/product_import/demo/phone.jpeg deleted file mode 100644 index d2aadaa..0000000 Binary files a/product_import/demo/phone.jpeg and /dev/null differ diff --git a/product_import/demo/product.csv b/product_import/demo/product.csv deleted file mode 100644 index ff4e78c..0000000 --- a/product_import/demo/product.csv +++ /dev/null @@ -1,4 +0,0 @@ -Product name,product type,Barcode,Price,Image -Laptop,consu,5465465554,25000,https://images-na.ssl-images-amazon.com/images/I/81xe3aoU6BL._AC_SL1500_.jpg -smart phone,product,7081234174,35000,/home/cybrosys/Desktop/phone.jpeg -bike,service,8720132165,2700, diff --git a/product_import/demo/product.xlsx b/product_import/demo/product.xlsx deleted file mode 100644 index 7dc4ac3..0000000 Binary files a/product_import/demo/product.xlsx and /dev/null differ diff --git a/product_import/demo/watch.jpg b/product_import/demo/watch.jpg deleted file mode 100644 index 13651c9..0000000 Binary files a/product_import/demo/watch.jpg and /dev/null differ diff --git a/product_import/models/__init__.py b/product_import/models/__init__.py deleted file mode 100644 index a95b0d2..0000000 --- a/product_import/models/__init__.py +++ /dev/null @@ -1,23 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################# -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2019-TODAY Cybrosys Technologies(). -# Author: Mohammed Shahil MP @cybrosys(odoo@cybrosys.com) -# -# You can modify it under the terms of the GNU AFFERO -# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. -# -# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE -# (AGPL v3) along with this program. -# If not, see . -# -############################################################################# -from . import product_product -from . import product_template diff --git a/product_import/models/product_product.py b/product_import/models/product_product.py deleted file mode 100644 index 6a58e8a..0000000 --- a/product_import/models/product_product.py +++ /dev/null @@ -1,64 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################# -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2019-TODAY Cybrosys Technologies(). -# Author: Mohammed Shahil MP @cybrosys(odoo@cybrosys.com) -# -# You can modify it under the terms of the GNU AFFERO -# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. -# -# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE -# (AGPL v3) along with this program. -# If not, see . -# -############################################################################# -import base64 -import certifi -import urllib3 -from odoo import api, fields, models, _ -from odoo.exceptions import UserError - - -class ProductProduct(models.Model): - """Inherit the model to add fields and function""" - _inherit = 'product.product' - - image_url = fields.Char(string='Image URL', help='Image URL or Path') - image_added = fields.Binary("Image (1920x1920)", - compute='_compute_image_added', store=True) - - @api.depends('image_url') - def _compute_image_added(self): - """ Function to load an image from URL or local file path """ - image = False - if self.image_url: - if self.image_url.startswith(('http://', 'https://')): - # Load image from URL - try: - http = urllib3.PoolManager(cert_reqs='CERT_REQUIRED', - ca_certs=certifi.where()) - image_response = http.request('GET', self.image_url) - image = base64.b64encode(image_response.data) - except Exception as e: - # Handle URL loading errors - raise UserError( - _(f"Error loading image from URL: {str(e)}")) - else: - # Load image from local file path - try: - with open(self.image_url, 'rb') as image_file: - image = base64.b64encode(image_file.read()) - except Exception as e: - # Handle local file loading errors - raise UserError( - _(f"Error loading image from local path: {str(e)}")) - image_added = image - if image_added: - self.image_1920 = image_added diff --git a/product_import/models/product_template.py b/product_import/models/product_template.py deleted file mode 100644 index 00d900c..0000000 --- a/product_import/models/product_template.py +++ /dev/null @@ -1,64 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################# -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2019-TODAY Cybrosys Technologies(). -# Author: Mohammed Shahil MP @cybrosys(odoo@cybrosys.com) -# -# You can modify it under the terms of the GNU AFFERO -# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. -# -# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE -# (AGPL v3) along with this program. -# If not, see . -# -############################################################################# -import base64 -import certifi -import urllib3 -from odoo import api, fields, models, _ -from odoo.exceptions import UserError - - -class ProductTemplate(models.Model): - """Inherit the model to add fields and function""" - _inherit = 'product.template' - - image_url = fields.Char(string='Image URL', help='Image URL or Path') - image_added = fields.Binary("Image (1920x1920)", - compute='_compute_image_added', store=True) - - @api.depends('image_url') - def _compute_image_added(self): - """ Function to load an image from URL or local file path """ - image = False - if self.image_url: - if self.image_url.startswith(('http://', 'https://')): - # Load image from URL - try: - http = urllib3.PoolManager(cert_reqs='CERT_REQUIRED', - ca_certs=certifi.where()) - image_response = http.request('GET', self.image_url) - image = base64.b64encode(image_response.data) - except Exception as e: - # Handle URL loading errors - raise UserError( - _(f"Error loading image from URL: {str(e)}")) - else: - # Load image from local file path - try: - with open(self.image_url, 'rb') as image_file: - image = base64.b64encode(image_file.read()) - except Exception as e: - # Handle local file loading errors - raise UserError( - _(f"Error loading image from local path: {str(e)}")) - image_added = image - if image_added: - self.image_1920 = image_added diff --git a/product_import/security/ir.model.access.csv b/product_import/security/ir.model.access.csv deleted file mode 100644 index 4c768f5..0000000 --- a/product_import/security/ir.model.access.csv +++ /dev/null @@ -1,2 +0,0 @@ -id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_product_import,access.product.import,model_product_import,base.group_user,1,1,1,1 diff --git a/product_import/static/description/assets/icons/check.png b/product_import/static/description/assets/icons/check.png deleted file mode 100644 index c8e85f5..0000000 Binary files a/product_import/static/description/assets/icons/check.png and /dev/null differ diff --git a/product_import/static/description/assets/icons/chevron.png b/product_import/static/description/assets/icons/chevron.png deleted file mode 100644 index 2089293..0000000 Binary files a/product_import/static/description/assets/icons/chevron.png and /dev/null differ diff --git a/product_import/static/description/assets/icons/cogs.png b/product_import/static/description/assets/icons/cogs.png deleted file mode 100644 index 95d0bad..0000000 Binary files a/product_import/static/description/assets/icons/cogs.png and /dev/null differ diff --git a/product_import/static/description/assets/icons/consultation.png b/product_import/static/description/assets/icons/consultation.png deleted file mode 100644 index 8319d4b..0000000 Binary files a/product_import/static/description/assets/icons/consultation.png and /dev/null differ diff --git a/product_import/static/description/assets/icons/ecom-black.png b/product_import/static/description/assets/icons/ecom-black.png deleted file mode 100644 index a9385ff..0000000 Binary files a/product_import/static/description/assets/icons/ecom-black.png and /dev/null differ diff --git a/product_import/static/description/assets/icons/education-black.png b/product_import/static/description/assets/icons/education-black.png deleted file mode 100644 index 3eb09b2..0000000 Binary files a/product_import/static/description/assets/icons/education-black.png and /dev/null differ diff --git a/product_import/static/description/assets/icons/hotel-black.png b/product_import/static/description/assets/icons/hotel-black.png deleted file mode 100644 index 130f613..0000000 Binary files a/product_import/static/description/assets/icons/hotel-black.png and /dev/null differ diff --git a/product_import/static/description/assets/icons/license.png b/product_import/static/description/assets/icons/license.png deleted file mode 100644 index a586979..0000000 Binary files a/product_import/static/description/assets/icons/license.png and /dev/null differ diff --git a/product_import/static/description/assets/icons/lifebuoy.png b/product_import/static/description/assets/icons/lifebuoy.png deleted file mode 100644 index 658d56c..0000000 Binary files a/product_import/static/description/assets/icons/lifebuoy.png and /dev/null differ diff --git a/product_import/static/description/assets/icons/manufacturing-black.png b/product_import/static/description/assets/icons/manufacturing-black.png deleted file mode 100644 index 697eb0e..0000000 Binary files a/product_import/static/description/assets/icons/manufacturing-black.png and /dev/null differ diff --git a/product_import/static/description/assets/icons/pos-black.png b/product_import/static/description/assets/icons/pos-black.png deleted file mode 100644 index 97c0f90..0000000 Binary files a/product_import/static/description/assets/icons/pos-black.png and /dev/null differ diff --git a/product_import/static/description/assets/icons/puzzle.png b/product_import/static/description/assets/icons/puzzle.png deleted file mode 100644 index 65cf854..0000000 Binary files a/product_import/static/description/assets/icons/puzzle.png and /dev/null differ diff --git a/product_import/static/description/assets/icons/restaurant-black.png b/product_import/static/description/assets/icons/restaurant-black.png deleted file mode 100644 index 4a35eb9..0000000 Binary files a/product_import/static/description/assets/icons/restaurant-black.png and /dev/null differ diff --git a/product_import/static/description/assets/icons/service-black.png b/product_import/static/description/assets/icons/service-black.png deleted file mode 100644 index 301ab51..0000000 Binary files a/product_import/static/description/assets/icons/service-black.png and /dev/null differ diff --git a/product_import/static/description/assets/icons/trading-black.png b/product_import/static/description/assets/icons/trading-black.png deleted file mode 100644 index 9398ba2..0000000 Binary files a/product_import/static/description/assets/icons/trading-black.png and /dev/null differ diff --git a/product_import/static/description/assets/icons/training.png b/product_import/static/description/assets/icons/training.png deleted file mode 100644 index 884ca02..0000000 Binary files a/product_import/static/description/assets/icons/training.png and /dev/null differ diff --git a/product_import/static/description/assets/icons/update.png b/product_import/static/description/assets/icons/update.png deleted file mode 100644 index ecbc5a0..0000000 Binary files a/product_import/static/description/assets/icons/update.png and /dev/null differ diff --git a/product_import/static/description/assets/icons/user.png b/product_import/static/description/assets/icons/user.png deleted file mode 100644 index 6ffb23d..0000000 Binary files a/product_import/static/description/assets/icons/user.png and /dev/null differ diff --git a/product_import/static/description/assets/icons/wrench.png b/product_import/static/description/assets/icons/wrench.png deleted file mode 100644 index 6c04dea..0000000 Binary files a/product_import/static/description/assets/icons/wrench.png and /dev/null differ diff --git a/product_import/static/description/assets/misc/categories.png b/product_import/static/description/assets/misc/categories.png deleted file mode 100644 index bedf1e0..0000000 Binary files a/product_import/static/description/assets/misc/categories.png and /dev/null differ diff --git a/product_import/static/description/assets/misc/check-box.png b/product_import/static/description/assets/misc/check-box.png deleted file mode 100644 index 42caf24..0000000 Binary files a/product_import/static/description/assets/misc/check-box.png and /dev/null differ diff --git a/product_import/static/description/assets/misc/compass.png b/product_import/static/description/assets/misc/compass.png deleted file mode 100644 index d5fed8f..0000000 Binary files a/product_import/static/description/assets/misc/compass.png and /dev/null differ diff --git a/product_import/static/description/assets/misc/corporate.png b/product_import/static/description/assets/misc/corporate.png deleted file mode 100644 index 2eb13ed..0000000 Binary files a/product_import/static/description/assets/misc/corporate.png and /dev/null differ diff --git a/product_import/static/description/assets/misc/customer-support.png b/product_import/static/description/assets/misc/customer-support.png deleted file mode 100644 index 79efc72..0000000 Binary files a/product_import/static/description/assets/misc/customer-support.png and /dev/null differ diff --git a/product_import/static/description/assets/misc/cybrosys-logo.png b/product_import/static/description/assets/misc/cybrosys-logo.png deleted file mode 100644 index cc3cc0c..0000000 Binary files a/product_import/static/description/assets/misc/cybrosys-logo.png and /dev/null differ diff --git a/product_import/static/description/assets/misc/features.png b/product_import/static/description/assets/misc/features.png deleted file mode 100644 index b41769f..0000000 Binary files a/product_import/static/description/assets/misc/features.png and /dev/null differ diff --git a/product_import/static/description/assets/misc/logo.png b/product_import/static/description/assets/misc/logo.png deleted file mode 100644 index 478462d..0000000 Binary files a/product_import/static/description/assets/misc/logo.png and /dev/null differ diff --git a/product_import/static/description/assets/misc/pictures.png b/product_import/static/description/assets/misc/pictures.png deleted file mode 100644 index 56d255f..0000000 Binary files a/product_import/static/description/assets/misc/pictures.png and /dev/null differ diff --git a/product_import/static/description/assets/misc/pie-chart.png b/product_import/static/description/assets/misc/pie-chart.png deleted file mode 100644 index 426e052..0000000 Binary files a/product_import/static/description/assets/misc/pie-chart.png and /dev/null differ diff --git a/product_import/static/description/assets/misc/right-arrow.png b/product_import/static/description/assets/misc/right-arrow.png deleted file mode 100644 index 730984a..0000000 Binary files a/product_import/static/description/assets/misc/right-arrow.png and /dev/null differ diff --git a/product_import/static/description/assets/misc/star.png b/product_import/static/description/assets/misc/star.png deleted file mode 100644 index 2eb9ab2..0000000 Binary files a/product_import/static/description/assets/misc/star.png and /dev/null differ diff --git a/product_import/static/description/assets/misc/support.png b/product_import/static/description/assets/misc/support.png deleted file mode 100644 index 4f18b8b..0000000 Binary files a/product_import/static/description/assets/misc/support.png and /dev/null differ diff --git a/product_import/static/description/assets/misc/whatsapp.png b/product_import/static/description/assets/misc/whatsapp.png deleted file mode 100644 index d513a53..0000000 Binary files a/product_import/static/description/assets/misc/whatsapp.png and /dev/null differ diff --git a/product_import/static/description/assets/modules/1.png b/product_import/static/description/assets/modules/1.png deleted file mode 100644 index 5238bde..0000000 Binary files a/product_import/static/description/assets/modules/1.png and /dev/null differ diff --git a/product_import/static/description/assets/modules/2.png b/product_import/static/description/assets/modules/2.png deleted file mode 100644 index 1ae7cfe..0000000 Binary files a/product_import/static/description/assets/modules/2.png and /dev/null differ diff --git a/product_import/static/description/assets/modules/3.png b/product_import/static/description/assets/modules/3.png deleted file mode 100644 index 3c3ff1a..0000000 Binary files a/product_import/static/description/assets/modules/3.png and /dev/null differ diff --git a/product_import/static/description/assets/modules/4.png b/product_import/static/description/assets/modules/4.png deleted file mode 100644 index 3fae463..0000000 Binary files a/product_import/static/description/assets/modules/4.png and /dev/null differ diff --git a/product_import/static/description/assets/modules/5.gif b/product_import/static/description/assets/modules/5.gif deleted file mode 100644 index 2a5f8e6..0000000 Binary files a/product_import/static/description/assets/modules/5.gif and /dev/null differ diff --git a/product_import/static/description/assets/modules/6.png b/product_import/static/description/assets/modules/6.png deleted file mode 100644 index 7f28152..0000000 Binary files a/product_import/static/description/assets/modules/6.png and /dev/null differ diff --git a/product_import/static/description/assets/screenshots/1.png b/product_import/static/description/assets/screenshots/1.png deleted file mode 100644 index 8b95da2..0000000 Binary files a/product_import/static/description/assets/screenshots/1.png and /dev/null differ diff --git a/product_import/static/description/assets/screenshots/3.png b/product_import/static/description/assets/screenshots/3.png deleted file mode 100644 index 239f737..0000000 Binary files a/product_import/static/description/assets/screenshots/3.png and /dev/null differ diff --git a/product_import/static/description/assets/screenshots/4.png b/product_import/static/description/assets/screenshots/4.png deleted file mode 100644 index 4507cad..0000000 Binary files a/product_import/static/description/assets/screenshots/4.png and /dev/null differ diff --git a/product_import/static/description/assets/screenshots/5.png b/product_import/static/description/assets/screenshots/5.png deleted file mode 100644 index a034045..0000000 Binary files a/product_import/static/description/assets/screenshots/5.png and /dev/null differ diff --git a/product_import/static/description/assets/screenshots/6.png b/product_import/static/description/assets/screenshots/6.png deleted file mode 100644 index ee203e2..0000000 Binary files a/product_import/static/description/assets/screenshots/6.png and /dev/null differ diff --git a/product_import/static/description/assets/screenshots/hero.gif b/product_import/static/description/assets/screenshots/hero.gif deleted file mode 100644 index 8877744..0000000 Binary files a/product_import/static/description/assets/screenshots/hero.gif and /dev/null differ diff --git a/product_import/static/description/banner.png b/product_import/static/description/banner.png deleted file mode 100644 index ed99b59..0000000 Binary files a/product_import/static/description/banner.png and /dev/null differ diff --git a/product_import/static/description/icon.png b/product_import/static/description/icon.png deleted file mode 100644 index bb53c60..0000000 Binary files a/product_import/static/description/icon.png and /dev/null differ diff --git a/product_import/static/description/index.html b/product_import/static/description/index.html deleted file mode 100644 index 72c97b0..0000000 --- a/product_import/static/description/index.html +++ /dev/null @@ -1,543 +0,0 @@ -
- -
- -
-
- Community -
-
- Enterprise -
-
- Odoo.sh -
-
-
- - - -

Product Image from URL

-

Product Image from URL and Path

- - - -
- - -
-
- -
-

Explore This - Module

-
- - - - -
-
- -
-

Overview -

-
-
-
- With the help of this App you can easily load product image from URL and Path just by pasting url in the field. - You can also use image URL and Path in the time of importing product. -
-
- - - -
-
- -
-

Features -

-
-
-
-
- - Load image in product using URL in product view itself. -
-
- - Import Product image from path and URL. -
-
-
- - - -
-
- -
-

Screenshots -

-
-
-
- -
-

Paste image URL in the view or Path.

-

The image will change when the record gets saved.

- -
-
-

Choose the type of file to import products.

- -
-
-

Importing product from CSV file.

-

You can use both URL and path for importing image.

-

The fields in the file must need to be in the following format.

- -
-
-

Importing product from xlsx file.

-

You can use both URL and path for importing image.

-

The fields in the file must need to be in the following format.

- -
-
-

The products details with image will be imported.

- -
-
-

(The example format for csv and xlsx are added in the module.)

-
- -
-
- - -
-
- -
-

Related - Products -

-
-
-
- -
-
- - - - -
-
- -
-

Our Services -

-
- -
-
-
-
- -
-
- Odoo - Customization
-
- -
-
- -
-
- Odoo - Implementation
-
- -
-
- -
-
- Odoo - Support
-
- - -
-
- -
-
- Hire - Odoo - Developer
-
- -
-
- -
-
- Odoo - Integration
-
- -
-
- -
-
- Odoo - Migration
-
- - -
-
- -
-
- Odoo - Consultancy
-
- -
-
- -
-
- Odoo - Implementation
-
- -
-
- -
-
- Odoo - Licensing Consultancy
-
-
- -
- - - - - -
-
- -
-

Our - Industries -

-
- -
-
-
-
- -
- Trading -
-

- Easily procure - and - sell your products

-
-
- -
-
- -
- POS -
-

- Easy - configuration - and convivial experience

-
-
- -
-
- -
- Education -
-

- A platform for - educational management

-
-
- -
-
- -
- Manufacturing -
-

- Plan, track and - schedule your operations

-
-
- -
-
- -
- E-commerce & Website -
-

- Mobile - friendly, - awe-inspiring product pages

-
-
- -
-
- -
- Service Management -
-

- Keep track of - services and invoice

-
-
- -
-
- -
- Restaurant -
-

- Run your bar or - restaurant methodically

-
-
- -
-
- -
- Hotel Management -
-

- An - all-inclusive - hotel management application

-
-
-
-
- - - - -
-
- -
-

Support -

-
-
-
-
-
-
- -
-
-

Need Help?

-

Got questions or need help? Get in touch.

- -

- odoo@cybrosys.com

-
-
-
-
-
-
-
- -
-
-

WhatsApp

-

Say hi to us on WhatsApp!

- -

+91 86068 - 27707

-
-
-
-
-
-
-
- -
-
-
- \ No newline at end of file diff --git a/product_import/views/product_product_views.xml b/product_import/views/product_product_views.xml deleted file mode 100644 index 62f9f10..0000000 --- a/product_import/views/product_product_views.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - product.product.only.form.view.inherit.product.import - product.product - - - - - - - diff --git a/product_import/views/product_template_views.xml b/product_import/views/product_template_views.xml deleted file mode 100644 index 1ec7216..0000000 --- a/product_import/views/product_template_views.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - product.template.only.form.view.inherit.product.import - product.template - - - - - - - diff --git a/product_import/wizard/__init__.py b/product_import/wizard/__init__.py deleted file mode 100644 index 157975f..0000000 --- a/product_import/wizard/__init__.py +++ /dev/null @@ -1,22 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################# -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2019-TODAY Cybrosys Technologies(). -# Author: Mohammed Shahil MP @cybrosys(odoo@cybrosys.com) -# -# You can modify it under the terms of the GNU AFFERO -# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. -# -# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE -# (AGPL v3) along with this program. -# If not, see . -# -############################################################################# -from . import product_import diff --git a/product_import/wizard/product_import.py b/product_import/wizard/product_import.py deleted file mode 100644 index 81d298b..0000000 --- a/product_import/wizard/product_import.py +++ /dev/null @@ -1,128 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################################# -# -# Cybrosys Technologies Pvt. Ltd. -# -# Copyright (C) 2019-TODAY Cybrosys Technologies(). -# Author: Mohammed Shahil MP @cybrosys(odoo@cybrosys.com) -# -# You can modify it under the terms of the GNU AFFERO -# GENERAL PUBLIC LICENSE (AGPL 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 AFFERO GENERAL PUBLIC LICENSE (AGPL v3) for more details. -# -# You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE -# (AGPL v3) along with this program. -# If not, see . -# -############################################################################# -import base64 -import binascii -import tempfile -import certifi -import urllib3 -import xlrd -from odoo.exceptions import ValidationError -from odoo import models, fields, _ - - -class ProductImport(models.Model): - """Model to import the product""" - _name = 'product.import' - _description = 'Product Import' - - file = fields.Binary(string="Upload File") - file_name = fields.Char(string="File Name") - option = fields.Selection([('csv', 'CSV'), ('xlsx', 'XLSX')], - default='csv') - - def import_file(self): - """Function to import product details from csv and xlsx file """ - if self.option == 'csv': - try: - product_temp_data = self.env['product.template'].search([]) - file = base64.b64decode(self.file) - file_string = file.decode('utf-8') - file_string = file_string.split('\n') - http = urllib3.PoolManager(cert_reqs='CERT_REQUIRED', - ca_certs=certifi.where()) - except Exception: - raise ValidationError(_("Please choose the correct file!")) - firstline = True - for file_item in file_string: - if firstline: - firstline = False - continue - product_temp = self.env['product.template'].search( - [('name', '=', file_item.split(",")[0])], limit=0) - if not product_temp.id: - file_parts = file_item.split(",") - if len(file_parts) >= 5: - name, detailed_type, barcode, list_price, file_path_or_url = file_parts[:5] - product_name = { - 'name': name, - 'detailed_type': detailed_type, - 'barcode': barcode, - 'list_price': list_price, - } - if (file_path_or_url.startswith("http://") or - file_path_or_url.startswith("https://")): - image_response = http.request('GET', - file_path_or_url) - image_thumbnail = base64.b64encode( - image_response.data) - product_name['image_1920'] = image_thumbnail - elif file_path_or_url.startswith('/home'): - with open(file_path_or_url, 'rb') as file: - data = base64.b64encode(file.read()) - product_name['image_1920'] = data - product_temp_data.create(product_name) - else: - raise ValidationError( - _("Add the product which is not available in products") - ) - elif self.option == 'xlsx': - try: - product_temp_data = self.env['product.template'] - file_string = tempfile.NamedTemporaryFile(suffix=".xlsx") - file_string.write(binascii.a2b_base64(self.file)) - book = xlrd.open_workbook(file_string.name) - sheet = book.sheet_by_index(0) - http = urllib3.PoolManager(cert_reqs='CERT_REQUIRED', - ca_certs=certifi.where()) - except: - raise ValidationError(_("Please choose the correct file")) - startline = True - for i in range(sheet.nrows): - if startline: - startline = False - else: - line = list(sheet.row_values(i)) - product_temp = self.env['product.template'].search( - [('name', '=', line[0])], limit=0) - if product_temp.id: - raise ValidationError( - _("Add the product which is not available in" - " products")) - if line[0]: - if "http://" in line[4] or "https://" in line[4]: - link = line[4] - image_response = http.request('GET', link) - image_thumbnail = base64.b64encode( - image_response.data) - elif "/home" in line[4]: - with open(line[4], 'rb') as file: - image_thumbnail = base64.b64encode(file.read()) - else: - image_thumbnail = False # or None - product_name = { - 'name': line[0], - 'detailed_type': line[1], - 'barcode': line[2], - 'list_price': line[3], - 'image_1920': image_thumbnail, - } - product_temp_data.create(product_name) diff --git a/product_import/wizard/product_import_views.xml b/product_import/wizard/product_import_views.xml deleted file mode 100644 index 5a81966..0000000 --- a/product_import/wizard/product_import_views.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - product.import.view.form - product.import - -
- - - - -
-
-
-
-
- - - Import Product - product.import - ir.actions.act_window - tree,form - - {} - new - - - -