Skip to content

Commit

Permalink
[Karthi] | Fixed | Refactor. Print Summarized bill copy shortcut key …
Browse files Browse the repository at this point in the history
…added and button based report enabled. (#142)
  • Loading branch information
karthikeyansp91 authored Apr 3, 2024
1 parent f885884 commit bd54ca2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bahmni_account/models/account_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,6 @@ class AccountPayment(models.Model):
def invoice_search(self):
""" Using ref find the invoice obj """
return self.env['account.move'].search([('id', '=', self.reconciled_invoice_ids.id),('move_type', '=', 'out_invoice')], limit=1)


def generate_report_action(self):
return self.env.ref("bahmni_account.account_summarized_invoices_payment").report_action(self)
12 changes: 12 additions & 0 deletions bahmni_account/views/account_payment_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@
</field>
</record>

<record id="inherit_view_account_payment_form" model="ir.ui.view">
<field name="name">account.payment.form</field>
<field name="model">account.payment</field>
<field name="inherit_id" ref="account.view_account_payment_form"/>
<field name="arch" type="xml">
<xpath expr="//header" position="inside">
<button name="generate_report_action" string="Summarized Bill(ALT+Z)" type="object" data-hotkey="z" class="btn btn-secondary" />
</xpath>
</field>
</record>


<record id="inherit_view_account_payment_search_bahmni" model="ir.ui.view">
<field name="name">Payment Search View Changes</field>
<field name="model">account.payment</field>
Expand Down

0 comments on commit bd54ca2

Please sign in to comment.