Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
12178 Zobrazení

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
Zrušit
Nejlepší odpověď

Hi,

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

Thanks

Avatar
Zrušit
Nejlepší odpověď

HI Paulo,

You can check the condition like this,

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

Thanks.

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
čvc 19
4382
3
říj 23
8645
1
zář 23
3246
1
kvě 23
2222
2
dub 23
2759