Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
2883 Weergaven

I  want to customize the POS  customer registration screen to add fields of type selection, date and boolean but I can not find anything concerning this. I'am aware about the qweb and the widgets but i do not know how to use them here.


I also tried to expose a custom selection field x_customertype and i was able to store its value in db but when i fetch it , the condition "!partner.x_customertype" is computed true hence N\A even though there is value in db(medicinal/recreational).

Pos.xml:

<div class='client-detail'>

                        <span class='label'>Customer Type</span>

                        <select class='detail client-customertype' name='x_customertype'>

                        <option value='medicinal' t-att-selected= 'partner.x_customertype || ""'>Medicinal</option>

                        <option value='recreational' t-att-selected= 'partner.x_customertype || ""'>Recreational</option>

                        </select>

                    </div>


<div class='client-detail'>

                        <span class='label'>Customer Type</span>

                        <t t-if='partner.x_customertype'>

                            <span class='detail client-customertype'><t t-esc='partner.x_customertype'/></span>

                        </t>

                        <t t-if='!partner.x_customertype'>

                            <span class='detail client-customertype empty'>N/A</span>

                        </t>

 </div>

Any suggestions/solutions?

Avatar
Annuleer
Auteur Beste antwoord

EDIT: I Was able to successfully expose the customer type but now when I click on edit button the value shown in customer type is not the value stored in db and this might lead to accidental update of field value. What am I missing here?

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
0
dec. 23
982
1
okt. 23
2024
3
sep. 23
21156
2
jan. 23
2584
1
mrt. 21
4997