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
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
1
Reply
2188
Views
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
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
How to ORDER BY? [Odoo 10]
Solved
|
|
2
Nov 24
|
25079 | |
|
2
May 24
|
5514 | ||
|
3
Mar 24
|
4963 | ||
|
0
Mar 24
|
261 | ||
|
3
Feb 24
|
11421 |