Is there a way to replace fa fa-user with the customer image in point of sale?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
1
Odpowiedz
2560
Widoki
Hi,
First extend Actionpad widget template(pos.xml) and replace class “set-customer”
<button t-attf-class='button set-customer #{ ( widget.pos.get_client() and widget.pos.get_client().name.length > 10) ? "decentered" : "" }' >
<t t-if="widget.pos.get_client()">
<img t-att-src='widget.partner_icon_url(widget.pos.get_client().id)' style="height: 80% !important;" />
<t t-esc="widget.pos.get_client().name" />
</t>
<t t-if="!widget.pos.get_client()">
<i class='fa fa-user' />
Customer
</t>
</button>
Extend Actionpad widget with a new function (screen.js)
partner_icon_url: function(id){
return '/web/image?model=res.partner&id='+id+'&field=image_small';
},Thanks
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj się| Powiązane posty | Odpowiedzi | Widoki | Czynność | |
|---|---|---|---|---|
|
|
2
lip 25
|
6044 | ||
|
|
2
paź 25
|
8591 | ||
|
How to ORDER BY? [Odoo 10]
Rozwiązane
|
|
2
lis 24
|
29444 | |
|
|
2
maj 24
|
8242 | ||
|
|
3
mar 24
|
7624 |