diff --git a/addons/account/__manifest__.py b/addons/account/__manifest__.py index 9d94457643f..04a81c13b47 100644 --- a/addons/account/__manifest__.py +++ b/addons/account/__manifest__.py @@ -63,6 +63,8 @@ You could use this simplified accounting in case you work with an (external) acc 'views/res_config_view.xml', 'views/web_planner_data.xml', 'views/account_journal_dashboard_view.xml', + 'report/account_report_payment_receipt_templates.xml', + 'data/payment_receipt_data.xml', ], 'demo': [ 'demo/account_demo.xml', diff --git a/addons/account/data/payment_receipt_data.xml b/addons/account/data/payment_receipt_data.xml new file mode 100644 index 00000000000..2b15ae5427a --- /dev/null +++ b/addons/account/data/payment_receipt_data.xml @@ -0,0 +1,53 @@ + + + + + + + Print Receipt + client_action_multi + + action + account.payment + + + + + Payment Receipt - Send by Email + ${object.company_id.name} Payment Receipt (Ref ${object.name or 'n/a' }) + ${object.partner_id.id} + + + + ${(object.name or '').replace('/','-')} + ${object.partner_id.lang} + +

Dear ${object.partner_id.name},

+

Thank you for your payment.
Here is your payment receipt ${(object.name or '').replace('/','-')} amounting to ${object.amount} ${object.currency_id.name} from ${object.company_id.name}.

+

If you have any questions, please do not hesitate to contact us.

+

Best regards, +% if user and user.signature: +${user.signature | safe} +% endif +

+
+
+ + +
+
diff --git a/addons/account/models/account_payment.py b/addons/account/models/account_payment.py index bfeb6f727f6..36164be72f7 100644 --- a/addons/account/models/account_payment.py +++ b/addons/account/models/account_payment.py @@ -170,7 +170,7 @@ class account_register_payments(models.TransientModel): class account_payment(models.Model): _name = "account.payment" - _inherit = 'account.abstract.payment' + _inherit = ['mail.thread', 'account.abstract.payment'] _description = "Payments" _order = "payment_date desc, name desc" diff --git a/addons/account/report/account_report_payment_receipt_templates.xml b/addons/account/report/account_report_payment_receipt_templates.xml new file mode 100644 index 00000000000..1e6e44588bd --- /dev/null +++ b/addons/account/report/account_report_payment_receipt_templates.xml @@ -0,0 +1,60 @@ + + + + diff --git a/addons/account/views/account_payment_view.xml b/addons/account/views/account_payment_view.xml index 8602bb3727a..b51b1349cb9 100644 --- a/addons/account/views/account_payment_view.xml +++ b/addons/account/views/account_payment_view.xml @@ -117,6 +117,10 @@ +
+ + +
diff --git a/addons/account/views/account_report.xml b/addons/account/views/account_report.xml index 56d352ba8f5..56f2a8adaa3 100644 --- a/addons/account/views/account_report.xml +++ b/addons/account/views/account_report.xml @@ -110,5 +110,15 @@ file="account.report_partnerledger" /> + +