diff --git a/web_dashboard_tile/models/tile_tile.py b/web_dashboard_tile/models/tile_tile.py index 7f4866bca..218cec406 100644 --- a/web_dashboard_tile/models/tile_tile.py +++ b/web_dashboard_tile/models/tile_tile.py @@ -106,7 +106,7 @@ class TileTile(models.Model): 'ir.model.fields', string='Field', domain="[('model_id', '=', model_id)," - " ('ttype', 'in', ['float', 'integer'])]") + " ('ttype', 'in', ['float', 'integer', 'monetary'])]") primary_format = fields.Char( string='Format', help='Python Format String valid with str.format()\n' @@ -126,7 +126,7 @@ class TileTile(models.Model): 'ir.model.fields', string='Secondary Field', domain="[('model_id', '=', model_id)," - " ('ttype', 'in', ['float', 'integer'])]") + " ('ttype', 'in', ['float', 'integer', 'monetary'])]") secondary_format = fields.Char( string='Secondary Format', help='Python Format String valid with str.format()\n' diff --git a/web_dashboard_tile/static/src/js/custom_js.js b/web_dashboard_tile/static/src/js/custom_js.js index 9015f9a9d..615a74d6b 100644 --- a/web_dashboard_tile/static/src/js/custom_js.js +++ b/web_dashboard_tile/static/src/js/custom_js.js @@ -19,11 +19,12 @@ // //############################################################################# -odoo.web_dashboard_tile = function (instance) +odoo.web_dashboard_tile = function (require) { -var QWeb = instance.web.qweb, - _t = instance.web._t, - _lt = instance.web._lt; +var QWeb = require('web.qweb') +var _t = require('web._t') +var _lt = require('web._lt') + _.mixin({ sum: function (obj) { return _.reduce(obj, function (a, b) { return a + b; }, 0); } });