Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
12187 Vizualizări

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

Imagine profil
Abandonează
Cel mai bun răspuns

Hi,

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

Thanks

Imagine profil
Abandonează
Cel mai bun răspuns

HI Paulo,

You can check the condition like this,

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

Thanks.

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
iul. 19
4387
3
oct. 23
8650
1
sept. 23
3249
1
mai 23
2223
2
apr. 23
2762