Browse Source

Nov 15 [UPDT] Bug Fixed 'dashboard_pos'

pull/221/merge
AjmalCybro 2 years ago
parent
commit
d59e88298a
  1. 2
      dashboard_pos/README.rst
  2. 4
      dashboard_pos/__manifest__.py
  3. 23
      dashboard_pos/static/src/js/pos_dashboard.js

2
dashboard_pos/README.rst

@ -4,7 +4,7 @@ POS Dashboard
Installation
============
- www.odoo.com/documentation/16.0/setup/install.html
- www.odoo.com/documentation/14.0/setup/install.html
- Install our custom addon
Configuration

4
dashboard_pos/__manifest__.py

@ -38,13 +38,11 @@
],
'assets': {
'web.assets_backend': [
'dashboard_pos/static/src/xml/pos_dashboard.xml',
'dashboard_pos/static/src/js/pos_dashboard.js',
'dashboard_pos/static/src/css/pos_dashboard.css',
'https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.bundle.js',
],
'web.assets_qweb': [
'dashboard_pos/static/src/xml/pos_dashboard.xml',
],
},
'images': ['static/description/banner.png'],
'license': "AGPL-3",

23
dashboard_pos/static/src/js/pos_dashboard.js

@ -2,11 +2,15 @@ odoo.define('dashboard_pos.Dashboard', function (require) {
"use strict";
var AbstractAction = require('web.AbstractAction');
var ajax = require('web.ajax');
var core = require('web.core');
var rpc = require('web.rpc');
const { loadBundle } = require("@web/core/assets");
var ajax = require('web.ajax');
//var field_utils = require('web.field_utils');
//var pyUtils = require('web.py_utils');
var session = require('web.session');
//var time = require('web.time');
var web_client = require('web.web_client');
var rpc = require('web.rpc');
var _t = core._t;
var QWeb = core.qweb;
@ -36,12 +40,25 @@ var PosDashboard = AbstractAction.extend({
this.today_sale = [];
},
// willStart: function() {
// var self = this;
// return $.when(ajax.loadLibs(this), this._super()).then(function() {
// return self.fetch_data();
// });
// },
willStart: function() {
var self = this;
return $.when(ajax.loadLibs(this), this._super()).then(function() {
return $.when(loadBundle(this), this._super()).then(function() {
return self.fetch_data();
});
},
// willStart: function() {
// var self = this;
// return Promise.all([loadBundle(this), this._super()]).then(function() {
// return self.fetch_data();
start: function() {
var self = this;

Loading…
Cancel
Save