diff --git a/payment_proof_attachment/README.rst b/payment_proof_attachment/README.rst new file mode 100755 index 000000000..1fa15feb1 --- /dev/null +++ b/payment_proof_attachment/README.rst @@ -0,0 +1,50 @@ +.. 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, + V(17) Sabeel B, + V(18) Raneesha MK +Contact : odoo@cybrosys.com + +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..21e2e2241 --- /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: Raneesha MK (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..3a935e4f4 --- /dev/null +++ b/payment_proof_attachment/__manifest__.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Raneesha MK (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': '18.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', + 'data/payment_proof_attachment.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..a4425b167 --- /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: Raneesha MK (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..922d334d4 --- /dev/null +++ b/payment_proof_attachment/controllers/payment_proof_attachment.py @@ -0,0 +1,113 @@ +# -*- coding: utf-8 -*- +################################################################################ +# +# Cybrosys Technologies Pvt. Ltd. +# +# Copyright (C) 2024-TODAY Cybrosys Technologies(). +# Author: Raneesha MK (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) + attached_files = kw['attachments'] + for attachment in attached_files: + name = attachment['name'] + content = attachment['content'] + payment_proof_attachment = request.env[ + 'ir.attachment'].sudo().create({ + 'name': name, + 'res_model': 'sale.order', + 'res_id': sale_id, + 'type': 'binary', + 'public': True, + 'datas': content, + }) + copied_attachment = payment_proof_attachment.copy() + body = _("%s document is added by %s" % ( + attachment['name'], request.env.user.name)) + sale.message_post(body=body) + mail_template = request.env.ref( + 'payment_proof_attachment' + '.payment_proof_attachment_email_template').id + payment_proof_template = request.env['mail.template'].browse( + mail_template) + payment_proof_template.attachment_ids = [ + (6, 0, [copied_attachment.id])] + payment_proof_template.send_mail(sale_id, force_send=True) + payment_proof_template.attachment_ids = [(3, copied_attachment.id)] + + 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/data/payment_proof_attachment.xml b/payment_proof_attachment/data/payment_proof_attachment.xml new file mode 100644 index 000000000..cbf09725f --- /dev/null +++ b/payment_proof_attachment/data/payment_proof_attachment.xml @@ -0,0 +1,29 @@ + + + + + Sales Order: Payment Proof Attachment + + Payment Proof Attachment + {{ (object.user_id.email_formatted or + user.email_formatted or '') }} + + {{ object.partner_id.id }} + +
+ Dear, + +

Your Payment Proof Attachment is Uploaded Successfully +

+

Best regards,

+ + + +
+
+ {{ object.partner_id.lang }} + +
+
+
diff --git a/payment_proof_attachment/doc/RELEASE_NOTES.md b/payment_proof_attachment/doc/RELEASE_NOTES.md new file mode 100755 index 000000000..7325e3261 --- /dev/null +++ b/payment_proof_attachment/doc/RELEASE_NOTES.md @@ -0,0 +1,5 @@ +## Module +#### 05.10.2024 +#### Version 18.0.1.0.0 +##### ADD +- Initial Commit for Payment Proof Attachment diff --git a/payment_proof_attachment/static/description/assets/cybro-icon.png b/payment_proof_attachment/static/description/assets/cybro-icon.png new file mode 100644 index 000000000..06e73e11d Binary files /dev/null and b/payment_proof_attachment/static/description/assets/cybro-icon.png differ diff --git a/payment_proof_attachment/static/description/assets/cybro-odoo.png b/payment_proof_attachment/static/description/assets/cybro-odoo.png new file mode 100644 index 000000000..ed02e07a4 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/cybro-odoo.png differ diff --git a/payment_proof_attachment/static/description/assets/h2.png b/payment_proof_attachment/static/description/assets/h2.png new file mode 100644 index 000000000..0bfc4707d Binary files /dev/null and b/payment_proof_attachment/static/description/assets/h2.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/arrows-repeat.svg b/payment_proof_attachment/static/description/assets/icons/arrows-repeat.svg new file mode 100644 index 000000000..1d7efabc5 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/arrows-repeat.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/payment_proof_attachment/static/description/assets/icons/banner-1.png b/payment_proof_attachment/static/description/assets/icons/banner-1.png new file mode 100644 index 000000000..c180db172 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/banner-1.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/banner-2.svg b/payment_proof_attachment/static/description/assets/icons/banner-2.svg new file mode 100644 index 000000000..e606d97d9 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/banner-2.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/payment_proof_attachment/static/description/assets/icons/banner-bg.png b/payment_proof_attachment/static/description/assets/icons/banner-bg.png new file mode 100644 index 000000000..a8238d3c0 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/banner-bg.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/banner-bg.svg b/payment_proof_attachment/static/description/assets/icons/banner-bg.svg new file mode 100644 index 000000000..b1378103e --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/banner-bg.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/payment_proof_attachment/static/description/assets/icons/banner-call.svg b/payment_proof_attachment/static/description/assets/icons/banner-call.svg new file mode 100644 index 000000000..96c687e81 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/banner-call.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/payment_proof_attachment/static/description/assets/icons/banner-mail.svg b/payment_proof_attachment/static/description/assets/icons/banner-mail.svg new file mode 100644 index 000000000..cbf0d158d --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/banner-mail.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/payment_proof_attachment/static/description/assets/icons/banner-pattern.svg b/payment_proof_attachment/static/description/assets/icons/banner-pattern.svg new file mode 100644 index 000000000..9c1c7e101 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/banner-pattern.svg @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/payment_proof_attachment/static/description/assets/icons/banner-promo.svg b/payment_proof_attachment/static/description/assets/icons/banner-promo.svg new file mode 100644 index 000000000..d52791b11 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/banner-promo.svg @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/payment_proof_attachment/static/description/assets/icons/brand-pair.svg b/payment_proof_attachment/static/description/assets/icons/brand-pair.svg new file mode 100644 index 000000000..d8db7fc1e --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/brand-pair.svg @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/close-icon.svg b/payment_proof_attachment/static/description/assets/icons/close-icon.svg new file mode 100644 index 000000000..df8cce37a --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/close-icon.svg @@ -0,0 +1,5 @@ + + + + + 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/collabarate-icon.svg b/payment_proof_attachment/static/description/assets/icons/collabarate-icon.svg new file mode 100644 index 000000000..dd4e10518 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/collabarate-icon.svg @@ -0,0 +1,3 @@ + + + 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/cybro-logo.png b/payment_proof_attachment/static/description/assets/icons/cybro-logo.png new file mode 100644 index 000000000..ff4b78220 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/cybro-logo.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/down.svg b/payment_proof_attachment/static/description/assets/icons/down.svg new file mode 100644 index 000000000..f21c36271 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/down.svg @@ -0,0 +1 @@ + \ No newline at end of file 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/faq.png b/payment_proof_attachment/static/description/assets/icons/faq.png new file mode 100644 index 000000000..4250b5b81 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/faq.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/feature-icon.svg b/payment_proof_attachment/static/description/assets/icons/feature-icon.svg new file mode 100644 index 000000000..fa0ea6850 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/feature-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/payment_proof_attachment/static/description/assets/icons/feature.png b/payment_proof_attachment/static/description/assets/icons/feature.png new file mode 100644 index 000000000..ac7a785c0 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/feature.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/gear.svg b/payment_proof_attachment/static/description/assets/icons/gear.svg new file mode 100644 index 000000000..0cc66b6ea --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/gear.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/payment_proof_attachment/static/description/assets/icons/hire-odoo.svg b/payment_proof_attachment/static/description/assets/icons/hire-odoo.svg new file mode 100644 index 000000000..e1ac089b0 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/hire-odoo.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + 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/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/life-ring-icon.svg b/payment_proof_attachment/static/description/assets/icons/life-ring-icon.svg new file mode 100644 index 000000000..3ae6e1d89 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/life-ring-icon.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + 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/mail.svg b/payment_proof_attachment/static/description/assets/icons/mail.svg new file mode 100644 index 000000000..1eedde695 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/mail.svg @@ -0,0 +1,3 @@ + + + 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/notes.png b/payment_proof_attachment/static/description/assets/icons/notes.png new file mode 100644 index 000000000..ee5e95404 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/notes.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/notification icon.svg b/payment_proof_attachment/static/description/assets/icons/notification icon.svg new file mode 100644 index 000000000..053189973 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/notification icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/payment_proof_attachment/static/description/assets/icons/odoo-consultancy.svg b/payment_proof_attachment/static/description/assets/icons/odoo-consultancy.svg new file mode 100644 index 000000000..e05f65bde --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/odoo-consultancy.svg @@ -0,0 +1,4 @@ + + + + diff --git a/payment_proof_attachment/static/description/assets/icons/odoo-licencing.svg b/payment_proof_attachment/static/description/assets/icons/odoo-licencing.svg new file mode 100644 index 000000000..2606c88b0 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/odoo-licencing.svg @@ -0,0 +1,3 @@ + + + diff --git a/payment_proof_attachment/static/description/assets/icons/odoo-logo.png b/payment_proof_attachment/static/description/assets/icons/odoo-logo.png new file mode 100644 index 000000000..0e4d0eb5a Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/odoo-logo.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/patter.svg b/payment_proof_attachment/static/description/assets/icons/patter.svg new file mode 100644 index 000000000..25c9c0a8f --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/patter.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/payment_proof_attachment/static/description/assets/icons/pattern1.png b/payment_proof_attachment/static/description/assets/icons/pattern1.png new file mode 100644 index 000000000..09ab0fb2d Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/pattern1.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-piece-icon.svg b/payment_proof_attachment/static/description/assets/icons/puzzle-piece-icon.svg new file mode 100644 index 000000000..3e9ad9373 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/puzzle-piece-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + 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/replace-icon.svg b/payment_proof_attachment/static/description/assets/icons/replace-icon.svg new file mode 100644 index 000000000..d0e3a7af1 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/replace-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + 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/screenshot-main.png b/payment_proof_attachment/static/description/assets/icons/screenshot-main.png new file mode 100644 index 000000000..575f8e676 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/screenshot-main.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/screenshot.png b/payment_proof_attachment/static/description/assets/icons/screenshot.png new file mode 100644 index 000000000..cef272529 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/screenshot.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/skype-fill.svg b/payment_proof_attachment/static/description/assets/icons/skype-fill.svg new file mode 100644 index 000000000..c17423639 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/skype-fill.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/payment_proof_attachment/static/description/assets/icons/skype.png b/payment_proof_attachment/static/description/assets/icons/skype.png new file mode 100644 index 000000000..51b409fb3 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/skype.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/skype.svg b/payment_proof_attachment/static/description/assets/icons/skype.svg new file mode 100644 index 000000000..df3dad39b --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/skype.svg @@ -0,0 +1,3 @@ + + + diff --git a/payment_proof_attachment/static/description/assets/icons/star-1.svg b/payment_proof_attachment/static/description/assets/icons/star-1.svg new file mode 100644 index 000000000..7e55ab162 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/star-1.svg @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/payment_proof_attachment/static/description/assets/icons/star-2.svg b/payment_proof_attachment/static/description/assets/icons/star-2.svg new file mode 100644 index 000000000..5ae9f507a --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/star-2.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/payment_proof_attachment/static/description/assets/icons/support.png b/payment_proof_attachment/static/description/assets/icons/support.png new file mode 100644 index 000000000..4f18b8b82 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/support.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/test-1 - Copy.png b/payment_proof_attachment/static/description/assets/icons/test-1 - Copy.png new file mode 100644 index 000000000..f6a902663 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/test-1 - Copy.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/test-1.png b/payment_proof_attachment/static/description/assets/icons/test-1.png new file mode 100644 index 000000000..0908add2b Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/test-1.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/test-2.png b/payment_proof_attachment/static/description/assets/icons/test-2.png new file mode 100644 index 000000000..4671fe91e Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/test-2.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/translate.svg b/payment_proof_attachment/static/description/assets/icons/translate.svg new file mode 100644 index 000000000..af9c8a1aa --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/translate.svg @@ -0,0 +1,10 @@ + + + + + + + + + + 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/video.png b/payment_proof_attachment/static/description/assets/icons/video.png new file mode 100644 index 000000000..576705b17 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/video.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/whatsapp.png b/payment_proof_attachment/static/description/assets/icons/whatsapp.png new file mode 100644 index 000000000..d513a5356 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/icons/whatsapp.png differ diff --git a/payment_proof_attachment/static/description/assets/icons/wrench-icon.svg b/payment_proof_attachment/static/description/assets/icons/wrench-icon.svg new file mode 100644 index 000000000..174b5a465 --- /dev/null +++ b/payment_proof_attachment/static/description/assets/icons/wrench-icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + 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/modules/1.gif b/payment_proof_attachment/static/description/assets/modules/1.gif new file mode 100644 index 000000000..ae3a880a2 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/modules/1.gif differ diff --git a/payment_proof_attachment/static/description/assets/modules/2.gif b/payment_proof_attachment/static/description/assets/modules/2.gif new file mode 100644 index 000000000..d19e2b352 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/modules/2.gif 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..8513873ea 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.png b/payment_proof_attachment/static/description/assets/modules/4.png new file mode 100644 index 000000000..3bedf7981 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/modules/4.png 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..0e311ca87 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..67c7f7062 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/screenshot/1.png b/payment_proof_attachment/static/description/assets/screenshot/1.png new file mode 100644 index 000000000..d77544bd6 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshot/1.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshot/2.png b/payment_proof_attachment/static/description/assets/screenshot/2.png new file mode 100644 index 000000000..b4682b74e Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshot/2.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshot/3.png b/payment_proof_attachment/static/description/assets/screenshot/3.png new file mode 100644 index 000000000..f14b9bc90 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshot/3.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshot/4.png b/payment_proof_attachment/static/description/assets/screenshot/4.png new file mode 100644 index 000000000..7efee5855 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshot/4.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshot/5.png b/payment_proof_attachment/static/description/assets/screenshot/5.png new file mode 100644 index 000000000..987a24823 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshot/5.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshot/6.png b/payment_proof_attachment/static/description/assets/screenshot/6.png new file mode 100644 index 000000000..ec3903553 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshot/6.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshot/7.png b/payment_proof_attachment/static/description/assets/screenshot/7.png new file mode 100644 index 000000000..15b5adca4 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshot/7.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshot/8.png b/payment_proof_attachment/static/description/assets/screenshot/8.png new file mode 100644 index 000000000..ea0134fa4 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshot/8.png differ diff --git a/payment_proof_attachment/static/description/assets/screenshot/hero.gif b/payment_proof_attachment/static/description/assets/screenshot/hero.gif new file mode 100644 index 000000000..4cc104930 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/screenshot/hero.gif differ diff --git a/payment_proof_attachment/static/description/assets/y18.jpg b/payment_proof_attachment/static/description/assets/y18.jpg new file mode 100644 index 000000000..eea1714f2 Binary files /dev/null and b/payment_proof_attachment/static/description/assets/y18.jpg 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..0136da220 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..60be1984b 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..a11b16987 --- /dev/null +++ b/payment_proof_attachment/static/description/index.html @@ -0,0 +1,1127 @@ + + + + + + Payment Proof Attachment + + + + + + + + + + +
+
+ + + +
+
+ Community +
+
+ Enterprise +
+ + + + +
+
+ +
+
+
+
+

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

+

Payment Proof Attachment +

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

Key + Heighlights

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

+
+
+ +
+
+
+ +
+
+ It is available for all manual transactions. +
+
+
+
+
+ +
+
+
+ Payment Proof Attachment + +

+ Are you ready to make your business more + organized? +
Improve now! +

+ +
+
+ +
+
+
+ + + + +
+
+ +
+
+
+
+ acc_bg +
+ +
+
+
+
+

+ In the "my account" section. + +

+
+
+

+ My account --> Quotations to Review +

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

+ Save or Update Transaction Receipt + +

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

+ User can upload both image and pdf files. + +

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

+ Show Updated Receipt Button + +

+
+
+

+ User can see the uploaded files. +

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

+ In the Payment screen section. + +

+
+
+

+ User can update transaction receipt and see the added receipts. +

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

+ Admin backend Quotation view + + +

+
+
+

+ Admin can see the uploaded files in the backend. Also, the mail will be sent to the customer. +

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

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

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

+ This module enables customers to upload and attach proof documents or files directly from the website when placing orders or submitting requests. It streamlines the process of providing necessary documentation for verification. +

+
+
+ +
+ +
+

+ Customers can easily attach proof documents during their interaction on the website (e.g., order form, inquiry form, or any relevant section) by using the "Attach File" button, which supports multiple file formats like PDF, PNG, JPEG, etc. +

+
+
+ +
+ +
+

+ The module supports common file types such as PDFs, images (JPEG, PNG), and Word documents (DOC, DOCX), depending on the website settings. +

+
+
+ +
+ +
+

+ Yes, the maximum file size for attachments can be configured by the website administrator. If a customer attempts to upload a file that exceeds this limit, an error message will be displayed. +

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

+ Latest Release 18.0.1.0.0 +

+ + 26th September, 2024 + +
+
+
+
+
+ Add +
+
+
+
    +
  • + Initial Commit +
  • + +
+
+
+
+
+
+
+
+
+
+ + + + + + +
+

+ Our Services

+ +
+ +
+
+ .... +
+
+ +
+ + +
+
+ + + + + + 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..b9b324532 --- /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: #8595A2; + color: white; +} + +.payment_proof_modal_body {padding: 2px 16px;} + +.payment_proof_modal_footer { + padding: 2px 16px; + background-color: #8595A2; + 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..868e4aa4a --- /dev/null +++ b/payment_proof_attachment/static/src/js/my_account_screen.js @@ -0,0 +1,91 @@ +/** @odoo-module **/ +import publicWidget from "@web/legacy/js/public/public_widget"; +import { rpc } from "@web/core/network/rpc"; + +publicWidget.registry.Template = publicWidget.Widget.extend({ +// init() { +// this.rpc = this.env.services.rpc; +// }, + selector: '#wrapwrap', + 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) { + 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'; + 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..918d7e733 --- /dev/null +++ b/payment_proof_attachment/static/src/js/payment_screen.js @@ -0,0 +1,88 @@ +/** @odoo-module **/ +import publicWidget from "@web/legacy/js/public/public_widget"; +import { rpc } from "@web/core/network/rpc"; + +publicWidget.registry.PaymentProof = publicWidget.Widget.extend({ +// init() { +// this.rpc = this.env.services.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'; +// document.querySelector('#wrapwrap').style.overflow = 'hidden'; + }, + /** + *for closing the modal dialog + */ + _onClickCloseModal: function () { + this.el.querySelector('#myModal').style.display = 'none'; +// document.querySelector('#wrapwrap').style.overflow = 'auto'; + }, + /** + *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) { + 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") + 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("

+