Browse Source

Apr 18 [FIX] : Bug Fixed 'payment_proof_attachment'

pull/254/merge
AjmalCybro 1 year ago
parent
commit
dc265b5505
  1. 6
      payment_proof_attachment/__manifest__.py
  2. 7
      payment_proof_attachment/controllers/payment_proof_attachment.py
  3. 22
      payment_proof_attachment/data/payment_proof_attachment.xml
  4. 2
      payment_proof_attachment/doc/RELEASE_NOTES.md
  5. 0
      payment_proof_attachment/static/description/assets/modules/w1.png
  6. 0
      payment_proof_attachment/static/description/assets/modules/w2.png
  7. 0
      payment_proof_attachment/static/description/assets/modules/w3.png
  8. 0
      payment_proof_attachment/static/description/assets/modules/w4.png
  9. 0
      payment_proof_attachment/static/description/assets/modules/w5.png
  10. 0
      payment_proof_attachment/static/description/assets/modules/w6.png
  11. 0
      payment_proof_attachment/static/description/assets/screenshots/1.png
  12. 0
      payment_proof_attachment/static/description/assets/screenshots/10.png
  13. 0
      payment_proof_attachment/static/description/assets/screenshots/11.png
  14. 0
      payment_proof_attachment/static/description/assets/screenshots/12.png
  15. 0
      payment_proof_attachment/static/description/assets/screenshots/2.png
  16. 0
      payment_proof_attachment/static/description/assets/screenshots/3.png
  17. 0
      payment_proof_attachment/static/description/assets/screenshots/4.png
  18. 0
      payment_proof_attachment/static/description/assets/screenshots/5.png
  19. 0
      payment_proof_attachment/static/description/assets/screenshots/6.png
  20. 0
      payment_proof_attachment/static/description/assets/screenshots/7.png
  21. 0
      payment_proof_attachment/static/description/assets/screenshots/8.png
  22. 0
      payment_proof_attachment/static/description/assets/screenshots/9.png
  23. 0
      payment_proof_attachment/static/description/assets/screenshots/hero.gif
  24. 0
      payment_proof_attachment/static/description/banner.png
  25. 0
      payment_proof_attachment/static/description/icon.png

6
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',

7
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")

22
payment_proof_attachment/data/payment_proof_attachment.xml

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record id="payment_proof_attachment_email_template" model="mail.template">
<field name="name">Sales Order: Payment Proof Attachment</field>
<field name="model_id" ref="sale.model_sale_order"/>
<field name="subject">Payment Proof Attachment</field>
<field name="email_from">{{ (object.user_id.email_formatted or user.email_formatted or '') }}</field>
<field name="partner_to">{{ object.partner_id.id }}</field>
<field name="body_html" type="html">
<div style="margin: 0px; padding: 0px;">
<p>Dear,</p>
<p>Your Payment Proof Attachment is Uploaded Successfully</p>
<p>Best regards,</p>
<p>{{ object.company_id.id }}</p>
</div>
</field>
<field name="lang">{{ object.partner_id.lang }}</field>
<field name="auto_delete" eval="False"/>
</record>
</data>
</odoo>

2
payment_proof_attachment/doc/RELEASE_NOTES.md

@ -1,6 +1,6 @@
## Module <payment_proof_attachment>
#### 23.10.2023
#### Version 15.0.1.0.0
#### Version 15.0.1.0.2
##### ADD
- Initial Commit for Payment Proof Attachment

0
payment_proof_attachment/static/description/assets/modules/w1.png

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 105 KiB

0
payment_proof_attachment/static/description/assets/modules/w2.png

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

0
payment_proof_attachment/static/description/assets/modules/w3.png

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

0
payment_proof_attachment/static/description/assets/modules/w4.png

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

0
payment_proof_attachment/static/description/assets/modules/w5.png

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

0
payment_proof_attachment/static/description/assets/modules/w6.png

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

0
payment_proof_attachment/static/description/assets/screenshots/1.png

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 91 KiB

0
payment_proof_attachment/static/description/assets/screenshots/10.png

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 120 KiB

0
payment_proof_attachment/static/description/assets/screenshots/11.png

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 81 KiB

0
payment_proof_attachment/static/description/assets/screenshots/12.png

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 81 KiB

0
payment_proof_attachment/static/description/assets/screenshots/2.png

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 108 KiB

0
payment_proof_attachment/static/description/assets/screenshots/3.png

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 118 KiB

0
payment_proof_attachment/static/description/assets/screenshots/4.png

Before

Width:  |  Height:  |  Size: 125 KiB

After

Width:  |  Height:  |  Size: 125 KiB

0
payment_proof_attachment/static/description/assets/screenshots/5.png

Before

Width:  |  Height:  |  Size: 150 KiB

After

Width:  |  Height:  |  Size: 150 KiB

0
payment_proof_attachment/static/description/assets/screenshots/6.png

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 114 KiB

0
payment_proof_attachment/static/description/assets/screenshots/7.png

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

0
payment_proof_attachment/static/description/assets/screenshots/8.png

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 84 KiB

0
payment_proof_attachment/static/description/assets/screenshots/9.png

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 119 KiB

0
payment_proof_attachment/static/description/assets/screenshots/hero.gif

Before

Width:  |  Height:  |  Size: 494 KiB

After

Width:  |  Height:  |  Size: 494 KiB

0
payment_proof_attachment/static/description/banner.png

Before

Width:  |  Height:  |  Size: 82 KiB

After

Width:  |  Height:  |  Size: 82 KiB

0
payment_proof_attachment/static/description/icon.png

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Loading…
Cancel
Save