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

Hi,
I want to create a automated action when product create/update to call third party api. For that i have created custom module in installed it odoo online and called in action like below.

product_model = env['sanity.product']

# Call your custom method

product_model.call_external_api(record)

But when i'm calling this i'm getting following error.

Traceback (most recent call last):
  File "/home/odoo/src/odoo/odoo/tools/safe_eval.py", line 392, in safe_eval
    return unsafe_eval(c, globals_dict, locals_dict)
  File "ir.actions.server(1333,)", line 1, in <module>
  File "/home/odoo/src/odoo/odoo/api.py", line 550, in __getitem__
    return self.registry[model_name](self, (), ())
  File "/home/odoo/src/odoo/odoo/modules/registry.py", line 186, in __getitem__
    return self.models[model_name]
KeyError: 'sanity.product'

I have checked that module is installed and active.

How can i fix this issue.

アバター
破棄
関連投稿 返信 ビュー 活動
0
9月 24
1796
0
5月 24
27
1
4月 24
5389
0
3月 24
2018
0
3月 24
2054