Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX][web_export_view] Make it usable when int fields are present #590

Merged
merged 1 commit into from Mar 24, 2017

Conversation

yajo
Copy link
Member

@yajo yajo commented Mar 24, 2017

To reproduce the problem, you just had to:

  1. Go to Settings > Technical > User Interface > Views.
  2. Press Export Current View > Excel.

You got this:

ReferenceError: assignment to undeclared variable tmp

http://localhost:9069/web_export_view/static/src/js/web_export_view.js:95 Traceback:
.on_sidebar_export_view_xls/</<@http://localhost:9069/web_export_view/static/src/js/web_export_view.js:95:29
.each@http://localhost:9069/web/static/lib/jquery/jquery.js:383:49
.on_sidebar_export_view_xls/<@http://localhost:9069/web_export_view/static/src/js/web_export_view.js:75:17
.each@http://localhost:9069/web/static/lib/jquery/jquery.js:383:49
.on_sidebar_export_view_xls@http://localhost:9069/web_export_view/static/src/js/web_export_view.js:68:9
Sidebar<.start/<@http://localhost:9069/web/static/src/js/widgets/sidebar.js:46:17
jQuery.event.dispatch@http://localhost:9069/web/static/lib/jquery/jquery.js:4640:50
jQuery.event.add/elemData.handle@http://localhost:9069/web/static/lib/jquery/jquery.js:4309:41

Strict mode was preventing usage of an undeclared variable. Now it's declared.

I took the chance to fix some wrong formattings found here and there.

@Tecnativa

To reproduce the problem, you just had to:

1. Go to *Settings > Technical > User Interface > Views*.
2. Press *Export Current View > Excel*.

You got this:

```
ReferenceError: assignment to undeclared variable tmp

http://localhost:9069/web_export_view/static/src/js/web_export_view.js:95 Traceback:
.on_sidebar_export_view_xls/</<@http://localhost:9069/web_export_view/static/src/js/web_export_view.js:95:29
.each@http://localhost:9069/web/static/lib/jquery/jquery.js:383:49
.on_sidebar_export_view_xls/<@http://localhost:9069/web_export_view/static/src/js/web_export_view.js:75:17
.each@http://localhost:9069/web/static/lib/jquery/jquery.js:383:49
.on_sidebar_export_view_xls@http://localhost:9069/web_export_view/static/src/js/web_export_view.js:68:9
Sidebar<.start/<@http://localhost:9069/web/static/src/js/widgets/sidebar.js:46:17
jQuery.event.dispatch@http://localhost:9069/web/static/lib/jquery/jquery.js:4640:50
jQuery.event.add/elemData.handle@http://localhost:9069/web/static/lib/jquery/jquery.js:4309:41
```

Strict mode was preventing usage of an undeclared variable. Now it's declared.
@yajo yajo added this to the 9.0 milestone Mar 24, 2017
@yajo yajo self-assigned this Mar 24, 2017
Copy link
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging now as trivial

@pedrobaeza pedrobaeza merged commit ad8bcf7 into OCA:9.0 Mar 24, 2017
@pedrobaeza pedrobaeza deleted the 9.0-web_export_view-declare_var branch March 24, 2017 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants