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é
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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é
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up