Use of XMLHttpRequest in Dashboard widget failing - xmlhttprequest

I am unable to get an XMLHttpRequest object to work correctly in a Dashboard widget I am writing. I've isolated it to a trivial example not working in the global scope of the main.js file:
xhr = new XMLHttpRequest;
xhr.open( 'GET', "http://google.com", false );
xhr.send('');
When the last line is executed I get the error "ABORT_ERR: XMLHttpRequest Exception 102" (this is in the Dashcode debugger).
Does anyone have any idea what could be wrong here?

You need to select "Allow Network Access" in the "Widget Attributes" pane.

OK, I've found it (three hours): you need to add the following key to the Info.plist file:
<key>AllowNetworkAccess</key>
<true/>

I've got the same trouble unresolved even after AllowNetworkAccess were added to my info.plist. I've tried to change this key to AllowFullAccess, but nothing changed. After system reboot it worked fine o_O

The steps to take are:
From the menu, choose "Dashcode > Preferences..." and click on the Destinations tab.
Below the left column, click on the plus sign to create a new destination.
For an external website, choose FTP in the Type drop down. Fill out the Server, Path, User name and Password. Close the Preferences pane.
Back in Dashcode, click on the Widget Attributes icon in the left column.
Check the boxes of Allow network Access and Allow External File Access in the main column.
You should be able to run the widget without the 102 Exception error (if you are online)

Related

can't save changes when deleting Routing App Coverage File

I'm trying to remove the Routing App Coverage .geojson file. Every-time I try to remove this and save changes, I get this error:
We’re temporarily unable to save your changes. Please try again
later.
It's been 2 days now. I still can't remove it. If I try to change any other field in the app submission form, it works. Just not the Routing file.
Here is what happened that led to this point:
I tried to submit an app with a valid .geojson file
I got an Invalid Binary error and the app was not submitted. This is because my app does not support routing.
I try to remove the Routing .geojson file from my submission form.
It doesn't work. I keep getting the error " We’re temporarily unable to save your changes. Please try again later. "
Error keeps occurring after 2 days.
I have no idea what is wrong. Please help. Thanks
I do not know if you have solved this, but I had the same problem. Just inspect the element (that pop-up that appears on top of the Routing App coverage), delete the element from browser's tree and press the delete button.

Ho to fix odoo report missing PDF Layout?

I have customized the layout of sales order template ( added footer and header, formatted content etc. ). For this i created a new module and installed it. When i use this module locally (mac os), i am receiving the sales order document as pdf in the way i set it up. When using this module on a server and all changes do not apply at all. I can see that the module is installed, loaded and also if i switch the PDF-Report to HTML i can see that the Layout is set.
There are no 404 Errors in Logfile, so i am somehow stuck
As far as i understood the PDF File is a rendered HTML-File, therefore i am obviously missing some information here.
So my question is, where can i check what layout is used to generate the PDF-File?
Thanks for any help on that!
After finally finding something via more searches i found the solition which i want to share:
It is important to understand that if odoo is running public on any other port than 8069 ( portforwarding etc. ) this issue will always occur.
Generating the pdf will try to find needed assets on the public port which will not lead where needed.
The Solution is so easy but somehow i wasnt able to find it easily:
All you need to do is to set a proper url for report generation.
Goto -> Settings -> Parameters -> System Parameters
and add:
key: report.url
value: http://localhost:8069
localhost is here the correct domain, do not change this, so the machine will call the report url on itself.
Can you check your report layout in Settings ->Technical Settings ->Actions->Reports then search for your report and check qweb views
I also faced the same problem, struggled for a long period. After reading #patrick.tresp explanation I understood the reason.
For my case, I made made the odoo port (8069) as the default port, which made the base url as the localhost (domain.com) without the port number. However report url is not detecting the port, hence the problem occurs.
When I explicitly defined the report url, the problem get sorted.
i.e., Goto
Settings -> Parameters -> System Parameters
and add:
key: report.url
value: http://domain.ext:8069

Odoo 9 - cannot load custom module

I am brand new to odoo, just installed version 9 and made a module 'aidentest' using
.>>python odoo.py scaffold aidentest addons
That created the aidentest module in the addons folder. Uncommented everything in the autogenerated files
but when I went to check out my 'Hello World' page at
http://localhost:8069/aidentest/aidentest
I got a 404 not found
So I went to apps to try and load my module, but I could not find it.
Does anyone know what I need to do on Odoo 9 to load up and start coding my custom module?
Briefly: You have to activate developer mode by going to Top right menu>about>activate developer mode
I had basically given up, and was mindlessly clicking about when I hit the 'About' link on the generic-whiteguy dropdown. I had to actually stop thinking before I was able to locate the completely senseless place where they put the thing I need.
The About modal window popped up, and in it was an activate the developer mode button
Some things changed immediately, but I still couldn't find my custom module.
Then I walked away, came back and when I returned I had some auto-generated emails (new things had loaded - slowly). Did this mean that maybe my module had also become accessible? I checked, and sure enough, there it was.
ZERO DOCUMENTATION about this
Please check the config file.Then send the last error it has.

Multiple RequiredFieldValidator crashes page

I have a very strange problem. I've recently added MVC4 to an old Web Forms project. I did this by creating a new project, and adding the old files to the new project (rather than opposite approach of copying the new MVC files in). When I did this, one of my Web Forms pages stopped working - When I try to access it, it redirects to HTTP Error 404.0 - Not Found.
The file is there, and I also have other Web Forms (.aspx) pages that load without any issues. To pin-point the issue, I created a Web Forms page with the same name to replace it, and it the blank page loads. I started adding code to the new page one line at a time till I found the issue.
I finally found that what caused the issue is when I have more than one RequiredFieldValidator tag on the page. Any idea why this would happen or what I can do to work around it?
assign groups to the validators. Put them in separate groups, dont put them in same groups , make sure You dont have controltoassign be same because then during compilation same requiredfield validator might have concurrency issues and crash the page. Putting them in different groups assures that even more. If you still get the same issue then try this as well
Open IIS Manager
Right Click the server name
Select properties
Click the MIME Types button
Click New
Extension is .pdf
MIME type is application/pdf

Customizing HTTPstatus code

I am using IIS6.0. Is there any way to customize the HTTPstatus code in HTTP header which we receive in response. My Requirement is to issue a 404- not found command in place of 403-Forbidden for a specific folder access(say images). So i need to customize Status code not custom error message.
thanks-
abhishek
Open the IIS Manager and goto the web app in question
Right-click on the folder whose 403 behavior you want to modify and select "properties"
Select the "Customer Errors" tab
Change the file/behavior specified the 403 behavior you want to modify
This change will apply to the folder in question as well as sub-folders, so if you don't want this setting to cascade then you'll need to undo what you just did for sub-folders.