Hi. I need to add custom field in pos customer view. I added this field in my Contacts app, and now i need to view info from this field in my pos customer view. Ho i can implement this?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Comptabilité
- Inventaire
- PoS
- Projet
- MRP
Cette question a été signalée
Thank you for answer. So, if my custom field have name x_card_number the code were:
<div class='client-detail'>
<span class='label'>Card Number</span>
<t t-if='partner.x_card_number'>
<span class='detail client-custom-field'><t t-esc='partner.x_card_number' /></span>
</t>
<t t-if='!partner.x_card_number'>
<span class='detail client-custom-field empty'>N/A</span>
</t>
</div>
yes, check whether it is working or not
Don't work. I posted in file pos->static-> src-> xml -> pos.xml two block's of code after Tax ID block's:
<div class='client-detail'>
<span class='label'>Card Number</span>
<input class='detail client-x_card_number' name='x_card_number' t-att-value='partner.x_card_number || ""'></input>
</div>
and
<div class='client-detail'>
<span class='label'>Card Number</span>
<t t-if='partner.x_card_number'>
<span class='detail client-x_card_number'><t t-esc='partner.x_card_number' /></span>
</t>
<t t-if='!partner.x_card_number'>
<span class='detail client-x_card_number empty'>N/A</span>
</t>
</div>
Now, i see my custom field but there is no data. But if i write something in this field and click save button, data write to DB. I see changed data in Partner module in my custome field. So i do something wrong with reading data from DB. Any suggestion?
And did not solve the problem. Anyone have any ideas?
Hi Link,
To add the custom field value to the Customer view from POS screen, you can can add following code to pos->static-> src-> xml -> pos.xml, or you can add it by extending the same template.
Thank You
<div class='client-detail'>
<span class='label'>Test</span>
<t t-if='partner.custom_field'>
<span class='detail client-custom-field'><t t-esc='partner.custom_field' /></span>
</t>
<t t-if='!partner.custom_field'>
<span class='detail client-custom-field empty'>N/A</span>
</t>
</div>
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrire| Publications associées | Réponses | Vues | Activité | |
|---|---|---|---|---|
|
|
9
mars 18
|
8980 | ||
|
|
3
oct. 21
|
8344 | ||
|
POS - No Receivable Account
Résolu
|
|
2
mars 20
|
8250 | |
|
|
2
mai 18
|
8572 | ||
|
|
8
mai 24
|
21037 |