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

Hello,

I am trying to create an automated action to change language of all contacts from "English" to "English (UK)"​

I have set it up like this:

Model: Contact
Trigger Condition: On Update
Action To Do: Update the Record

Field: Language (res.partner)
Evaluation Type: Value
Value: en_GB

This does not change the language on any of my contacts if I update one.


Avatar
Discard

You're welcome. Don't forget to upvote/accept an answer if it has helped you :)

Best Answer

Hi Christoffer,

Why don't you create a scheduled action with "Execute Python code" as action to do? In this case you can click on "Run manually" to do it once or schedule it every x time to happen automatically. Working example: https://imgur.com/8yNUbbt

Code for the action:

contacts = env['res.partner'].search([])
for contact in contacts:
contact.write({
'lang': 'en_GB'
})


Regards,
Yenthe

Avatar
Discard