Professional Documents
Culture Documents
JS Access and Inheritance - Odoo Development Master Documentation
JS Access and Inheritance - Odoo Development Master Documentation
action_button
Here you will find explana on of how to get/inherit ac on_bu on POS objects.
This defeni on doesn’t return class ReprintBu on. So, we cannot inherit it in a usual way.
In order to reach that object we need get instance of it using gui . Then we can inherit it
To make clear what this is like look up example where guests number bu on renderings:
this.gui.screen_instances['products'].action_buttons['guests'].renderElement();
While you can make call and even replace func on with new one, you are not able to make
inheritance via extend or include func ons. It’s because we cannot reach Class and only get
access to instance of that class.
DiscountButton
ReprintButton
TableGuestsButton
SubmitOrderButton
OrderlineNoteButton
PrintBillButton
SplitbillButton
set_fiscal_position_button
https://odoo-development.readthedocs.io/en/latest/dev/pos/gui.html 1/3
12/30/2018 JS access and inheritance — Odoo development master documentation
screen_classes
To create new screen widget (via the extend() method) or to modify exis ng screen widget (via
the include() method) you need the target class. Usually you can get this class using following
code:
screens.OrderWidget.include({
...
But it is available only for widgets that are returned by main func on in the file
“point_of_sale/sta c/src/js/screens.js”.
ReceiptScreenWidget
Ac onBu onWidget
define_ac on_bu on
ScreenWidget
PaymentScreenWidget
OrderWidget
NumpadWidget
ProductScreenWidget
ProductListWidget
In other cases you can get targeted screen widget class using following code:
https://odoo-development.readthedocs.io/en/latest/dev/pos/gui.html 3/3