5a499ecf113f08c11d2b33b47680dd00ec1b297b
When running an automated action on record creation, if the action
raises a UserError/ValidationError, the record will still be created.
To reproduce the error:
(Need website_crm,base_automation. Enable debug mode)
1. Create an Automated Action
- Model: Lead/Opportunity
- Trigger: On Creation & Update
- Trigger Fields: Phone (crm.lead)
- Action To Do: Execute Python Code
- Python Code:
```python
if record.phone:
raise UserError("Lorem ipsum")
```
2. On website, add a website form WF
- Action: "Create an Opportunity"
3. Complete and submit WF including a phone number
Error: An error message is displayed ("Lorem ispum"). However, the lead
has been created and is present in CRM Pipeline.
An on-creation automated action is executed once the record is executed,
but nothing will cancel this records creation if the action raises a
UserError/ValidationError.
OPW-2423948
closes odoo/odoo#69911
X-original-commit: 8d452ae16b7e6c3077d9eae135852bada43cec93
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Signed-off-by: Adrien Widart <adwid@users.noreply.github.com>
…
…
…
…
…
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%