diff --git a/website_upload_files/README.rst b/website_upload_files/README.rst new file mode 100644 index 000000000..21e509bd7 --- /dev/null +++ b/website_upload_files/README.rst @@ -0,0 +1,47 @@ +.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg + :target: https://www.gnu.org/licenses/lgpl-3.0-standalone.html + :alt: License: LGPL-3 + +Multiple Attachments In eCommerce Order +======================================= +This Module allows customer to upload documents for the sale order + +Configuration +============= +* No additional configurations needed + +Company +------- +* `Cybrosys Techno Solutions `__ + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.gnu.org/licenses/lgpl-3.0-standalone.html) + +Credits +------- +Developer: (V16) Fathima Mazlin AM, 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: ``__ \ No newline at end of file diff --git a/website_upload_files/__init__.py b/website_upload_files/__init__.py new file mode 100644 index 000000000..5c471082a --- /dev/null +++ b/website_upload_files/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Fathima Mazlin AM (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 . +# +############################################################################# +from . import controllers +from . import models diff --git a/website_upload_files/__manifest__.py b/website_upload_files/__manifest__.py new file mode 100644 index 000000000..cb51b3ca9 --- /dev/null +++ b/website_upload_files/__manifest__.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Fathima Mazlin AM (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 . +# +############################################################################# +{ + 'name': 'Multiple Attachments In eCommerce Order', + 'version': '16.0.1.0.0', + 'category': 'eCommerce', + 'summary': 'Can upload files in payment page of website.', + 'description': 'Can upload files related to the sale order in payment page' + 'of website.This attachment can also view in website order.' + 'Through the attachment we can give further details or ' + 'information regarding the sale order.', + 'author': 'Cybrosys Techno solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': [ + 'website_sale', 'sale_management', + ], + 'data': [ + 'views/website_sale_templates.xml', + 'views/sale_order_views.xml', + ], + 'assets': { + 'web.assets_frontend': [ + 'website_upload_files/static/src/js/attachment.js', + ], + }, + 'images': ['static/description/banner.jpg'], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} diff --git a/website_upload_files/controllers/__init__.py b/website_upload_files/controllers/__init__.py new file mode 100644 index 000000000..169657885 --- /dev/null +++ b/website_upload_files/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Fathima Mazlin AM (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 . +# +############################################################################# +from . import website_upload_files diff --git a/website_upload_files/controllers/website_upload_files.py b/website_upload_files/controllers/website_upload_files.py new file mode 100644 index 000000000..010a44f7c --- /dev/null +++ b/website_upload_files/controllers/website_upload_files.py @@ -0,0 +1,76 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Fathima Mazlin AM (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 . +# +############################################################################# +import base64 +from odoo import http +from odoo.http import request +from odoo.addons.website_sale.controllers.main import WebsiteSale + + +class WebsiteSaleFileUpload(WebsiteSale): + """For attaching the file in website sale order""" + + @http.route('/shop/payment', type='http', auth='public', website=True, + sitemap=False) + def shop_payment(self, **post): + """ Payment step. This page proposes several payment means based on + available payment.provider. State at this point : + - a draft sales + order with lines; otherwise, clean context / session and back to the + shop + - no transaction in context / session, or only a draft one, + if the customer did go to a payment provider website but closed the + tab without paying / canceling + """ + order = request.website.sale_get_order() + redirection = self.checkout_redirection( + order) or self.checkout_check_address(order) + if redirection: + return redirection + render_values = self._get_shop_payment_values(order, **post) + render_values['only_services'] = order and order.only_services or False + if render_values['errors']: + render_values.pop('providers', '') + render_values.pop('tokens', '') + if post.get('attachment'): + if post.get('attachment', False): + file = post.get('attachment') + request.env['ir.attachment'].sudo().create({ + 'name': post.get('attachment').filename, + 'res_name': post.get('attachment').filename, + 'type': 'binary', + 'res_model': 'sale.order', + 'res_id': order.id, + 'datas': base64.b64encode(file.read()), + }) + all_attachments = request.env['ir.attachment'].search( + [('res_model', '=', 'sale.order'), ('res_id', '=', order.id)]) + render_values['attachment'] = all_attachments + return request.render("website_sale.payment", render_values) + + @http.route('/shop/attachments', type='json', auth='public', website=True, + sitemap=False) + def shop_attachments(self, **post): + """For delete the attachment from websites""" + attachment = request.env['ir.attachment'].sudo().browse(int(post.get( + "attachment_id"))) + attachment.unlink() + return diff --git a/website_upload_files/doc/RELEASE_NOTES.md b/website_upload_files/doc/RELEASE_NOTES.md new file mode 100644 index 000000000..410e8caa4 --- /dev/null +++ b/website_upload_files/doc/RELEASE_NOTES.md @@ -0,0 +1,7 @@ +## Module + +#### 14.08.2023 +#### Version 16.0.1.0.0 +#### ADD + +- Initial commit for Multi Attachments In eCommerce Order \ No newline at end of file diff --git a/website_upload_files/models/__init__.py b/website_upload_files/models/__init__.py new file mode 100644 index 000000000..d2b92d2a1 --- /dev/null +++ b/website_upload_files/models/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Fathima Mazlin AM (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 . +# +############################################################################# +from . import sale_order diff --git a/website_upload_files/models/sale_order.py b/website_upload_files/models/sale_order.py new file mode 100644 index 000000000..705e870b9 --- /dev/null +++ b/website_upload_files/models/sale_order.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +############################################################################# +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies() +# Author: Fathima Mazlin AM (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 . +# +############################################################################# +from odoo import fields, models, _ + + +class SaleOrder(models.Model): + """For adding the count of attachment as field in sale order""" + _inherit = 'sale.order' + + attachment_count = fields.Integer(string='Attachment Count', + help="Count of attachment", + compute='_compute_attachment_count') + + def _compute_attachment_count(self): + """Count of attached documents""" + for rec in self: + rec.attachment_count = self.env['ir.attachment'].search_count( + [('res_model', '=', 'sale.order'), ('res_id', '=', rec.id)]) + + def action_show_attachments(self): + """To show attached documents""" + return { + 'name': _('Attachments'), + 'view_mode': 'kanban,form', + 'res_model': 'ir.attachment', + 'type': 'ir.actions.act_window', + 'domain': [('res_model', '=', 'sale.order'), + ('res_id', '=', self.id)] + } diff --git a/website_upload_files/static/description/assets/icons/check.png b/website_upload_files/static/description/assets/icons/check.png new file mode 100644 index 000000000..c8e85f51d Binary files /dev/null and b/website_upload_files/static/description/assets/icons/check.png differ diff --git a/website_upload_files/static/description/assets/icons/chevron.png b/website_upload_files/static/description/assets/icons/chevron.png new file mode 100644 index 000000000..2089293d6 Binary files /dev/null and b/website_upload_files/static/description/assets/icons/chevron.png differ diff --git a/website_upload_files/static/description/assets/icons/cogs.png b/website_upload_files/static/description/assets/icons/cogs.png new file mode 100644 index 000000000..95d0bad62 Binary files /dev/null and b/website_upload_files/static/description/assets/icons/cogs.png differ diff --git a/website_upload_files/static/description/assets/icons/consultation.png b/website_upload_files/static/description/assets/icons/consultation.png new file mode 100644 index 000000000..8319d4baa Binary files /dev/null and b/website_upload_files/static/description/assets/icons/consultation.png differ diff --git a/website_upload_files/static/description/assets/icons/ecom-black.png b/website_upload_files/static/description/assets/icons/ecom-black.png new file mode 100644 index 000000000..a9385ff13 Binary files /dev/null and b/website_upload_files/static/description/assets/icons/ecom-black.png differ diff --git a/website_upload_files/static/description/assets/icons/education-black.png b/website_upload_files/static/description/assets/icons/education-black.png new file mode 100644 index 000000000..3eb09b27b Binary files /dev/null and b/website_upload_files/static/description/assets/icons/education-black.png differ diff --git a/website_upload_files/static/description/assets/icons/hotel-black.png b/website_upload_files/static/description/assets/icons/hotel-black.png new file mode 100644 index 000000000..130f613be Binary files /dev/null and b/website_upload_files/static/description/assets/icons/hotel-black.png differ diff --git a/website_upload_files/static/description/assets/icons/license.png b/website_upload_files/static/description/assets/icons/license.png new file mode 100644 index 000000000..a5869797e Binary files /dev/null and b/website_upload_files/static/description/assets/icons/license.png differ diff --git a/website_upload_files/static/description/assets/icons/lifebuoy.png b/website_upload_files/static/description/assets/icons/lifebuoy.png new file mode 100644 index 000000000..658d56ccc Binary files /dev/null and b/website_upload_files/static/description/assets/icons/lifebuoy.png differ diff --git a/website_upload_files/static/description/assets/icons/logo.png b/website_upload_files/static/description/assets/icons/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/website_upload_files/static/description/assets/icons/logo.png differ diff --git a/website_upload_files/static/description/assets/icons/manufacturing-black.png b/website_upload_files/static/description/assets/icons/manufacturing-black.png new file mode 100644 index 000000000..697eb0e9f Binary files /dev/null and b/website_upload_files/static/description/assets/icons/manufacturing-black.png differ diff --git a/website_upload_files/static/description/assets/icons/pos-black.png b/website_upload_files/static/description/assets/icons/pos-black.png new file mode 100644 index 000000000..97c0f90c1 Binary files /dev/null and b/website_upload_files/static/description/assets/icons/pos-black.png differ diff --git a/website_upload_files/static/description/assets/icons/puzzle.png b/website_upload_files/static/description/assets/icons/puzzle.png new file mode 100644 index 000000000..65cf854e7 Binary files /dev/null and b/website_upload_files/static/description/assets/icons/puzzle.png differ diff --git a/website_upload_files/static/description/assets/icons/restaurant-black.png b/website_upload_files/static/description/assets/icons/restaurant-black.png new file mode 100644 index 000000000..4a35eb939 Binary files /dev/null and b/website_upload_files/static/description/assets/icons/restaurant-black.png differ diff --git a/website_upload_files/static/description/assets/icons/service-black.png b/website_upload_files/static/description/assets/icons/service-black.png new file mode 100644 index 000000000..301ab51cb Binary files /dev/null and b/website_upload_files/static/description/assets/icons/service-black.png differ diff --git a/website_upload_files/static/description/assets/icons/trading-black.png b/website_upload_files/static/description/assets/icons/trading-black.png new file mode 100644 index 000000000..9398ba2f1 Binary files /dev/null and b/website_upload_files/static/description/assets/icons/trading-black.png differ diff --git a/website_upload_files/static/description/assets/icons/training.png b/website_upload_files/static/description/assets/icons/training.png new file mode 100644 index 000000000..884ca024d Binary files /dev/null and b/website_upload_files/static/description/assets/icons/training.png differ diff --git a/website_upload_files/static/description/assets/icons/update.png b/website_upload_files/static/description/assets/icons/update.png new file mode 100644 index 000000000..ecbc5a01a Binary files /dev/null and b/website_upload_files/static/description/assets/icons/update.png differ diff --git a/website_upload_files/static/description/assets/icons/user.png b/website_upload_files/static/description/assets/icons/user.png new file mode 100644 index 000000000..6ffb23d9f Binary files /dev/null and b/website_upload_files/static/description/assets/icons/user.png differ diff --git a/website_upload_files/static/description/assets/icons/wrench.png b/website_upload_files/static/description/assets/icons/wrench.png new file mode 100644 index 000000000..6c04dea0f Binary files /dev/null and b/website_upload_files/static/description/assets/icons/wrench.png differ diff --git a/website_upload_files/static/description/assets/misc/categories.png b/website_upload_files/static/description/assets/misc/categories.png new file mode 100644 index 000000000..bedf1e0b1 Binary files /dev/null and b/website_upload_files/static/description/assets/misc/categories.png differ diff --git a/website_upload_files/static/description/assets/misc/check-box.png b/website_upload_files/static/description/assets/misc/check-box.png new file mode 100644 index 000000000..42caf24b9 Binary files /dev/null and b/website_upload_files/static/description/assets/misc/check-box.png differ diff --git a/website_upload_files/static/description/assets/misc/compass.png b/website_upload_files/static/description/assets/misc/compass.png new file mode 100644 index 000000000..d5fed8faa Binary files /dev/null and b/website_upload_files/static/description/assets/misc/compass.png differ diff --git a/website_upload_files/static/description/assets/misc/corporate.png b/website_upload_files/static/description/assets/misc/corporate.png new file mode 100644 index 000000000..2eb13edbf Binary files /dev/null and b/website_upload_files/static/description/assets/misc/corporate.png differ diff --git a/website_upload_files/static/description/assets/misc/customer-support.png b/website_upload_files/static/description/assets/misc/customer-support.png new file mode 100644 index 000000000..79efc72ed Binary files /dev/null and b/website_upload_files/static/description/assets/misc/customer-support.png differ diff --git a/website_upload_files/static/description/assets/misc/cybrosys-logo.png b/website_upload_files/static/description/assets/misc/cybrosys-logo.png new file mode 100644 index 000000000..cc3cc0ccf Binary files /dev/null and b/website_upload_files/static/description/assets/misc/cybrosys-logo.png differ diff --git a/website_upload_files/static/description/assets/misc/features.png b/website_upload_files/static/description/assets/misc/features.png new file mode 100644 index 000000000..b41769f77 Binary files /dev/null and b/website_upload_files/static/description/assets/misc/features.png differ diff --git a/website_upload_files/static/description/assets/misc/logo.png b/website_upload_files/static/description/assets/misc/logo.png new file mode 100644 index 000000000..478462d3e Binary files /dev/null and b/website_upload_files/static/description/assets/misc/logo.png differ diff --git a/website_upload_files/static/description/assets/misc/pictures.png b/website_upload_files/static/description/assets/misc/pictures.png new file mode 100644 index 000000000..56d255fe9 Binary files /dev/null and b/website_upload_files/static/description/assets/misc/pictures.png differ diff --git a/website_upload_files/static/description/assets/misc/pie-chart.png b/website_upload_files/static/description/assets/misc/pie-chart.png new file mode 100644 index 000000000..426e05244 Binary files /dev/null and b/website_upload_files/static/description/assets/misc/pie-chart.png differ diff --git a/website_upload_files/static/description/assets/misc/right-arrow.png b/website_upload_files/static/description/assets/misc/right-arrow.png new file mode 100644 index 000000000..730984a06 Binary files /dev/null and b/website_upload_files/static/description/assets/misc/right-arrow.png differ diff --git a/website_upload_files/static/description/assets/misc/star.png b/website_upload_files/static/description/assets/misc/star.png new file mode 100644 index 000000000..2eb9ab29f Binary files /dev/null and b/website_upload_files/static/description/assets/misc/star.png differ diff --git a/website_upload_files/static/description/assets/misc/support.png b/website_upload_files/static/description/assets/misc/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/website_upload_files/static/description/assets/misc/support.png differ diff --git a/website_upload_files/static/description/assets/misc/whatsapp.png b/website_upload_files/static/description/assets/misc/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/website_upload_files/static/description/assets/misc/whatsapp.png differ diff --git a/website_upload_files/static/description/assets/modules/barcode.png b/website_upload_files/static/description/assets/modules/barcode.png new file mode 100644 index 000000000..618e3e6c4 Binary files /dev/null and b/website_upload_files/static/description/assets/modules/barcode.png differ diff --git a/website_upload_files/static/description/assets/modules/customer_geolocation.png b/website_upload_files/static/description/assets/modules/customer_geolocation.png new file mode 100644 index 000000000..6058f6c3b Binary files /dev/null and b/website_upload_files/static/description/assets/modules/customer_geolocation.png differ diff --git a/website_upload_files/static/description/assets/modules/product_brand.png b/website_upload_files/static/description/assets/modules/product_brand.png new file mode 100644 index 000000000..1d2238b80 Binary files /dev/null and b/website_upload_files/static/description/assets/modules/product_brand.png differ diff --git a/website_upload_files/static/description/assets/modules/website_cart.png b/website_upload_files/static/description/assets/modules/website_cart.png new file mode 100644 index 000000000..163485cfd Binary files /dev/null and b/website_upload_files/static/description/assets/modules/website_cart.png differ diff --git a/website_upload_files/static/description/assets/modules/website_favourites_grid.jpg b/website_upload_files/static/description/assets/modules/website_favourites_grid.jpg new file mode 100644 index 000000000..483dd03a4 Binary files /dev/null and b/website_upload_files/static/description/assets/modules/website_favourites_grid.jpg differ diff --git a/website_upload_files/static/description/assets/modules/website_repeat_sale.png b/website_upload_files/static/description/assets/modules/website_repeat_sale.png new file mode 100644 index 000000000..ed175b076 Binary files /dev/null and b/website_upload_files/static/description/assets/modules/website_repeat_sale.png differ diff --git a/website_upload_files/static/description/assets/screenshots/1.png b/website_upload_files/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..ba78b362c Binary files /dev/null and b/website_upload_files/static/description/assets/screenshots/1.png differ diff --git a/website_upload_files/static/description/assets/screenshots/2.png b/website_upload_files/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..0cc090947 Binary files /dev/null and b/website_upload_files/static/description/assets/screenshots/2.png differ diff --git a/website_upload_files/static/description/assets/screenshots/3.png b/website_upload_files/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..413e71a91 Binary files /dev/null and b/website_upload_files/static/description/assets/screenshots/3.png differ diff --git a/website_upload_files/static/description/assets/screenshots/4.png b/website_upload_files/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..f5b574e4d Binary files /dev/null and b/website_upload_files/static/description/assets/screenshots/4.png differ diff --git a/website_upload_files/static/description/assets/screenshots/5.png b/website_upload_files/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..5e73cb75a Binary files /dev/null and b/website_upload_files/static/description/assets/screenshots/5.png differ diff --git a/website_upload_files/static/description/assets/screenshots/hero.gif b/website_upload_files/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..9cc978c39 Binary files /dev/null and b/website_upload_files/static/description/assets/screenshots/hero.gif differ diff --git a/website_upload_files/static/description/banner.jpg b/website_upload_files/static/description/banner.jpg new file mode 100644 index 000000000..5e0523196 Binary files /dev/null and b/website_upload_files/static/description/banner.jpg differ diff --git a/website_upload_files/static/description/icon.png b/website_upload_files/static/description/icon.png new file mode 100644 index 000000000..35602eedc Binary files /dev/null and b/website_upload_files/static/description/icon.png differ diff --git a/website_upload_files/static/description/index.html b/website_upload_files/static/description/index.html new file mode 100644 index 000000000..b7b24f425 --- /dev/null +++ b/website_upload_files/static/description/index.html @@ -0,0 +1,655 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Multiple Attachments In eCommerce Order

