From 406255ac6b66770f23bb6dad49d5ef4fb392cdfa Mon Sep 17 00:00:00 2001 From: Joren Van Onder Date: Fri, 19 Feb 2016 08:52:50 +0100 Subject: [PATCH] [FIX] point_of_sale: export all missing classes from js modules In the interest of being flexible and customizeable all of the defined classes in the POS should be exported so people can easily inherit them and change their behavior. A lot of the time you can get to them even if they're not exported if you get creative enough, but noone should have to resort to such ugly methods. This commit does this for all of the modules except for point_of_sale.popups. It has been omitted because currently it exports a single object (PopupWidget). Modifying this to export an object of objects could potentially break other unofficial modules which we do not want in a stable release. --- addons/point_of_sale/static/src/js/chrome.js | 6 ++++++ addons/point_of_sale/static/src/js/screens.js | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/addons/point_of_sale/static/src/js/chrome.js b/addons/point_of_sale/static/src/js/chrome.js index 0c7d90612ca..ea2febfbf23 100644 --- a/addons/point_of_sale/static/src/js/chrome.js +++ b/addons/point_of_sale/static/src/js/chrome.js @@ -759,7 +759,13 @@ var Chrome = PosBaseWidget.extend({ return { Chrome: Chrome, + DebugWidget: DebugWidget, + HeaderButtonWidget: HeaderButtonWidget, OrderSelectorWidget: OrderSelectorWidget, + ProxyStatusWidget: ProxyStatusWidget, + StatusWidget: StatusWidget, + SynchNotificationWidget: SynchNotificationWidget, + UsernameWidget: UsernameWidget, }; }); diff --git a/addons/point_of_sale/static/src/js/screens.js b/addons/point_of_sale/static/src/js/screens.js index beffd60af28..15fba3f1975 100644 --- a/addons/point_of_sale/static/src/js/screens.js +++ b/addons/point_of_sale/static/src/js/screens.js @@ -1962,6 +1962,11 @@ return { ProductScreenWidget: ProductScreenWidget, ProductListWidget: ProductListWidget, ClientListScreenWidget: ClientListScreenWidget, + ActionpadWidget: ActionpadWidget, + DomCache: DomCache, + ProductCategoriesWidget: ProductCategoriesWidget, + ScaleScreenWidget: ScaleScreenWidget, + set_fiscal_position_button: set_fiscal_position_button, }; });