diff --git a/payment_proof_attachment/__manifest__.py b/payment_proof_attachment/__manifest__.py index e30d1e17f..307e61b52 100755 --- a/payment_proof_attachment/__manifest__.py +++ b/payment_proof_attachment/__manifest__.py @@ -21,7 +21,7 @@ ################################################################################ { 'name': 'Payment Proof Attachment', - 'version': '15.0.1.0.1', + 'version': '15.0.1.0.2', 'category': 'Website', 'summary': "Allows to attach proofs in website", 'description': "This module adds an option to your customer to attach the" @@ -31,7 +31,9 @@ 'maintainer': 'Cybrosys Techno Solutions', 'website': 'https://www.cybrosys.com', 'depends': ['website_sale', 'sale_management', 'mail'], - 'data': ['views/sale_portal_templates.xml'], + 'data': [ + 'data/payment_proof_attachment.xml', + 'views/sale_portal_templates.xml'], 'assets': { 'web.assets_frontend': [ 'payment_proof_attachment/static/src/js/my_account_screen.js', diff --git a/payment_proof_attachment/controllers/payment_proof_attachment.py b/payment_proof_attachment/controllers/payment_proof_attachment.py index 8bf6fa56e..12f6d5444 100755 --- a/payment_proof_attachment/controllers/payment_proof_attachment.py +++ b/payment_proof_attachment/controllers/payment_proof_attachment.py @@ -57,7 +57,7 @@ class WebsitePaymentProof(http.Controller): sale_id = request.session.sale_order_id sale = request.env['sale.order'].sudo().browse(sale_id) for attachment in kw['attachments']: - request.env['ir.attachment'].sudo().create({ + payment_proof_attachment = request.env['ir.attachment'].sudo().create({ 'name': attachment['name'], 'res_model': 'sale.order', 'res_id': sale_id, @@ -68,6 +68,11 @@ class WebsitePaymentProof(http.Controller): 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 + template = request.env['mail.template'].browse(mail_template) + template.attachment_ids = [(6, 0, [payment_proof_attachment.id])] + template.send_mail(sale_id, force_send=True) + template.attachment_ids = [(3, payment_proof_attachment.id)] return @http.route(['/my_account_screen/show_updated'], type='json', auth="public") 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..6bed3f7bb --- /dev/null +++ b/payment_proof_attachment/data/payment_proof_attachment.xml @@ -0,0 +1,22 @@ + + + + + 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.company_id.id }}

+
+
+ {{ object.partner_id.lang }} + +
+
+
diff --git a/payment_proof_attachment/doc/RELEASE_NOTES.md b/payment_proof_attachment/doc/RELEASE_NOTES.md index 363a4a2bb..72a1e3589 100755 --- a/payment_proof_attachment/doc/RELEASE_NOTES.md +++ b/payment_proof_attachment/doc/RELEASE_NOTES.md @@ -1,6 +1,6 @@ ## Module #### 23.10.2023 -#### Version 15.0.1.0.0 +#### Version 15.0.1.0.2 ##### ADD - Initial Commit for Payment Proof Attachment diff --git a/payment_proof_attachment/static/description/assets/modules/w1.png b/payment_proof_attachment/static/description/assets/modules/w1.png old mode 100644 new mode 100755 diff --git a/payment_proof_attachment/static/description/assets/modules/w2.png b/payment_proof_attachment/static/description/assets/modules/w2.png old mode 100644 new mode 100755 diff --git a/payment_proof_attachment/static/description/assets/modules/w3.png b/payment_proof_attachment/static/description/assets/modules/w3.png old mode 100644 new mode 100755 diff --git a/payment_proof_attachment/static/description/assets/modules/w4.png b/payment_proof_attachment/static/description/assets/modules/w4.png old mode 100644 new mode 100755 diff --git a/payment_proof_attachment/static/description/assets/modules/w5.png b/payment_proof_attachment/static/description/assets/modules/w5.png old mode 100644 new mode 100755 diff --git a/payment_proof_attachment/static/description/assets/modules/w6.png b/payment_proof_attachment/static/description/assets/modules/w6.png old mode 100644 new mode 100755 diff --git a/payment_proof_attachment/static/description/assets/screenshots/1.png b/payment_proof_attachment/static/description/assets/screenshots/1.png old mode 100644 new mode 100755 diff --git a/payment_proof_attachment/static/description/assets/screenshots/10.png b/payment_proof_attachment/static/description/assets/screenshots/10.png old mode 100644 new mode 100755 diff --git a/payment_proof_attachment/static/description/assets/screenshots/11.png b/payment_proof_attachment/static/description/assets/screenshots/11.png old mode 100644 new mode 100755 diff --git a/payment_proof_attachment/static/description/assets/screenshots/12.png b/payment_proof_attachment/static/description/assets/screenshots/12.png old mode 100644 new mode 100755 diff --git a/payment_proof_attachment/static/description/assets/screenshots/2.png b/payment_proof_attachment/static/description/assets/screenshots/2.png old mode 100644 new mode 100755 diff --git a/payment_proof_attachment/static/description/assets/screenshots/3.png b/payment_proof_attachment/static/description/assets/screenshots/3.png old mode 100644 new mode 100755 diff --git a/payment_proof_attachment/static/description/assets/screenshots/4.png b/payment_proof_attachment/static/description/assets/screenshots/4.png old mode 100644 new mode 100755 diff --git a/payment_proof_attachment/static/description/assets/screenshots/5.png b/payment_proof_attachment/static/description/assets/screenshots/5.png old mode 100644 new mode 100755 diff --git a/payment_proof_attachment/static/description/assets/screenshots/6.png b/payment_proof_attachment/static/description/assets/screenshots/6.png old mode 100644 new mode 100755 diff --git a/payment_proof_attachment/static/description/assets/screenshots/7.png b/payment_proof_attachment/static/description/assets/screenshots/7.png old mode 100644 new mode 100755 diff --git a/payment_proof_attachment/static/description/assets/screenshots/8.png b/payment_proof_attachment/static/description/assets/screenshots/8.png old mode 100644 new mode 100755 diff --git a/payment_proof_attachment/static/description/assets/screenshots/9.png b/payment_proof_attachment/static/description/assets/screenshots/9.png old mode 100644 new mode 100755 diff --git a/payment_proof_attachment/static/description/assets/screenshots/hero.gif b/payment_proof_attachment/static/description/assets/screenshots/hero.gif old mode 100644 new mode 100755 diff --git a/payment_proof_attachment/static/description/banner.png b/payment_proof_attachment/static/description/banner.png old mode 100644 new mode 100755 diff --git a/payment_proof_attachment/static/description/icon.png b/payment_proof_attachment/static/description/icon.png old mode 100644 new mode 100755