diff --git a/payment_proof_attachment/README.rst b/payment_proof_attachment/README.rst new file mode 100755 index 000000000..d5cd4e48c --- /dev/null +++ b/payment_proof_attachment/README.rst @@ -0,0 +1,46 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +Payment Proof Attachment +======================== +This module adds an option to your customer to attach the payment proof files in the website + +Configuration +============= +* No additional configurations needed + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.html) + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developer: (V15) Ammu Raj, 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/payment_proof_attachment/__init__.py b/payment_proof_attachment/__init__.py new file mode 100755 index 000000000..aa87b4eeb --- /dev/null +++ b/payment_proof_attachment/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (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 controllers diff --git a/payment_proof_attachment/__manifest__.py b/payment_proof_attachment/__manifest__.py new file mode 100755 index 000000000..883526219 --- /dev/null +++ b/payment_proof_attachment/__manifest__.py @@ -0,0 +1,48 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (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': 'Payment Proof Attachment', + 'version': '15.0.1.0.0', + 'category': 'Website', + 'summary': "Allows to attach proofs in website", + 'description': "This module adds an option to your customer to attach the" + "payment proof files in the website.", + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'depends': ['website_sale', 'sale_management', 'mail'], + 'data': ['views/sale_portal_templates.xml'], + 'assets': { + 'web.assets_frontend': [ + 'payment_proof_attachment/static/src/js/my_account_screen.js', + 'payment_proof_attachment/static/src/js/payment_screen.js', + 'payment_proof_attachment/static/src/css/payment_proof.css', + ] + }, + 'images': ['static/description/banner.png'], + 'license': 'AGPL-3', + 'installable': True, + 'auto_install': False, + 'application': False, +} + diff --git a/payment_proof_attachment/controllers/__init__.py b/payment_proof_attachment/controllers/__init__.py new file mode 100755 index 000000000..cc6617eea --- /dev/null +++ b/payment_proof_attachment/controllers/__init__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (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 payment_proof_attachment diff --git a/payment_proof_attachment/controllers/payment_proof_attachment.py b/payment_proof_attachment/controllers/payment_proof_attachment.py new file mode 100755 index 000000000..8bf6fa56e --- /dev/null +++ b/payment_proof_attachment/controllers/payment_proof_attachment.py @@ -0,0 +1,97 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Ammu Raj (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 odoo import http, _ +from odoo.http import request + + +class WebsitePaymentProof(http.Controller): + """ + The WebsitePaymentProof updating the value of the sale order from the + backend with the content that the customer + uploaded in the frontend. + Methods: + payment_proof(self, **kw): + onclick the save button creating new records in "ir.attachment" for + the corresponding sale order working on + "my account" screen. + payment_screen_proof(self, **kw): + onclick the save button creating new records in "ir.attachment" for + the corresponding sale order working on "payment" screen. + payment_show_receipt(self, **kw): + onclick the show attachment button getting updated attachments. + """ + + @http.route(['/payment_proof/submit'], type='json', auth="public") + def payment_proof(self, **kw): + """ + Summary: + onclick the save button creating new records in "ir.attachment" for + the corresponding sale order working on + "my account" screen. + Args: + kw(dict): + it contains sale order id and contents of the input files. + """ + if 'sale_id' in kw: + sale_id = int(kw.get('sale_id')) + else: + sale_id = request.session.sale_order_id + sale = request.env['sale.order'].sudo().browse(sale_id) + for attachment in kw['attachments']: + request.env['ir.attachment'].sudo().create({ + 'name': attachment['name'], + 'res_model': 'sale.order', + 'res_id': sale_id, + 'type': 'binary', + 'public': True, + 'datas': attachment['content'], + }) + body = _("%s document is added by %s" % ( + attachment['name'], request.env.user.name)) + sale.message_post(body=body) + return + + @http.route(['/my_account_screen/show_updated'], type='json', auth="public") + def payment_show_receipt(self, **kw): + """ + Summary: + onclick the show attachment button getting updated attachments. + Args: + kw(dict): + it contains the id of the current sale order. + Return(list): + it contains the all attachments + """ + if kw: + sale_id = kw['data'] + else: + sale_id = request.session.sale_order_id + attachment_ids_list = [] + attachment_ids = request.env['ir.attachment'].sudo().search([( + 'res_model', '=', 'sale.order'), ('res_id', '=', sale_id), + ('create_uid', '=', request.session.uid)]) + for attachment_id in attachment_ids: + attachment_ids_list.append(({ + 'id': attachment_id.id, + 'name': attachment_id.name + })) + return attachment_ids_list diff --git a/payment_proof_attachment/doc/RELEASE_NOTES.md b/payment_proof_attachment/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..363a4a2bb --- /dev/null +++ b/payment_proof_attachment/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 23.10.2023 +#### Version 15.0.1.0.0 +##### ADD +- Initial Commit for Payment Proof Attachment diff --git a/payment_proof_attachment/static/description/assets/icons/check.png b/payment_proof_attachment/static/description/assets/icons/check.png new file mode 100755 index 000000000..c8e85f51d Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/check.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/chevron.png b/payment_proof_attachment/static/description/assets/icons/chevron.png new file mode 100755 index 000000000..2089293d6 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/chevron.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/cogs.png b/payment_proof_attachment/static/description/assets/icons/cogs.png new file mode 100755 index 000000000..95d0bad62 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/cogs.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/consultation.png b/payment_proof_attachment/static/description/assets/icons/consultation.png new file mode 100755 index 000000000..8319d4baa Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/consultation.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/ecom-black.png b/payment_proof_attachment/static/description/assets/icons/ecom-black.png new file mode 100755 index 000000000..a9385ff13 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/ecom-black.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/education-black.png b/payment_proof_attachment/static/description/assets/icons/education-black.png new file mode 100755 index 000000000..3eb09b27b Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/education-black.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/hotel-black.png b/payment_proof_attachment/static/description/assets/icons/hotel-black.png new file mode 100755 index 000000000..130f613be Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/hotel-black.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/license.png b/payment_proof_attachment/static/description/assets/icons/license.png new file mode 100755 index 000000000..a5869797e Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/license.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/lifebuoy.png b/payment_proof_attachment/static/description/assets/icons/lifebuoy.png new file mode 100755 index 000000000..658d56ccc Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/lifebuoy.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/manufacturing-black.png b/payment_proof_attachment/static/description/assets/icons/manufacturing-black.png new file mode 100755 index 000000000..697eb0e9f Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/manufacturing-black.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/pos-black.png b/payment_proof_attachment/static/description/assets/icons/pos-black.png new file mode 100755 index 000000000..97c0f90c1 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/pos-black.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/puzzle.png b/payment_proof_attachment/static/description/assets/icons/puzzle.png new file mode 100755 index 000000000..65cf854e7 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/puzzle.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/restaurant-black.png b/payment_proof_attachment/static/description/assets/icons/restaurant-black.png new file mode 100755 index 000000000..4a35eb939 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/restaurant-black.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/service-black.png b/payment_proof_attachment/static/description/assets/icons/service-black.png new file mode 100755 index 000000000..301ab51cb Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/service-black.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/trading-black.png b/payment_proof_attachment/static/description/assets/icons/trading-black.png new file mode 100755 index 000000000..9398ba2f1 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/trading-black.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/training.png b/payment_proof_attachment/static/description/assets/icons/training.png new file mode 100755 index 000000000..884ca024d Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/training.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/update.png b/payment_proof_attachment/static/description/assets/icons/update.png new file mode 100755 index 000000000..ecbc5a01a Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/update.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/user.png b/payment_proof_attachment/static/description/assets/icons/user.png new file mode 100755 index 000000000..6ffb23d9f Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/user.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/wrench.png b/payment_proof_attachment/static/description/assets/icons/wrench.png new file mode 100755 index 000000000..6c04dea0f Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/wrench.png differ diff --git a/payment_proof_attachment/static/description/assets/misc/categories.png b/payment_proof_attachment/static/description/assets/misc/categories.png new file mode 100755 index 000000000..bedf1e0b1 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/misc/categories.png differ diff --git a/payment_proof_attachment/static/description/assets/misc/check-box.png b/payment_proof_attachment/static/description/assets/misc/check-box.png new file mode 100755 index 000000000..42caf24b9 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/misc/check-box.png differ diff --git a/payment_proof_attachment/static/description/assets/misc/compass.png b/payment_proof_attachment/static/description/assets/misc/compass.png new file mode 100755 index 000000000..d5fed8faa Binary files /dev/null and b/payment_proof_attachment/static/description/assets/misc/compass.png differ diff --git a/payment_proof_attachment/static/description/assets/misc/corporate.png b/payment_proof_attachment/static/description/assets/misc/corporate.png new file mode 100755 index 000000000..2eb13edbf Binary files /dev/null and b/payment_proof_attachment/static/description/assets/misc/corporate.png differ diff --git a/payment_proof_attachment/static/description/assets/misc/customer-support.png b/payment_proof_attachment/static/description/assets/misc/customer-support.png new file mode 100755 index 000000000..79efc72ed Binary files /dev/null and b/payment_proof_attachment/static/description/assets/misc/customer-support.png differ diff --git a/payment_proof_attachment/static/description/assets/misc/cybrosys-logo.png b/payment_proof_attachment/static/description/assets/misc/cybrosys-logo.png new file mode 100755 index 000000000..cc3cc0ccf Binary files /dev/null and b/payment_proof_attachment/static/description/assets/misc/cybrosys-logo.png differ diff --git a/payment_proof_attachment/static/description/assets/misc/features.png b/payment_proof_attachment/static/description/assets/misc/features.png new file mode 100755 index 000000000..b41769f77 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/misc/features.png differ diff --git a/payment_proof_attachment/static/description/assets/misc/logo.png b/payment_proof_attachment/static/description/assets/misc/logo.png new file mode 100755 index 000000000..478462d3e Binary files /dev/null and b/payment_proof_attachment/static/description/assets/misc/logo.png differ diff --git a/payment_proof_attachment/static/description/assets/misc/pictures.png b/payment_proof_attachment/static/description/assets/misc/pictures.png new file mode 100755 index 000000000..56d255fe9 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/misc/pictures.png differ diff --git a/payment_proof_attachment/static/description/assets/misc/pie-chart.png b/payment_proof_attachment/static/description/assets/misc/pie-chart.png new file mode 100755 index 000000000..426e05244 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/misc/pie-chart.png differ diff --git a/payment_proof_attachment/static/description/assets/misc/right-arrow.png b/payment_proof_attachment/static/description/assets/misc/right-arrow.png new file mode 100755 index 000000000..730984a06 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/misc/right-arrow.png differ diff --git a/payment_proof_attachment/static/description/assets/misc/star.png b/payment_proof_attachment/static/description/assets/misc/star.png new file mode 100755 index 000000000..2eb9ab29f Binary files /dev/null and b/payment_proof_attachment/static/description/assets/misc/star.png differ diff --git a/payment_proof_attachment/static/description/assets/misc/support.png b/payment_proof_attachment/static/description/assets/misc/support.png new file mode 100755 index 000000000..4f18b8b82 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/misc/support.png differ diff --git a/payment_proof_attachment/static/description/assets/misc/whatsapp.png b/payment_proof_attachment/static/description/assets/misc/whatsapp.png new file mode 100755 index 000000000..d513a5356 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/misc/whatsapp.png differ diff --git a/payment_proof_attachment/static/description/assets/modules/w1.png b/payment_proof_attachment/static/description/assets/modules/w1.png new file mode 100644 index 000000000..f19f3578e Binary files /dev/null and b/payment_proof_attachment/static/description/assets/modules/w1.png differ diff --git a/payment_proof_attachment/static/description/assets/modules/w2.png b/payment_proof_attachment/static/description/assets/modules/w2.png new file mode 100644 index 000000000..e6bee65a9 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/modules/w2.png differ diff --git a/payment_proof_attachment/static/description/assets/modules/w3.png b/payment_proof_attachment/static/description/assets/modules/w3.png new file mode 100644 index 000000000..b64b96d92 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/modules/w3.png differ diff --git a/payment_proof_attachment/static/description/assets/modules/w4.png b/payment_proof_attachment/static/description/assets/modules/w4.png new file mode 100644 index 000000000..aa9cb6262 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/modules/w4.png differ diff --git a/payment_proof_attachment/static/description/assets/modules/w5.png b/payment_proof_attachment/static/description/assets/modules/w5.png new file mode 100644 index 000000000..bf93d4f80 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/modules/w5.png differ diff --git a/payment_proof_attachment/static/description/assets/modules/w6.png b/payment_proof_attachment/static/description/assets/modules/w6.png new file mode 100644 index 000000000..4d7fa1223 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/modules/w6.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/1.png b/payment_proof_attachment/static/description/assets/screenshots/1.png new file mode 100644 index 000000000..071172419 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/1.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/10.png b/payment_proof_attachment/static/description/assets/screenshots/10.png new file mode 100644 index 000000000..1fdf46d80 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/10.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/11.png b/payment_proof_attachment/static/description/assets/screenshots/11.png new file mode 100644 index 000000000..70cf9b9ec Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/11.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/12.png b/payment_proof_attachment/static/description/assets/screenshots/12.png new file mode 100644 index 000000000..8e65e1702 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/12.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/2.png b/payment_proof_attachment/static/description/assets/screenshots/2.png new file mode 100644 index 000000000..893900c56 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/2.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/3.png b/payment_proof_attachment/static/description/assets/screenshots/3.png new file mode 100644 index 000000000..144478b75 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/3.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/4.png b/payment_proof_attachment/static/description/assets/screenshots/4.png new file mode 100644 index 000000000..b29434f71 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/4.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/5.png b/payment_proof_attachment/static/description/assets/screenshots/5.png new file mode 100644 index 000000000..a05e3cb06 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/5.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/6.png b/payment_proof_attachment/static/description/assets/screenshots/6.png new file mode 100644 index 000000000..dd673d98e Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/6.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/7.png b/payment_proof_attachment/static/description/assets/screenshots/7.png new file mode 100644 index 000000000..3e169cb50 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/7.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/8.png b/payment_proof_attachment/static/description/assets/screenshots/8.png new file mode 100644 index 000000000..5676eef5e Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/8.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/9.png b/payment_proof_attachment/static/description/assets/screenshots/9.png new file mode 100644 index 000000000..e5bbf3a33 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/9.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/hero.gif b/payment_proof_attachment/static/description/assets/screenshots/hero.gif new file mode 100644 index 000000000..700ee849e Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/hero.gif differ diff --git a/payment_proof_attachment/static/description/banner.png b/payment_proof_attachment/static/description/banner.png new file mode 100644 index 000000000..f4e570c99 Binary files /dev/null and b/payment_proof_attachment/static/description/banner.png differ diff --git a/payment_proof_attachment/static/description/icon.png b/payment_proof_attachment/static/description/icon.png new file mode 100644 index 000000000..b9af75e2c Binary files /dev/null and b/payment_proof_attachment/static/description/icon.png differ diff --git a/payment_proof_attachment/static/description/index.html b/payment_proof_attachment/static/description/index.html new file mode 100755 index 000000000..72a2dc809 --- /dev/null +++ b/payment_proof_attachment/static/description/index.html @@ -0,0 +1,641 @@ +
+ +
+ +
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+ +
+
+
+ +

+ Payment Proof Attachment +

+

Let Your Customer can Attach the Proof of Payment.

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

Explore This + Module

+
+ + + + +
+
+ +
+

Overview +

+
+
+
+ In this module user can attach their payment information while creating quotation or in the payment screen. +
+ +
+ + + +
+
+ +
+

Features +

+
+
+
+
+ + Customer can attach files in the "My Account" screen and "Payment" screen. +
+
+ + Customer can upload both image and pdf files. +
+
+ + Customer can upload multiple files. +
+
+
+ +
+ + It is available for all manual transactions. +
+
+ + Admin can see the uploaded file in the sale order section. +
+
+
+ + + +
+
+ +
+

Screenshots +

+
+
+
+ +
+

Portal View + +

+

In the "My Account" section. +

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

User can upload both image and pdf files. +

+ +
+
+ +

User can see the uploaded files. +

+ +
+
+ + +
+ +
+ +

In the payment screen section. +

+ +
+ + +
+ +

+

+ +
+ + +
+ +

+

+ +
+
+ +

User can see the uploaded files. +

+ +
+
+ + +
+ + +
+ +

Admin can see the uploaded files in the backend. +

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

+ 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/payment_proof_attachment/static/src/css/payment_proof.css b/payment_proof_attachment/static/src/css/payment_proof.css new file mode 100755 index 000000000..c3d5c9512 --- /dev/null +++ b/payment_proof_attachment/static/src/css/payment_proof.css @@ -0,0 +1,68 @@ +.modal { + display: none; /* Hidden by default */ + position: fixed; /* Stay in place */ + z-index: 1; /* Sit on top */ + padding-top: 100px; /* Location of the box */ + left: 0; + top: 0; + width: 100%; /* Full width */ + height: 100%; /* Full height */ + overflow: auto; /* Enable scroll if needed */ + background-color: rgb(0,0,0); /* Fallback color */ + background-color: rgba(0,0,0,0.4); /* Black w/ opacity */ +} + +/* Modal Content */ +.modal-content { + position: relative; + background-color: #fefefe; + margin: auto; + padding: 0; + border: 1px solid #888; + width: 40%; + box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19); + -webkit-animation-name: animatetop; + -webkit-animation-duration: 0.4s; + animation-name: animatetop; + animation-duration: 0.4s +} + +/* Add Animation */ +@-webkit-keyframes animatetop { + from {top:-300px; opacity:0} + to {top:0; opacity:1} +} + +@keyframes animatetop { + from {top:-300px; opacity:0} + to {top:0; opacity:1} +} +/* The Close Button */ +.close { + color: white; + float: right; + font-size: 28px; + font-weight: bold; +} + +.close:hover, +.close:focus { + color: #000; + text-decoration: none; + cursor: pointer; +} + +.modal-header { + padding: 2px 16px; + background-color: #71639E; + color: white; +} + +.modal-body {padding: 2px 16px;} + +.modal-footer { + padding: 2px 16px; + background-color: #71639E; + color: white; +} + diff --git a/payment_proof_attachment/static/src/js/my_account_screen.js b/payment_proof_attachment/static/src/js/my_account_screen.js new file mode 100755 index 000000000..933010163 --- /dev/null +++ b/payment_proof_attachment/static/src/js/my_account_screen.js @@ -0,0 +1,89 @@ +odoo.define('payment_proof_attachment.my_account_screen', function(require) { + "use strict"; + var PublicWidget = require('web.public.widget'); + var ajax = require('web.ajax'); + var Template = PublicWidget.Widget.extend({ + selector: '.my_account_screen', + events: { + 'click #btnShowModal': '_onClickShowModal', + 'click .close_modal': '_onClickCloseModal', + 'change #payment_proof': '_onChangePaymentProof', + 'click #payment_proof_update': '_onClickUpdateAttachment', + 'click #btnShowReceipt': '_onClickShowReceipt', + 'click #refresh_receipt': '_onClickShowReceipt', + }, + /** + *for showing the modal dialog + */ + _onClickShowModal: function() { + this.el.querySelector('#myModal').style.display = 'block'; + }, + /** + *for closing the modal dialog + */ + _onClickCloseModal: function() { + this.el.querySelector('#myModal').style.display = 'none'; + }, + /** + *getting content from the uploaded file + */ + _onChangePaymentProof: function(ev) { + const files = ev.target.files; + var fileList = []; + for (let i = 0; i < files.length; i++) { + var reader = new FileReader(); + var reader_content = reader.readAsDataURL(files[i]); + reader.onload = function(reader_content) { + var dataURL = reader_content.target.result.split(',')[1]; + var fileName = files[i].name; + fileList.push({ + name: fileName, + content: dataURL + }); + } + } + this.fileList = fileList; + }, + /** + *transfer the content to python in my account screen + */ + _onClickUpdateAttachment: function(ev) { + var self = this; + this.el.querySelector('#myModal').style.display = 'none'; + if (self.fileList) { + ajax.jsonRpc('/payment_proof/submit', 'call', { + 'sale_id': Number(self.$(ev.currentTarget).attr('value')), + 'attachments': this.fileList + }).then(function() { + self.fileList = "" + self.$el.find("#payment_proof").val("") + }); + } + }, + /** + *getting updated attachments + */ + _onClickShowReceipt: function() { + var self = this; + this.el.querySelector('#updated_receipt').style.display = 'block'; + this.el.querySelector('#btnShowReceipt').style.display = 'none'; + ajax.jsonRpc('/my_account_screen/show_updated', 'call', { + 'data': this.el.querySelector('#btnShowReceipt').getAttribute('value'), + }).then(function(attachment_ids) { + if (attachment_ids.length > 0) { + self.$el.find("#showing_updated_receipt").empty(); + $(attachment_ids).each(function(attachment_id) { + var id = "/web/content/" + attachment_ids[attachment_id]['id'] + var name = attachment_ids[attachment_id]['name'] + self.$el.find('#showing_updated_receipt').append("" + name + "
"); + }); + } else { + self.$el.find("#showing_updated_receipt").empty(); + self.$el.find('#showing_updated_receipt').append("

There is no attachments for this sale order.

") + } + }) + } + }) + PublicWidget.registry.my_account_screen = Template; + return Template; +}) diff --git a/payment_proof_attachment/static/src/js/payment_screen.js b/payment_proof_attachment/static/src/js/payment_screen.js new file mode 100755 index 000000000..4fdfa6e1b --- /dev/null +++ b/payment_proof_attachment/static/src/js/payment_screen.js @@ -0,0 +1,87 @@ +odoo.define('payment_proof_attachment.payment_screen', function(require) { + "use strict"; + var PublicWidget = require('web.public.widget'); + var ajax = require('web.ajax'); + var Template = PublicWidget.Widget.extend({ + selector: '.payment_screen', + events: { + 'click #btnShowModal': '_onClickShowModal', + 'click .close_modal': '_onClickCloseModal', + 'change #payment_proof': '_onChangePaymentProof', + 'click #payment_proof_cart_update': '_onClickUpdateAttachment', + 'click #paymentScreenBtnShowReceipt': '_onClickShowReceipt', + 'click #refresh_payment_receipt': '_onClickShowReceipt', + }, + /** + *for showing the modal dialog + */ + _onClickShowModal: function() { + this.$el.find('#myModal').css("display", "block") + }, + /** + *for closing the modal dialog + */ + _onClickCloseModal: function() { + this.$el.find('#myModal').css("display", "none") + }, + /** + *getting content from the uploaded file + */ + _onChangePaymentProof: function(ev) { + const files = ev.target.files; + var fileList = []; + for (let i = 0; i < files.length; i++) { + var reader = new FileReader(); + var reader_content = reader.readAsDataURL(files[i]); + reader.onload = function(reader_content) { + var dataURL = reader_content.target.result.split(',')[1]; + var fileName = files[i].name; + fileList.push({ + name: fileName, + content: dataURL + }); + } + } + this.fileList = fileList; + }, + /** + *transfer the content to python in payment screen + */ + _onClickUpdateAttachment: function(ev) { + var self = this; + this.$el.find('#myModal').css("display", "none") + if(self.fileList){ + ajax.jsonRpc('/payment_proof/submit', 'call', { + 'attachments':self.fileList + }).then(function() { + self.fileList = "" + self.$el.find("#payment_proof").val("") + + }); + } + }, + /** + *getting updated attachments + */ + _onClickShowReceipt: function(ev) { + var self = this; + this.$el.find('#updated_receipt').css("display", "block") + this.$el.find('#paymentScreenBtnShowReceipt').css("display", "none") + ajax.jsonRpc('/my_account_screen/show_updated', 'call').then(function(attachment_ids) { + if (attachment_ids.length > 0) { + self.$el.find("#showing_updated_receipt").empty(); + $(attachment_ids).each(function(attachment_id) { + var id = "/web/content/" + attachment_ids[attachment_id]['id'] + var name = attachment_ids[attachment_id]['name'] + self.$el.find('#showing_updated_receipt').append("" + name + "
"); + }); + } else { + self.$el.find("#showing_updated_receipt").empty(); + self.$el.find('#showing_updated_receipt').append("

+