Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
3414 Представления

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

Аватар
Отменить
Лучший ответ

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

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
мая 24
2345
1
янв. 24
1230
1
мая 23
2644
1
февр. 23
2079
0
февр. 23
1990