diff --git a/payment_proof_attachment/README.rst b/payment_proof_attachment/README.rst new file mode 100755 index 000000000..588240884 --- /dev/null +++ b/payment_proof_attachment/README.rst @@ -0,0 +1,47 @@ +.. 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 + +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 + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: V(16) yadhukrishnan @ cybrosys + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +License +------- +General Public License, Version 3 (LGPL v3). +(https://www.odoo.com/documentation/user/16.0/legal/licenses/licenses.html) + +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/payment_proof_attachment/__init__.py b/payment_proof_attachment/__init__.py new file mode 100755 index 000000000..e20701c73 --- /dev/null +++ b/payment_proof_attachment/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Yadhukrishnan K (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..34f66e0af --- /dev/null +++ b/payment_proof_attachment/__manifest__.py @@ -0,0 +1,53 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Yadhukrishnan K (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', + 'category': 'Website', + 'version': '16.0.1.0.0', + 'author': 'Cybrosys Techno Solutions', + 'company': 'Cybrosys Techno Solutions', + 'maintainer': 'Cybrosys Techno Solutions', + 'website': 'https://www.cybrosys.com', + 'summary': """Proof Attachment In Website for Odoo 16 Community and + Enterprise Edition.""", + 'description': """This module allows the customers to attach proof + attachments in the website""", + 'images': ['static/description/banner.png'], + 'depends': [ + 'base', + 'website_sale', + 'sale_management' + ], + 'data': [ + 'views/template.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', + ] + }, + 'license': 'AGPL-3', + 'installable': True, + 'application': False, + 'auto_install': False, +} diff --git a/payment_proof_attachment/controllers/__init__.py b/payment_proof_attachment/controllers/__init__.py new file mode 100755 index 000000000..b3701cea6 --- /dev/null +++ b/payment_proof_attachment/controllers/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2023-TODAY Cybrosys Technologies(). +# Author: Yadhukrishnan K (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..0ed837c34 --- /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: Yadhukrishnan K (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 + attached_files = kw['attachments'] + for attachment in attached_files: + name = attachment['name'] + content = attachment['content'] + request.env['ir.attachment'].sudo().create({ + 'name': name, + 'res_model': 'sale.order', + 'res_id': sale_id, + 'type': 'binary', + 'public': True, + 'datas': content, + }) + 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 + user_id = request.session.uid + attachment_ids_list = [] + attachment_ids = request.env['ir.attachment'].sudo().search([( + 'res_model', '=', 'sale.order'), ('res_id', '=', sale_id), + ('create_uid', '=', user_id)]) + 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..1f3b8ff99 --- /dev/null +++ b/payment_proof_attachment/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 29.07.2023 +#### Version 16.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/l1.png b/payment_proof_attachment/static/description/assets/modules/l1.png new file mode 100755 index 000000000..ed175b076 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/modules/l1.png differ diff --git a/payment_proof_attachment/static/description/assets/modules/l2.png b/payment_proof_attachment/static/description/assets/modules/l2.png new file mode 100755 index 000000000..a3194264c Binary files /dev/null and b/payment_proof_attachment/static/description/assets/modules/l2.png differ diff --git a/payment_proof_attachment/static/description/assets/modules/l3.png b/payment_proof_attachment/static/description/assets/modules/l3.png new file mode 100755 index 000000000..e894393ef Binary files /dev/null and b/payment_proof_attachment/static/description/assets/modules/l3.png differ diff --git a/payment_proof_attachment/static/description/assets/modules/l4.png b/payment_proof_attachment/static/description/assets/modules/l4.png new file mode 100755 index 000000000..f3c986fc1 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/modules/l4.png differ diff --git a/payment_proof_attachment/static/description/assets/modules/l5.png b/payment_proof_attachment/static/description/assets/modules/l5.png new file mode 100755 index 000000000..b21837312 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/modules/l5.png differ diff --git a/payment_proof_attachment/static/description/assets/modules/l6.png b/payment_proof_attachment/static/description/assets/modules/l6.png new file mode 100755 index 000000000..e64a5b55c Binary files /dev/null and b/payment_proof_attachment/static/description/assets/modules/l6.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/Screenshot.png b/payment_proof_attachment/static/description/assets/screenshots/Screenshot.png new file mode 100755 index 000000000..64331a85c Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/Screenshot.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/Screenshot10.jpeg b/payment_proof_attachment/static/description/assets/screenshots/Screenshot10.jpeg new file mode 100755 index 000000000..9658ce2f2 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/Screenshot10.jpeg differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/Screenshot11.jpeg b/payment_proof_attachment/static/description/assets/screenshots/Screenshot11.jpeg new file mode 100755 index 000000000..d4708aa7e Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/Screenshot11.jpeg differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/Screenshot12.jpeg b/payment_proof_attachment/static/description/assets/screenshots/Screenshot12.jpeg new file mode 100755 index 000000000..d443d9279 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/Screenshot12.jpeg differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/Screenshot2.png b/payment_proof_attachment/static/description/assets/screenshots/Screenshot2.png new file mode 100755 index 000000000..5ab28b330 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/Screenshot2.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/Screenshot3.jpg b/payment_proof_attachment/static/description/assets/screenshots/Screenshot3.jpg new file mode 100755 index 000000000..68769f2a1 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/Screenshot3.jpg differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/Screenshot4.jpeg b/payment_proof_attachment/static/description/assets/screenshots/Screenshot4.jpeg new file mode 100755 index 000000000..f804c0f2b Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/Screenshot4.jpeg differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/Screenshot5.png b/payment_proof_attachment/static/description/assets/screenshots/Screenshot5.png new file mode 100755 index 000000000..99c66ac1c Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/Screenshot5.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/Screenshot6.png b/payment_proof_attachment/static/description/assets/screenshots/Screenshot6.png new file mode 100755 index 000000000..910006f90 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/Screenshot6.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/Screenshot7.jpeg b/payment_proof_attachment/static/description/assets/screenshots/Screenshot7.jpeg new file mode 100755 index 000000000..ec199b181 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/Screenshot7.jpeg differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/Screenshot8.jpeg b/payment_proof_attachment/static/description/assets/screenshots/Screenshot8.jpeg new file mode 100755 index 000000000..f0c78f2ca Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/Screenshot8.jpeg differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/Screenshot9.jpeg b/payment_proof_attachment/static/description/assets/screenshots/Screenshot9.jpeg new file mode 100755 index 000000000..377934bed Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/Screenshot9.jpeg 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 100755 index 000000000..93ac7f4a8 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..a78662b18 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 100755 index 000000000..84a00bbcd 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..d1db9a604 --- /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..fffbe1d20 --- /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; +}) \ No newline at end of file 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..9d9d2b0a4 --- /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("

+