diff --git a/payment_proof_attachment/README.rst b/payment_proof_attachment/README.rst new file mode 100755 index 000000000..385711f9b --- /dev/null +++ b/payment_proof_attachment/README.rst @@ -0,0 +1,48 @@ +.. 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 + +Company +------- +* `Cybrosys Techno Solutions `__ + +Credits +------- +* Developers: V(16) yadhukrishnan @ cybrosys + V(17) Sabeel B @ cybrosys + +Contacts +-------- +* Mail Contact : odoo@cybrosys.com +* Website : https://cybrosys.com + +License +------- +General Public License, Version 3 (AGPL v3). +(https://www.gnu.org/licenses/agpl-3.0-standalone.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..94ea4e5da --- /dev/null +++ b/payment_proof_attachment/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Sabeel B (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..d28332d2d --- /dev/null +++ b/payment_proof_attachment/__manifest__.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Sabeel B (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': '17.0.1.0.0', + 'category': 'Website', + 'summary': """Proof Attachment In Website for Odoo 17 Community and + Enterprise Edition.""", + 'description': """This module allows the customers to attach proof + attachments 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' + ], + 'data': [ + 'views/attachment_templates.xml', + ], + 'assets': { + 'web.assets_frontend': [ + 'payment_proof_attachment/static/src/js/*.js', + 'payment_proof_attachment/static/src/css/payment_proof.css', + ] + }, + 'images': ['static/description/banner.jpg'], + '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..37d4b3adf --- /dev/null +++ b/payment_proof_attachment/controllers/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Sabeel B (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..6ed01f368 --- /dev/null +++ b/payment_proof_attachment/controllers/payment_proof_attachment.py @@ -0,0 +1,97 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Sabeel B (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..c86c58fee --- /dev/null +++ b/payment_proof_attachment/doc/RELEASE_NOTES.md @@ -0,0 +1,6 @@ +## Module + +#### 07.02.2024 +#### Version 17.0.1.0.0 +##### ADD +- Initial Commit for Payment Proof Attachment diff --git a/payment_proof_attachment/static/description/assets/icons/capture (1).png b/payment_proof_attachment/static/description/assets/icons/capture (1).png new file mode 100644 index 000000000..8824deafc Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/capture (1).png differ 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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/img.png b/payment_proof_attachment/static/description/assets/icons/img.png new file mode 100644 index 000000000..70197f477 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/img.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 100644 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 100644 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 100644 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/photo-capture.png b/payment_proof_attachment/static/description/assets/icons/photo-capture.png new file mode 100644 index 000000000..06c111758 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/photo-capture.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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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 100644 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/Cybrosys R.png b/payment_proof_attachment/static/description/assets/misc/Cybrosys R.png new file mode 100644 index 000000000..da4058087 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/misc/Cybrosys R.png differ diff --git a/payment_proof_attachment/static/description/assets/misc/email.svg b/payment_proof_attachment/static/description/assets/misc/email.svg new file mode 100644 index 000000000..15291cdc3 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/misc/email.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/payment_proof_attachment/static/description/assets/misc/phone.svg b/payment_proof_attachment/static/description/assets/misc/phone.svg new file mode 100644 index 000000000..b7bd7f251 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/misc/phone.svg @@ -0,0 +1,3 @@ + + + diff --git a/payment_proof_attachment/static/description/assets/misc/star (1) 2.svg b/payment_proof_attachment/static/description/assets/misc/star (1) 2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/payment_proof_attachment/static/description/assets/misc/star (1) 2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/payment_proof_attachment/static/description/assets/misc/support (1) 1.svg b/payment_proof_attachment/static/description/assets/misc/support (1) 1.svg new file mode 100644 index 000000000..7d37a8f30 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/misc/support (1) 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/payment_proof_attachment/static/description/assets/misc/support-email.svg b/payment_proof_attachment/static/description/assets/misc/support-email.svg new file mode 100644 index 000000000..eb70370d6 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/misc/support-email.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/payment_proof_attachment/static/description/assets/misc/tick-mark.svg b/payment_proof_attachment/static/description/assets/misc/tick-mark.svg new file mode 100644 index 000000000..2dbb40187 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/misc/tick-mark.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/payment_proof_attachment/static/description/assets/misc/whatsapp 1.svg b/payment_proof_attachment/static/description/assets/misc/whatsapp 1.svg new file mode 100644 index 000000000..0bfaf8fc6 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/misc/whatsapp 1.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/payment_proof_attachment/static/description/assets/misc/whatsapp.svg b/payment_proof_attachment/static/description/assets/misc/whatsapp.svg new file mode 100644 index 000000000..b618aea1d --- /dev/null +++ b/payment_proof_attachment/static/description/assets/misc/whatsapp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/payment_proof_attachment/static/description/assets/modules/1.png b/payment_proof_attachment/static/description/assets/modules/1.png new file mode 100644 index 000000000..0e311ca87 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/modules/1.png differ diff --git a/payment_proof_attachment/static/description/assets/modules/2.png b/payment_proof_attachment/static/description/assets/modules/2.png new file mode 100644 index 000000000..a0ac2d840 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/modules/2.png differ diff --git a/payment_proof_attachment/static/description/assets/modules/3.png b/payment_proof_attachment/static/description/assets/modules/3.png new file mode 100644 index 000000000..cb17cf612 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/modules/3.png differ diff --git a/payment_proof_attachment/static/description/assets/modules/4.jpg b/payment_proof_attachment/static/description/assets/modules/4.jpg new file mode 100644 index 000000000..67c7f7062 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/modules/4.jpg differ diff --git a/payment_proof_attachment/static/description/assets/modules/5.png b/payment_proof_attachment/static/description/assets/modules/5.png new file mode 100644 index 000000000..8513873ea Binary files /dev/null and b/payment_proof_attachment/static/description/assets/modules/5.png differ diff --git a/payment_proof_attachment/static/description/assets/modules/6.jpg b/payment_proof_attachment/static/description/assets/modules/6.jpg new file mode 100644 index 000000000..73781cf50 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/modules/6.jpg 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..ad05b0fe1 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/hero.gif differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/scrn_1.png b/payment_proof_attachment/static/description/assets/screenshots/scrn_1.png new file mode 100644 index 000000000..0c23fe128 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/scrn_1.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/scrn_10.png b/payment_proof_attachment/static/description/assets/screenshots/scrn_10.png new file mode 100644 index 000000000..3acce8195 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/scrn_10.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/scrn_11.png b/payment_proof_attachment/static/description/assets/screenshots/scrn_11.png new file mode 100644 index 000000000..1242a1de0 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/scrn_11.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/scrn_12.png b/payment_proof_attachment/static/description/assets/screenshots/scrn_12.png new file mode 100644 index 000000000..21457699c Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/scrn_12.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/scrn_2.png b/payment_proof_attachment/static/description/assets/screenshots/scrn_2.png new file mode 100644 index 000000000..66c00d97a Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/scrn_2.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/scrn_3.png b/payment_proof_attachment/static/description/assets/screenshots/scrn_3.png new file mode 100644 index 000000000..5ff79103b Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/scrn_3.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/scrn_4.png b/payment_proof_attachment/static/description/assets/screenshots/scrn_4.png new file mode 100644 index 000000000..7f614696c Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/scrn_4.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/scrn_5.png b/payment_proof_attachment/static/description/assets/screenshots/scrn_5.png new file mode 100644 index 000000000..d6c8891a4 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/scrn_5.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/scrn_6.png b/payment_proof_attachment/static/description/assets/screenshots/scrn_6.png new file mode 100644 index 000000000..c4b9b8974 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/scrn_6.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/scrn_7.png b/payment_proof_attachment/static/description/assets/screenshots/scrn_7.png new file mode 100644 index 000000000..63db51187 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/scrn_7.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/scrn_8.png b/payment_proof_attachment/static/description/assets/screenshots/scrn_8.png new file mode 100644 index 000000000..bbdfd0cc9 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/scrn_8.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshots/scrn_9.png b/payment_proof_attachment/static/description/assets/screenshots/scrn_9.png new file mode 100644 index 000000000..daa9a66e8 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshots/scrn_9.png differ diff --git a/payment_proof_attachment/static/description/banner.jpg b/payment_proof_attachment/static/description/banner.jpg new file mode 100644 index 000000000..c78e07a9c Binary files /dev/null and b/payment_proof_attachment/static/description/banner.jpg 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..0a880ca4d 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 100644 index 000000000..ede3a4c05 --- /dev/null +++ b/payment_proof_attachment/static/description/index.html @@ -0,0 +1,614 @@ + + + + + + + Odoo App 3 Index + + + + + + + + +
+
+
+
+
+ +
+
+
+ Community +
+
+ Enterprise +
+
+ Odoo.sh +
+
+
+
+
+
+

