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
- Księgowość
- Zapasy
- PoS
- Projekt
- MRP
To pytanie dostało ostrzeżenie
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>
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ść | |
|---|---|---|---|---|
|
|
9
mar 18
|
8961 | ||
|
|
3
paź 21
|
8341 | ||
|
POS - No Receivable Account
Rozwiązane
|
|
2
mar 20
|
8244 | |
|
|
2
maj 18
|
8568 | ||
|
|
8
maj 24
|
21030 |