diff options
| author | Simon Lejeune <sle@openerp.com> | 2019-07-30 08:49:06 +0000 |
|---|---|---|
| committer | Simon Lejeune <sle@openerp.com> | 2019-08-07 14:11:21 +0000 |
| commit | b65d4d4ca009621dcce368600a56fc20de3cc996 (patch) | |
| tree | eee9c09152e1fe648dd0ee943f43a2b6e7c3cd60 /addons/stock/static/src | |
| parent | 90c055cd35fc0863f16001b5a3eaa8999ac224cb (diff) | |
[REF] stock, stock_account: no 'at date' on layers from picking
When accessing the stock valuation layers of a done picking through the
stat button "Valuation", do not display the inventory at date button. We
guard the visibility of this button through a context key named
"no_at_date".
task-59011
Diffstat (limited to 'addons/stock/static/src')
| -rw-r--r-- | addons/stock/static/src/js/inventory_report_list_controller.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/addons/stock/static/src/js/inventory_report_list_controller.js b/addons/stock/static/src/js/inventory_report_list_controller.js index 4e2f85afe05..b3e55ac9afa 100644 --- a/addons/stock/static/src/js/inventory_report_list_controller.js +++ b/addons/stock/static/src/js/inventory_report_list_controller.js @@ -13,11 +13,19 @@ var InventoryReportListController = ListController.extend({ // Public // ------------------------------------------------------------------------- + init: function (parent, model, renderer, params) { + this.context = renderer.state.getContext(); + return this._super.apply(this, arguments); + }, + /** * @override */ renderButtons: function ($node) { this._super.apply(this, arguments); + if (this.context.no_at_date) { + return; + } var $buttonToDate = $(qweb.render('InventoryReport.Buttons')); $buttonToDate.on('click', this._onOpenWizard.bind(this)); |
