Odoo error after installing xls report - webkit

I added xls engine and webkit addons. I am using Windows 2008 server. When I try to print ledger reports, it gives the following error:
Required report does not exist: account.account_report_general_ledger_xls
<type 'exceptions.Exception'>,Required report does not exist: account.account_report_general_ledger_xls,<traceback object at 0x1030CE40
Can any one guide me what im doing wrong? I did the same steps on another windows 7 server, its not giving me any error.

It seems that odoo can't find the report. Did you try an update all? Or take a look and try to find the report in database.

Related

How can i print a report from odoo server actions (GUI)

How can I make a server action in the GUI of odoo 10 to print the custom picking report
Report id: id=690
(I am trying to make an automated action to print al new confirmed orders)
I just noticed that this module supports odoo 10
https://apps.odoo.com/apps/modules/15.0/printnode_base/
This is probably your best bet.
To get the report from the odoo server:
{server}/report/pdf/{report_id}/{object_id}
example:
https://odoo.yourcompany.com/report/pdf/account.report_invoice_with_payments/70
I don't have access to Odoo 10, but for modern Odoos you can generate the report like that:
pdf_data = self.env.ref('account.report_invoice_with_payments').with_user(SUPERUSER_ID)._render_qweb_pdf([invoice.id])[0]
This pdf_data is pdf data as bytes that can be posted to the server or saved to a file.

Error message when using UDF and javascript - The project ____ has not enabled BigQuery

In BigQuery console I created a UDF function (language js) and now trying to call it from a saved query. I tried referencing the UDF with projectID.dataset.UDF_Name (same as I am using the for referencing vies/tables). When I click Run in UI I got an error:
"The project XXX has not enabled BigQuery"
I checked the BigQuery API and it says enabled.
When I only used dataset.UDF_Name for reference the query worked but I can save it as view getting another error: Bad routine reference "dataset.UDF_Name()"; routine references in standard SQL views require explicit project IDs
So clearly, the right approach is to use the projectID.dataset.UDF_Name() format but I can't figure out how to get rid of the "The project XXX has not enabled BigQuery" error.
Any help, much appreciated.

XLS Report error in odoo

I want to generate my own excel report using Excel report engine in odoo 8.
I am trying code which is place in this link
How can i generate xls report in odoo
but i am getting below error:
coercing to Unicode: need string or buffer, type found <type 'exceptions.TypeError'>,coercing to Unicode: need string or buffer, type found,<traceback object at 0x07366CD8>
Someone please tell me about this error. I'll be very thankful to you...!
Ok, Question resolved. type field was not exist in tree view therefore this error occurred, thanks.

TYPO3 6.2 / Extension-Manager: "static_info_tables was requested to be downloaded in different versions"

i have a wired problem with TYPO3. We update a TYPO3 instance from TYPO3 4.7 to TYPO3 6.2.4. If we go to the Extension-Manager in the Backend its workling well. If i go to
Get Extensions on top the system loads a new list of Extensions.
Its running some minutes. After that in the box below i get the output No packages found.
If i click again on the Extension-Manager again. Its running 1 - 2 Minutes and i get the error:
Uncaught TYPO3 Exception
#1342432101: static_info_tables was requested to be downloaded in different versions. (More information)
TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException thrown in file
D:\www\xxxx\typo3\sysext\extensionmanager\Classes\Domain\Model\DownloadQueue.php in line 69.
I have checked that line.
if (array_key_exists($extension->getExtensionKey(), $this->extensionStorage[$stack])) {
if ($this->extensionStorage[$stack][$extension->getExtensionKey()] !== $extension) {
throw new \TYPO3\CMS\Extensionmanager\Exception\ExtensionManagerException(
$extension->getExtensionKey() . ' was requested to be downloaded in different versions.',
1342432101
);
}
}
If i comment the line the Extension-Manager load after a few minutes. Its very slow. Under Windows its not the fastest but normally its running.
If you output the Versions in the if statement then you get different versions static_info_tables 6.0.10 and static_info_tables 6.1.0 which is the correct one.
Does anybody know how to fix this problem? I can't use the Extension-Manager because its not loading and very very slow.
Ok after a few days we have found a solution. The extension table is corrupt after getting all new versions we have removed all old entries in the extension manager table and it was working well.
To solve the problem Find all entries in the tx_extensionmanager_domain_model_extension table for the extension key static_info_tables. After that you get some entries with different versions. We have removed all old entries that have made some trouble.
To find entries that make trouble you go to this line:
D:\www\xxxx\typo3\sysext\extensionmanager\Classes\Domain\Model\DownloadQueue.php in line 69.
And debug the if statement above. There you get the ids to remove.

I would like to extract the SQL queries from Crystal Report .rpt files, is there a way to do this?

I would like to extract the SQL queries from Crystal Report .rpt files, is there a way to do this?
I don't have any of the Crystal Reports products, just the .rpt files.
Here's a .Net example of code that grabs the Command Sql from all Crystal Reports in a given directory. It requires the Crystal 2008 .Net SDK to be installed (you can download a trial from SAP):
foreach (string file in Directory.GetFiles("c:\\projects\\Reports", "*.rpt"))
{
Console.WriteLine(String.Format("Processing {0}...", file));
var doc = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
doc.Load(file);
foreach (dynamic table in doc.ReportClientDocument.DatabaseController.Database.Tables)
{
if (table.ClassName == "CrystalReports.CommandTable")
{
string commandSql = table.CommandText;
//TODO: do something with commandSql
}
}
}
To get the SQL as Crystal would build it when running a report, see this link: SAP Note 1280515 - How to extract SQL query from Crystal reports using RAS sdk.
I believe to do this, you need to supply the report parameter values so that Crystal can connect to the database in order to build the SQL. In the example, since a Report Viewer control is used, Crystal can prompt the user for the parameters.
In "Crystal Reports ActiveX Designer Design and Runtime Library" (craxddrt.dll), the Report.SQLQueryString property will do what you want.
I can't seem to find an equivalent property in the .Net SDK, and believe me, I've been looking.
** edit **
It appears that one can make use of the In-Process RAS Server to get this information:
CrystalDecisions.ReportAppServer.DataDefModel.CommandTableClass.CommandText
The other way around this is if you can run the reports, you can hook up SQL Profiler to your DB and capture the incoming SQL on the database side.
JoshL's answer worked for several of my reports, but not all of them. The following method, using ReportClientDocument.RowsetController.GetSQLStatement, was able to extract some of the queries that the other method missed.
foreach (string file in Directory.GetFiles("c:\\projects\\Reports", "*.rpt"))
{
Console.WriteLine(String.Format("Processing {0}...", file));
var doc = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
doc.Load(file);
var controller = doc.ReportClientDocument.RowsetController;
var groupPath = new CrystalDecisions.ReportAppServer.DataDefModel.GroupPath();
string temp = String.Empty;
string commandSql = controller.GetSQLStatement(groupPath, out temp);
//TODO: do something with commandSql
}
My experience is with older versions of Crystal (8,9) - I've no idea what the file formats look like for more recent versions. However, it's worth opening the files up in a text editor just in case, but for the file formats I've seen, the query text is not accessible this way.
If I remember correctly, some versions of Visual Studio 2003 came with tools for manipulating Crystal .rpt files (but I guess this isn't of much use to you, since if you had this already, you wouldn't be asking!).
It's not a very imaginative suggestion, but perhaps your quickest route would be to download the 30-day trial version of the current Crystal Reports, and see if that will open the files for you.
In the Visual studio, select the .rpt file and Go to field explorer, right click on DatabaseFields. Click on SQL query option to view the query.