Skip to Content
Menu
This question has been flagged
2 Replies
444 Views

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é

Avatar
Discard
Best Answer

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!

Avatar
Discard
Author Best Answer

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é

Avatar
Discard