Skip to Content
Menu
This question has been flagged
3 Replies
3551 Views

Is it possible to show Customer name on tabs in plint of sale. Sometimes in samples there is unknown Customer so it must be possible to show customers name instead. Version 10


Avatar
Discard
Thank you for the tips,

Gr roland

Verstuurd vanaf mijn iPhone

Op 15 sep. 2017 om 11:37 heeft Raphael Gnädinger <raphael.gnaedinger@gaessli-braeu.ch> het volgende geschreven:


A new answer on Customer name on pos tabs has been posted. Click here to access the post :

See post

--
Raphael Gnädinger

Best Answer

Hi Roland

I had the same Issue.. I managed to get the Customers Name shown, when one Order is selected:

To do so, go to your main addons directory, then to the following:

point_of_sale/static/src/xml/   directoy

edit then the pos.xml

Search for: "OrderSelectorWidget"

Update the following block:

<t t-if='order === widget.pos.get_order()'>
    <span class="order-button select-order selected" t-att-data-uid="order.uid">
        <span class='order-sequence'>
            <t t-esc='order.sequence_number' />
        </span>
        <t t-esc="moment(order.creation_date).format('hh:mm')"/>
    </span>
</t>
<t t-if='order !== widget.pos.get_order()'>
    <span class="order-button select-order" t-att-data-uid="order.uid">
        <span class='order-sequence'>
            <t t-esc='order.sequence_number' />
        </span>
    </span>
</t>



So your new block is like this:

 
<t t-if='order === widget.pos.get_order()'>
    <span class="order-button select-order selected" t-att-data-uid="order.uid">
        <span class='order-sequence'>
            <t t-esc='order.sequence_number' />
        </span>
<!-- rgn -->
<t t-if="order.get_client()">
<t t-esc='order.get_client().name' />
</t>
<!-- rgn -->

        <t t-esc="moment(order.creation_date).format('hh:mm')"/>
    </span>
</t>
<t t-if='order !== widget.pos.get_order()'>
    <span class="order-button select-order" t-att-data-uid="order.uid">
        <span class='order-sequence'>
            <t t-esc='order.sequence_number' />
        </span>
<!-- rgn -->
<t t-if="order.get_client()">
<t t-esc='order.get_client().name' />
</t>
<!-- rgn -->
    </span>
</t>


Restart your Odoo installation (systemctl restart odoo)


Now, you allways see the Customers name, if you have selected one.. if no user is selected, the Tab has only the Number

 


Regards


Raphael

Gässli-Bräu


Avatar
Discard
Best Answer

What about v13 ?

Avatar
Discard