+ Payment Proof Attachment

+

+ Let your customer can attach the proof of payment. +

+
+ +
+
+
+
+
+

Key Highlights +

+
+
+
+
+
+ +
+
+

User can upload their payment information.

+

User can upload both image and pdf files while creating quotation or in the payment screen +

+
+
+
+
+
+
+ +
+
+

Displays attached payment

+

User can display already uploaded files +

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

+ 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.

+
+
+
+ +
+
+
+
    +
  • + 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. +
  • +
+
+
+
+
+
+
Version + 17.0.1.0.0|Released on:20th January 2024 +
+

+ + Initial Commit for Payment Proof Attachment.

+
+
+
+
+
+
+
+

Related Products

+
+
+ +
+
+

Our Services

+ +
+
+
+
+
+
+
+
+ service-icon +
+
+

Odoo Customization

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Support

+
+
+
+
+
+
+ service-icon +
+
+

Hire Odoo Developer

+
+
+
+
+ +
+
+ service-icon +
+
+

Odoo Integration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Migration

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Consultancy

+
+
+
+
+
+
+ service-icon +
+
+

Odoo Implementation

+
+
+
+
+
+
+ service-icon +
+
+

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 + 99456767686
+
+
+
+
+
+
+
+
+ + + + + + 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..68533bd98 --- /dev/null +++ b/payment_proof_attachment/static/src/css/payment_proof.css @@ -0,0 +1,68 @@ +.payment_proof_modal { + display: none; /* Hidden by default */ + position: fixed; /* Stay in place */ + z-index: 1300; /* 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 */ +.payment_proof_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; +} + +.payment_proof_modal_header { + padding: 2px 16px; + background-color: #71639E; + color: white; +} + +.payment_proof_modal_body {padding: 2px 16px;} + +.payment_proof_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..5ac27d99e --- /dev/null +++ b/payment_proof_attachment/static/src/js/my_account_screen.js @@ -0,0 +1,88 @@ +/** @odoo-module **/ +import publicWidget from "@web/legacy/js/public/public_widget"; + +publicWidget.registry.Template = publicWidget.Widget.extend({ + init() { + this.rpc = this.bindService("rpc"); + }, + 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) { + this.rpc('/payment_proof/submit', { + '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'; + this.rpc('/my_account_screen/show_updated', { + '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.

") + } + }) + } +}) 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..5df88c041 --- /dev/null +++ b/payment_proof_attachment/static/src/js/payment_screen.js @@ -0,0 +1,85 @@ +/** @odoo-module **/ +import publicWidget from "@web/legacy/js/public/public_widget"; + +publicWidget.registry.PaymentProof = publicWidget.Widget.extend({ + init() { + this.rpc = this.bindService("rpc"); + }, + 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 closing 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 payment screen + */ + _onClickUpdateAttachment: function (ev) { + var self = this; + this.el.querySelector('#myModal').style.display = 'none'; + if (self.fileList) { + this.rpc('/payment_proof/submit', { + 'attachments': this.fileList + }).then(function () { + self.fileList = "" + self.$el.find("#payment_proof").val("") + }); + } + }, + /** + *getting updated attachments + */ + _onClickShowReceipt: function () { + var self = this; + this.$el.find('#updated_receipt').css("display", "block") + this.$el.find('#paymentScreenBtnShowReceipt').css("display", "none") + this.rpc('/my_account_screen/show_updated', {}).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("

+