Hi all,
In v16.4 you could configure a server action/automated action to create a new record in another model
Within the automated action you could add data to write (you could add field data to be saved in the target model.)
In v17 i can't find that functionality anymore (the data to write) although it is still in the documentation.
How should we proceed?
Should we select python code and do it via python code?
or is there another thing i should know ?
thx for sharing your info!
kr
roeland
Yes, the functionality has been lost in v17 as per this change in GitHub: https://github.com/odoo/odoo/pull/114352
You can create a record but you can't specify any fields. It's possible to do some of it in Python, but ironically this so-called simplification has made it more difficult.
https://www.odoo.com/forum/help-1/limitations-in-automation-rules-odoo-17-244783
a feature which encourages to learn Python or?
The improvement introduced regressions. Models created with Studio are named x_name. When the action is trying to create that record, it tries to fill name, which does not exist. Thus, fails.
Hi Moritz - I'm not sure this is a specific issue with models created with Studio. If you hardcode the name of the new record in the Automation Rules that will work whether it's a Studio model or not. The problem is how to set a value for each record, and the solution below does that if you write Python code (in which case you would need to set a value for x_name and any other mandatory fields on your new model)