Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
12543 Tampilan

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

Avatar
Buang
Jawaban Terbai

Hi,

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

Thanks

Avatar
Buang
Jawaban Terbai

HI Paulo,

You can check the condition like this,

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

Thanks.

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
1
Jul 19
4684
3
Okt 23
9373
1
Sep 23
3566
1
Mei 23
2505
2
Apr 23
3115