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

Im trying to test out the webhook trigger in the automation, but I got this error 


Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/tools/safe_eval.py", line 390, in safe_eval
    return unsafe_eval(c, globals_dict, locals_dict)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "", line 1, in <module>
  File "/usr/lib/python3/dist-packages/odoo/api.py", line 596, in __getitem__
    return self.registry[model_name](self, (), ())
           ~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/modules/registry.py", line 240, in __getitem__
    return self.models[model_name]
           ~~~~~~~~~~~^^^^^^^^^^^^
KeyError: None

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/odoo/addons/base_automation/models/base_automation.py", line 504, in _execute_webhook
    record = safe_eval.safe_eval(self.record_getter, self._get_eval_context(payload=payload))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/odoo/tools/safe_eval.py", line 404, in safe_eval
    raise ValueError('%r while evaluating\n%r' % (e, expr))
ValueError: KeyError(None) while evaluating
"model.env[payload.get('_model')].browse(int(payload.get('_id')))"

I don't have an idea why Im getting this. I need reason why this happened and some possible solutions. Thanks

Аватар
Отменить
Лучший ответ

Hi,
Can you see this video and see if it helps:  Use Webhooks to Send and Receive Data in Odoo

Thanks

Аватар
Отменить
Related Posts Ответы Просмотры Активность
1
дек. 19
6986
2
окт. 18
8641
1
дек. 24
4177
0
нояб. 24
1692
2
июл. 24
2868