Community mailing list archives

community@mail.odoo.com

[9.0] Aeroo Reports - ProgrammingError: can't adapt type 'ir.actions.report.xml'

by
Luke Branch
- 12/15/2015 22:11:07

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