Browse Source

publish muk_web_utils - 12.0

pull/68/head
MuK IT GmbH 6 years ago
parent
commit
ce94517d8d
  1. 2
      muk_web_utils/__manifest__.py
  2. 2
      muk_web_utils/controllers/backend.py
  3. 2
      muk_web_utils/static/src/js/fields/binary.js
  4. 2
      muk_web_utils/static/src/js/fields/image.js

2
muk_web_utils/__manifest__.py

@ -20,7 +20,7 @@
{ {
"name": "MuK Web Utils", "name": "MuK Web Utils",
"summary": """Utility Features""", "summary": """Utility Features""",
"version": "12.0.2.8.20",
"version": "12.0.2.8.21",
"category": "Extra Tools", "category": "Extra Tools",
"license": "AGPL-3", "license": "AGPL-3",
"author": "MuK IT", "author": "MuK IT",

2
muk_web_utils/controllers/backend.py

@ -30,5 +30,5 @@ class BackendController(http.Controller):
def max_upload_size(self, **kw): def max_upload_size(self, **kw):
params = request.env['ir.config_parameter'].sudo() params = request.env['ir.config_parameter'].sudo()
return { return {
'max_upload_size': int(params.get_param("muk_web_utils.max_upload_size", default=25))
'max_upload_size': int(params.get_param('muk_web_utils.binary_max_size', default=25))
} }

2
muk_web_utils/static/src/js/fields/binary.js

@ -36,7 +36,7 @@ fields.FieldBinaryFile.include({
}).done(function(result) { }).done(function(result) {
this.max_upload_size = result.max_upload_size * 1024 * 1024; this.max_upload_size = result.max_upload_size * 1024 * 1024;
}.bind(this)); }.bind(this));
return this._super.apply(this, arguments);
return $.when(this._super.apply(this, arguments), def);
}, },
_renderReadonly: function () { _renderReadonly: function () {
this._super.apply(this, arguments); this._super.apply(this, arguments);

2
muk_web_utils/static/src/js/fields/image.js

@ -50,7 +50,7 @@ fields.FieldBinaryImage.include({
}).done(function(result) { }).done(function(result) {
this.max_upload_size = result.max_upload_size * 1024 * 1024; this.max_upload_size = result.max_upload_size * 1024 * 1024;
}.bind(this)); }.bind(this));
return this._super.apply(this, arguments);
return $.when(this._super.apply(this, arguments), def);
}, },
_render: function () { _render: function () {
this._super.apply(this, arguments); this._super.apply(this, arguments);

Loading…
Cancel
Save