As far as I know, Odoo Studio only accepts data folder when importing a .zip module in Odoo Studio.
Is there a way to add a function and trigger it with a button in Odoo Studio without adding a module folder in the addons path?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
As far as I know, Odoo Studio only accepts data folder when importing a .zip module in Odoo Studio.
Is there a way to add a function and trigger it with a button in Odoo Studio without adding a module folder in the addons path?
Hi Jean,
You can indeed only imports data (XML/CSS/SCSS) with a .zip module in Odoo.
There is no way to directly create a field and add a function to it with studio
but what you want to do is possible though.
You can first create your new field with Studio and add it on the form. Then create an automated action
with the trigger condition set to 'Based on Form Modification' and fill in your field name in 'On change Fields trigger'.
Set the 'Action To Do' to 'Execute Python code and then you can execute your custom Python code from there.
Note: If you can code Python functions and need to do more advanced operations it might be worth it to code it in your own module though? It is easier to keep track off if you do a lot of modifications and you still have more flexibility than through the frontend (for example with Python libraries).
Regards,
Yenthe
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
4
Jul 19
|
3249 | ||
|
2
Jan 19
|
2693 | ||
Odoo Studio in Community
Solved
|
|
1
Dec 20
|
9553 | |
|
0
Dec 24
|
36 | ||
|
1
Sep 24
|
717 |