Skip to Content
Menu
This question has been flagged
1 Reply
12537 Views

i want to add custom field to pos screen, can any one tell me the way?. I have inherited many views in odoo, it seems some what different.

Avatar
Discard
Thank you Yogesh,

On Fri, May 15, 2015 at 12:47 AM, Yogesh <yogeshkushwaha4-gmail-com@mail.odoo.com> wrote:

A new answer for How to add custom fields to pos screen? has been posted. Click here to access the post.

--
Yogesh
Sent by Odoo S.A. using Odoo about Forum Post How to add custom fields to pos screen?



--
--

Thanks and Regards,

Sambasiva rao,

Skype: samba.guduru2(skype)
Best Answer

this is kind of broad question , depends on the type of field , Although there might be two possibilities.

1. add a custom field before or after some other field in existing widget.
2. create your own widget having a html attribute element and you can replace that with the data you want to show (in case you want) if you want to receive data you can just add an <input> </input> field of html

for 1st approach you inherit the qweb template of that widget in which you want to place your field there you can place your html element, for how to follow QWEB

something like :


<t t-extend="PaymentScreenWidget">

<t t-jquery="div.pos-payment-container" t-operation="prepend">

<input> </input

  

</t>

</t>



for 2nd search for how to create custom widget this might be helpful


Edit:

Some Widgets in POS:

  • NumpadWidget

  • PaypadWidget

  • PaypadButtonWidget

  • OrderWidget

  • ActionBarWidget

  • ProductCategoriesWidget

  • PaymentScreenWidget


you can see all widgets defined in POS in "point_of_sale/static/src/js/widgets.js"

to check their position in on screen "point_of_sale/static/src/xml/pos.xml"


for rendering and functionality of widgets check in

"point_of_sale/static/src/js/screens.js"



Avatar
Discard
Author

Hi Yogesh, Can you give me the widget name of POS screen?

Hi Samba, yes I edited answer:)