Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
604 Переглядів

Hello,

i need some help.

I want to write my own python class to communicate with a WebDAV Interface.


What is the best place for the own .py File? Also in the Model-Directory from my Module?


Thanks for your help.

André

Аватар
Відмінити
Найкраща відповідь

There is no fixed rule, where to place this python file as long as you can import somewhere inside your module. If the sole purpose of a file is to act as a driver/handler to something outside the Odoo, I usually place files like these in a handler folder inside my module (see e.g., the hw_drivers module from Odoo). If your file needs to save some variables within the Odoo scope, I usually save it as a model and place the class functionality there (see e.g., the payment modules from Odoo). But it really depends on your specific use case. I hope this helps!

Аватар
Відмінити
Автор Найкраща відповідь

Hello Jort,

thanks for your answer. 

The hw_drivers module is a good orientation.

I think i will find a way where to place my own Class.

Best regards

André

Аватар
Відмінити