コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
12176 ビュー

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

アバター
破棄
最善の回答

Hi,

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

Thanks

アバター
破棄
最善の回答

HI Paulo,

You can check the condition like this,

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

Thanks.

アバター
破棄
関連投稿 返信 ビュー 活動
1
7月 19
4382
3
10月 23
8642
1
9月 23
3246
1
5月 23
2222
2
4月 23
2758