Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
3392 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

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

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
mai 24
2339
1
ian. 24
1215
1
mai 23
2627
1
feb. 23
2058
0
feb. 23
1970