Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
2 Vastaukset
12181 Näkymät

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
Hylkää
Paras vastaus

Hi,

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

Thanks

Avatar
Hylkää
Paras vastaus

HI Paulo,

You can check the condition like this,

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

Thanks.

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
heinäk. 19
4383
3
lokak. 23
8647
1
syysk. 23
3246
1
toukok. 23
2222
2
huhtik. 23
2759