Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
12195 Weergaven

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
Annuleer
Beste antwoord

Hi,

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

Thanks

Avatar
Annuleer
Beste antwoord

HI Paulo,

You can check the condition like this,

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

Thanks.

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
1
jul. 19
4389
3
okt. 23
8666
1
sep. 23
3253
1
mei 23
2224
2
apr. 23
2765