Community mailing list archives

community@mail.odoo.com

Re: [9.0] Aeroo Reports - ProgrammingError: can& #39; t adapt type & #39; ir.actions.report.xml& #39;

by
Serpent Consulting Services Pvt. Ltd., Jay Vora
- 12/16/2015 08:24:44
Luke,

On a quick look, it says its expecting an ID or a field, but it gets the object instance of browse().

I guess you can debug and check at read() ?

Thanks.
/odoo9/custom/aeroo/Aeroo/report_aeroo/report_xml.py", line 458, in read

On Wed, Dec 16, 2015 at 8:44 AM, Luke Branch <odoocommunitywidgets@gmail.com> wrote:

Hi All,

I have been having some issues with getting Aeroo Reports working in 9.0 with Yenthe's (currently still work in progress) PR.

Steps to reproduce:

1) Create Linode 2048 VPS with Ubuntu 14.04 LTS Image in Singapore Datacentre (this is just a standard 2GB RAM/2 CPU VPS)
2) cd ~/
3) wget https://raw.githubusercontent.com/Yenthe666/InstallScript/9.0/odoo_install.sh
4) sudo sh odoo_install.sh
5) After script is finished reboot VPS
6) cd ~/
7) wget https://raw.githubusercontent.com/Yenthe666/AerooInstallScript/Stable/aero_installer.sh
8) sudo sh aero_installer.sh
9) reboot when script is finished
10) Create clean database
11) install website_sale (and therefore all it's dependencies)
12) create test customer and add Accounts payable and Accounts Receivable for customer.
13) create test quotation with test product and test customer
14) print quotation in PDF (using standard Odoo print function for Quotation) - this prints no problem.
15) create your aeroo report quote.odt and setup with sale.order as model and upload quote.odt.
16) print test of your quote (id is 1)
17) error as follows:

Odoo Server Error
Traceback (most recent call last):
  File "/odoo9/odoo9-server/addons/web/controllers/main.py", line 70, in wrap
    return f(*args, **kwargs)
  File "/odoo9/odoo9-server/addons/web/controllers/main.py", line 1483, in index
    file_name = reports.read(res_id[0], ['name'], context)['name']
  File "/odoo9/odoo9-server/openerp/http.py", line 998, in proxy
    result = meth(cr, request.uid, *args, **kw)
  File "/odoo9/odoo9-server/openerp/api.py", line 238, in wrapper
    return old_api(self, *args, **kwargs)
  File "/odoo9/custom/aeroo/Aeroo/report_aeroo/report_xml.py", line 458, in read
    res = super(report_xml, self).read(cr, user, ids, fields, context)
  File "/odoo9/odoo9-server/openerp/api.py", line 238, in wrapper
    return old_api(self, *args, **kwargs)
  File "/odoo9/odoo9-server/openerp/models.py", line 3175, in read
    result = BaseModel.read(records, fields, load=load)
  File "/odoo9/odoo9-server/openerp/api.py", line 236, in wrapper
    return new_api(self, *args, **kwargs)
  File "/odoo9/odoo9-server/openerp/models.py", line 3210, in read
    self._read_from_database(stored, inherited)
  File "/odoo9/odoo9-server/openerp/api.py", line 236, in wrapper
    return new_api(self, *args, **kwargs)
  File "/odoo9/odoo9-server/openerp/models.py", line 3348, in _read_from_database
    cr.execute(query_str, params)
  File "/odoo9/odoo9-server/openerp/sql_db.py", line 139, in wrapper
    return f(self, *args, **kwargs)
  File "/odoo9/odoo9-server/openerp/sql_db.py", line 215, in execute
    res = self._obj.execute(query, params)
  File "/usr/lib/python2.7/dist-packages/psycopg2/extensions.py", line 129, in getquoted
    pobjs = [adapt(o) for o in self._seq]
ProgrammingError: can't adapt type 'ir.actions.report.xml'

I understand this involves a community-built module, however I believe this error is related to a recent commit in Odoo 9C core rather than the community code, as there are multiple instances running without this issue that were installed about a week or two back, and now with a clean installation done over the past few days i'm running into this error when trying to print all reports.

If anyone has any insight or advice they can share on this topic i'd love to hear it as it has me stumped at the moment. I think it may have something to do with JSON parsing, but beyond that i'm not sure where this is coming from.

Regards,

Luke

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe




--
The Splendid journey of 4 years in Numbers
---
Regards,
----------------------------------------------------------------------------------------------------------------------------
Jay Vora
Managing Director


 
Direct: +91-9879354457
Office: +91-9033472982
Skype: jaynvora
Twitter : jaynvora
   
-------------------------------------------------------------------------------------------------
Visit our website : http://www.serpentcs.com
Please consider the environment before printing this email