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
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
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>
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 | |
---|---|---|---|---|
|
9
Mar 18
|
7160 | ||
|
3
Oct 21
|
5678 | ||
POS - No Receivable Account
Solved
|
|
2
Mar 20
|
5664 | |
|
2
May 18
|
5475 | ||
|
8
May 24
|
17586 |