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

Hello everyone,

Odoo 12 allows us to pay invoices directly from the invoice, by clicking on the Register Payment button or from the "Customer | Payments" menu option.

Is there any way I can check if user is processing the payment from the invoice or from the Payments menu option?​

I need to run some code depending where user actually is processing the payment.

Perhaps someway to check by environment?

Thank you all in advance

Best regards

PM

아바타
취소
베스트 답변

Hi,

You can get the current model name from the context like this: self._context.get('active_model')

Thanks

아바타
취소
베스트 답변

HI Paulo,

You can check the condition like this,

if self._name == 'account.invoice':
// Your code

Thanks.

아바타
취소
관련 게시물 답글 화면 활동
1
7월 19
4575
3
10월 23
9020
1
9월 23
3417
1
5월 23
2391
2
4월 23
2957