콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
1 회신
3722 화면

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

아바타
취소
관련 게시물 답글 화면 활동
1
5월 24
2753
1
1월 24
1463
1
5월 23
2954
1
2월 23
2403
0
2월 23
2317