There's no documentation on creating an automated action.
The one there is, is about scheduled actions (ir.cron)
How does one create an automated action via XML?
It used to be something like this:
https://github.com/odoo/odoo/blob/12.0/addons/base_automation/data/base_automation_demo.xml
Bus this file doesn't exists after v12.
So the top entry gives this error in v15:
raise ParseError('while parsing %s:%s, somewhere inside\n%s' % (
odoo.tools.convert.ParseError: while parsing /home/odoo/src/user/module/views/automated_actions.xml:4, somewhere inside
<record id="test_rule_on_create" model="base.automation">
<field name="name">Base Automation: test rule on create</field>
<field name="model_id" ref="base_automation.model_base_automation_lead_test"/>
<field name="state">code</field>
<field name="code" eval="'records.write({\'user_id\': %s})' % ref('base.user_demo')"/>
<field name="trigger">on_create</field>
<field name="active" eval="True"/>
<field name="model_id" ref="base_automation.model_base_automation_lead_test"/>
<field name="filter_domain">[('state', '=', 'draft')]</field>
</record>
Any help would be appreciated.
try changing model_id to some other models like purchase.purchase_order. I guess odoo15 don't have this model
Also remove duplicate model_id field.
I did what you proposed, but to no avail.
I guess the problem is even before reading the contents, since it throws a parse error instead of complaining about the actual model.
It seems the XML isn't structured correctly or something.
Ok, I got it working now.
It was indeed being problematic about the external ID of the model.
I got more feedback in the log when I scrolled up in the server log, which was out of view on default.
Thank you for your help Mohammed Amal N