Skip to Content
Menu
This question has been flagged
2 Replies
1402 Views

Im using odoo sh v13. I wonder if I can remove spaces in the email and other fields with Odoo front end Automatic Actions so that I dont have to write a module just to do this?

My guess is to set the filters and Execute Python Code.

But Im not sure what to write here.

Thanks.

Avatar
Discard
Best Answer

Hello Rafael,

You can try using Odoo's Data Cleaning app.

Edit: It was not available in v13 but for more recent versions it is a good tool.

Avatar
Discard
Best Answer

Hi,

To eliminate spaces from the email field of the current record, use the following code in the

Python Code :

record.email = record.email.replace(' ', '')

This code will replace all spaces in the email field with an empty string, effectively removing them.You can modify this code to remove spaces from other fields by replacing record.email with the name of the field you want to modify(e.g. record.name, record.street, etc.).

Regards

Avatar
Discard