Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
2212 Widoki

I have two addresses in a company interface – the Default one and the Other address.

The Other address' icon looks like an icon of a contact:


It is of "Other Address" type:


Can I change the icon to something more associated with addresses, like, say, that truck of Default address? For instance,

 

How can I do it?


Awatar
Odrzuć

I've used Odoo Enterprise. How to do?


Thank you

Najlepsza odpowiedź

Hi,

In Odoo 15 and 16 you can do like this:

from odoo import models


class ResPartner(models.Model):
_inherit = 'res.partner'

def _avatar_get_placeholder_path(self):
# odoo_forum is the technical name of the custom_module
if self.type == 'contact':
return "odoo_forum/static/img/contact_placeholder.png"
if self.type == 'private':
return "odoo_forum/static/img/private_placeholder.png"
if self.type == 'other':
return "odoo_forum/static/img/other_placeholder.png"
return super()._avatar_get_placeholder_path()



Regards

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
lut 24
2312
1
lut 22
2342
0
kwi 16
3870
1
mar 15
4338
0
mar 15
4722