You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
823 B

  1. /*
  2. Copyright (C) 2017-Today: La Louve (<http://www.lalouve.net/>)
  3. Copyright (C) 2019-Today: Druidoo (<https://www.druidoo.io>)
  4. @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
  5. License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
  6. */
  7. odoo.define('pos_empty_home.screens', function (require) {
  8. "use strict";
  9. var screens = require('point_of_sale.screens');
  10. screens.ProductListWidget.include({
  11. renderElement: function() {
  12. this._super();
  13. if (this.product_list.length == 0) {
  14. this.el.querySelector('.product-list-empty-home').style['display'] = 'block';
  15. } else {
  16. this.el.querySelector('.product-list-empty-home').style['display'] = 'none';
  17. }
  18. },
  19. });
  20. return screens;
  21. });