Skip to Content
Menú
This question has been flagged
1 Respondre
2547 Vistes

Is there a way to replace fa fa-user with the customer image in point of sale? 

Avatar
Descartar
Best Answer

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


Avatar
Descartar
Related Posts Respostes Vistes Activitat
2
de jul. 25
5881
2
d’oct. 25
8489
2
de nov. 24
29345
2
de maig 24
8132
3
de març 24
7552