Browse Source

publish muk_web_export - 11.0

pull/122/head
MuK IT GmbH 5 years ago
parent
commit
2236b72d09
  1. 2
      muk_web_export/__manifest__.py
  2. 9
      muk_web_export/static/src/js/export_widgets.js

2
muk_web_export/__manifest__.py

@ -20,7 +20,7 @@
{
"name": "MuK Export",
"summary": """File Export Dialog""",
"version": "11.0.1.0.5",
"version": "11.0.1.0.7",
"category": "Extra Tools",
"license": "AGPL-3",
"website": "http://www.mukit.at",

9
muk_web_export/static/src/js/export_widgets.js

@ -62,10 +62,10 @@ fields.FieldBinaryFile.include({
$button.click(function(e) {
e.preventDefault();
e.stopPropagation();
var value = self.get('value');
var value = self.value;
var filename_fieldname = self.attrs.filename;
var filename = self.recordData[filename_fieldname] || null;
var url = '/web/content?' + $.param({
var url = '/web/content?' + $.param({
'model': self.model,
'id': self.res_id,
'field': self.name,
@ -74,6 +74,7 @@ fields.FieldBinaryFile.include({
'download': true,
'data': utils.is_bin_size(value) ? null : value,
});
self.do_action({
'type': 'ir.actions.act_window',
'res_model': "muk_converter.convert",
@ -83,8 +84,8 @@ fields.FieldBinaryFile.include({
'view_mode': 'form',
'target': 'new',
'context': {
'default_type': "url",
'default_input_url': url,
'default_input_url': utils.is_bin_size(value) ? url : null,
'default_input_binary': utils.is_bin_size(value) ? null : value,
'default_input_name': filename,
},
});

Loading…
Cancel
Save