+

+ Option to Upload Files in eCommerce Order

+ + +
+
+
+
+ + +
+
+ +
+

+ Explore This + Module

+
+ + + + +
+
+ +
+

+ Overview +

+
+
+
+ This module allows to upload files from the payment page. + And also we can see the smart button on sale order for seeing uploaded + files. +
+
+ + + +
+
+ +
+

+ Features +

+
+
+
+
+ + Community and Enterprise Support. +
+
+ + Attach Documents from Payment Page +
+
+ + + +
+
+ +
+

+ Screenshots +

+
+
+
+
+

+ Choose File Option

+

+ After the installation of this module, we can see a + choose option for adding attachments in the payment page of + website.

+ +
+ +
+

+ Attached Documents From Website

+

+ User can click button "Choose file" then will appear a + wizard to add documents. From the wizard user can upload + file.

+ +
+
+

+ Delete Button

+

+ User can also delete attached documents from website.

+ +
+
+

+ Attachments Smart Button

+

+ A smart button is on sale order for seeing all related + attachments of the sale order.

+ +
+ +
+

+ Attached Documents

+

+ When clicking the smart button user can see all the + attachments related to the sale order.

+ +
+ +
+
+ + + +
+
+ +
+

+ 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/website_upload_files/static/src/js/attachment.js b/website_upload_files/static/src/js/attachment.js new file mode 100644 index 000000000..92883d76e --- /dev/null +++ b/website_upload_files/static/src/js/attachment.js @@ -0,0 +1,26 @@ +odoo.define('website_upload_files.attachment', function (require) { +'use strict'; + + var publicWidget = require('web.public.widget'); + var ajax = require('web.ajax'); + publicWidget.registry.add_attachment = publicWidget.Widget.extend({ + selector: '.div-class-button', + events: { + 'click #button_add_attachment_payment': 'AttachmentPaymentOnClick', + }, + /** + For delete the attachments + **/ + AttachmentPaymentOnClick: function (ev) { + var attachment_id = ev.target.closest('div') + ajax.jsonRpc("/shop/attachments", 'call', { + "attachment_id":attachment_id.id + }) + .then(function (data) { + return + }); + attachment_id.remove(); + }, + }); + return publicWidget.registry.add_attachment +}); diff --git a/website_upload_files/views/sale_order_views.xml b/website_upload_files/views/sale_order_views.xml new file mode 100644 index 000000000..86ec9d4a7 --- /dev/null +++ b/website_upload_files/views/sale_order_views.xml @@ -0,0 +1,18 @@ + + + + + sale.order.view.form.inherit.website.upload.files + sale.order + + +
+ +
+
+
+
diff --git a/website_upload_files/views/website_sale_templates.xml b/website_upload_files/views/website_sale_templates.xml new file mode 100644 index 000000000..f5d7828e3 --- /dev/null +++ b/website_upload_files/views/website_sale_templates.xml @@ -0,0 +1,54 @@ + + + + +