Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
3422 Prikazi

How can we display payment methods in our customer reports and customer invoices by which it will be easy to tally the payments? 

Avatar
Opusti
Best Answer

in your custom module create a function 

class AccountMove(models.Model):
    _inherit = 'account.move'
   
    def your_function_name(self):
        bill = [
            ('ref', 'ilike', self.name),
        ]
        return str(self.env['account.payment'].search(bill, limit=10).journal_id.name)


and in your invoice report which might template_id = report_invoice_document

you can mention this code 

which will give you the payment method through which it was done

                <!--<t t-set="any_name" t-value="o.your_function_name()"/>
                <span t-esc="any_name"/>




through this you can see which payment method it was and then you modify it the way you want

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
maj 24
2348
1
jan. 24
1232
1
maj 23
2645
1
feb. 23
2083
0
feb. 23
1993