Merge lp:~openerp-dev/openerp-web/trunk-bug-1082616-ggh into lp:openerp-web

Proposed by Farid Ghanchi
Status: Rejected
Rejected by: Fabien Meghazi (OpenERP)
Proposed branch: lp:~openerp-dev/openerp-web/trunk-bug-1082616-ggh
Merge into: lp:openerp-web
Diff against target: 23 lines (+3/-3)
1 file modified
addons/web/static/src/js/view_form.js (+3/-3)
To merge this branch: bzr merge lp:~openerp-dev/openerp-web/trunk-bug-1082616-ggh
Reviewer Review Type Date Requested Status
Farid Ghanchi (community) Needs Resubmitting
Xavier (Open ERP) (community) Disapprove
Review via email: mp+136621@code.launchpad.net

Description of the change

Hello,

>>> Not get the filename so i have get the filename in view.datarecord

>>>step:
1. Install new module OpenERP Reprot Designer
2. During installation process, clicking to download openerp_report_designer.zip package.
3. Error display.....

Thanks...

To post a comment you must log in.
Revision history for this message
Xavier (Open ERP) (xmo-deactivatedaccount) wrote :

1. where the hell does that link content change come from?
2. I'm not convinced this is the best place to go and fetch the current file's name…

review: Disapprove
3512. By Farid Ghanchi

[Fix] fixed the issue can't download openerp report designer

Revision history for this message
Farid Ghanchi (gfarid) wrote :

Hello

widget had set effective_readonly so set oe_form_uri class

In this issue widget is set effective readonly so no get the oe_form_binary_file_save_data
so check the condition and class will be find
I hope this code is usefull

Thanks....

review: Needs Resubmitting
Revision history for this message
Fabien Meghazi (OpenERP) (fme) wrote :

Fixed in trunk's Revision:
3589 revid:<email address hidden>

Unmerged revisions

3512. By Farid Ghanchi

[Fix] fixed the issue can't download openerp report designer

3511. By Farid Ghanchi

[Fix] Fixed the issue of Can't download openerp_report_designer.zip package

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'addons/web/static/src/js/view_form.js'
--- addons/web/static/src/js/view_form.js 2012-11-28 13:50:13 +0000
+++ addons/web/static/src/js/view_form.js 2012-11-29 06:21:19 +0000
@@ -4858,8 +4858,8 @@
4858 this.do_warn(_t("Save As..."), _t("The field is empty, there's nothing to save !"));4858 this.do_warn(_t("Save As..."), _t("The field is empty, there's nothing to save !"));
4859 ev.stopPropagation();4859 ev.stopPropagation();
4860 } else if (this._dirty_flag) {4860 } else if (this._dirty_flag) {
4861 var link = this.$('.oe_form_binary_file_save_data')[0];4861 var link = (this.get("effective_readonly")) ? this.$('.oe_form_uri')[0]:this.$('.oe_form_binary_file_save_data')[0];
4862 link.download = this.filename || "download.bin"; // Works on only on Google Chrome4862 link.download = (this.filename ? this.filename : this.view.datarecord[this.node.attrs.filename]) || "download.bin"; // Works on only on Google Chrome
4863 //link.target = '_blank';4863 //link.target = '_blank';
4864 link.href = "data:application/octet-stream;base64," + value;4864 link.href = "data:application/octet-stream;base64," + value;
4865 } else {4865 } else {
@@ -4908,7 +4908,7 @@
4908 if (self.get('value')) {4908 if (self.get('value')) {
4909 self.on_save_as(ev);4909 self.on_save_as(ev);
4910 }4910 }
4911 return false;4911 return true;
4912 });4912 });
4913 }4913 }
4914 },4914 },