I need to group emails received by their domain name.
The regex rule to identify the said domains would be 
regex_pattern = r"@(.+)$"
How to embed such a regex rule into an odoo filter?
sincerely
Odoo is the world's easiest all-in-one management software.
 It includes hundreds of business apps:
I need to group emails received by their domain name.
The regex rule to identify the said domains would be 
regex_pattern = r"@(.+)$"
How to embed such a regex rule into an odoo filter?
sincerely
group by can use a callable or a field to group, so you can create a computed field to get the domain and then use the computed field to group.
something like this I suppose but I didn't test it
# Python
email_domain = fields.Char(compute='_compute_email_domain')
@api.depends('email')
def _compute_email_domain(self):
for record in self:
record.email_domain = record.email.split('@')[1] if '@' in record.email else None
# XML
Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!
Registrieren| Verknüpfte Beiträge | Antworten | Ansichten | Aktivität | |
|---|---|---|---|---|
|  | 2 Sept. 25  | 3392 | ||
|  | 0 Okt. 25  | 742 | ||
|  | 0 Dez. 24  | 2265 | ||
|  | 1 Mai 24  | 3174 | ||
|  | 3 Mai 24  | 2800 |