Fix allow_mail_archived_partner causing system notifications to send emails

This commit is contained in:
Kristof Bernaert
2026-01-26 00:44:43 +01:00
commit f64fbb5e06
25 changed files with 453 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
from . import res_partner
+25
View File
@@ -0,0 +1,25 @@
from odoo import models
class ResPartner(models.Model):
_inherit = "res.partner"
def name_get(self):
result = []
for partner in self:
names = []
current = partner
# Walk up the hierarchy
while current:
if current.name:
names.append(current.name)
current = current.parent_id
# Reverse to show top-down (L1 / L2 / L3)
full_name = " / ".join(reversed(names))
result.append((partner.id, full_name))
return result