Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
12188 Представления

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.

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
июл. 19
4387
3
окт. 23
8650
1
сент. 23
3249
1
мая 23
2223
2
апр. 23
2762