Code Monkey home page Code Monkey logo

reporting-engine's People

Contributors

alexis-via avatar astirpe avatar elmeriniemela avatar etobella avatar florian-dacosta avatar hbrunn avatar hviorforgeflow avatar ibuioli avatar ivorra78 avatar jabelchi avatar legalsylvain avatar liuhehe1995 avatar lmignon avatar luc-demeyer avatar mariadforgeflow avatar miquelrforgeflow avatar mymage avatar oca-git-bot avatar oca-transbot avatar oca-travis avatar omar7r avatar pedrobaeza avatar pedrocasi avatar saran440 avatar sbejaoui avatar sbidoul avatar stefanrijnhart avatar victoralmau avatar weblate avatar yankinmax avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

reporting-engine's Issues

[10.0] report_py3o: ODS to XLS doesn't work

With an ODS (spreadsheet) template, if I configured to output as XLS with a py3o server, I get an error:

2017-05-19 10:17:13,743 31070 ERROR testadl4 odoo.service.report: Exception: (u'Fusion server error {"reasons": ["Renderserver error: ServerError(\'<twisted.python.failure.Failure jpype._jexception.java.lang.NullPointerExceptionPyRaisable: java.lang.NullPointerException>\',)"], "error": true}', None)
Traceback (most recent call last):
  File "/home/odoo/erp/odoo/odoo/service/report.py", line 94, in go
    result, format = odoo.report.render_report(cr, uid, ids, object, datas, context)
  File "/home/odoo/erp/odoo/odoo/report/__init__.py", line 19, in render_report
    return env['ir.actions.report.xml'].render_report(ids, name, data)
  File "/home/odoo/erp/reporting-engine/report_py3o/models/ir_actions_report_xml.py", line 98, in render_report
    }).create_report(res_ids, data)
  File "/home/odoo/erp/reporting-engine/report_py3o/models/py3o_report.py", line 354, in create_report
    model_instances, data, save_in_attachment))
  File "/home/odoo/erp/reporting-engine/report_py3o/models/py3o_report.py", line 278, in _create_single_report
    _('Fusion server error %s') % r.text,
UserError: (u'Fusion server error {"reasons": ["Renderserver error: ServerError(\'<twisted.python.failure.Failure jpype._jexception.java.lang.NullPointerExceptionPyRaisable: java.lang.NullPointerException>\',)"], "error": true}', None)

[10.0] report_py3o crash when using the button "Print Invoice" when report as attachement

Here is the scenario to reproduce the bug on Odoo 10 with an up-to-date reporting-engine branch:

  1. install report_py3o and set-it-up to have a py3o invoice with PDF output and keep the default value "(object.state in ('open','paid')) and ('INV'+(object.number or '').replace('/','')+'.pdf')" for the parameter "Save as attachment prefix"
  2. Create a new customer invoice. Validate it.
  3. On this invoice in "open" state, click on the button "Print Invoice" -> you get the PDF and this PDF is saved as attachement
  4. Click on the button "Print Invoice" a second time: you get this crash:
2017-03-30 08:44:19,397 1012 INFO test8 odoo.addons.report.models.report: The PDF document INVFA00000399.pdf was loaded from the database
2017-03-30 08:44:19,397 1012 ERROR test8 odoo.service.report: Exception: coercing to Unicode: need string or buffer, tuple found
Traceback (most recent call last):
  File "/home/odoo/erp/odoo/odoo/service/report.py", line 94, in go
    result, format = odoo.report.render_report(cr, uid, ids, object, datas, context)
  File "/home/odoo/erp/odoo/odoo/report/__init__.py", line 19, in render_report
    return env['ir.actions.report.xml'].render_report(ids, name, data)
  File "/home/odoo/erp/reporting-engine/report_py3o/models/ir_actions_report_xml.py", line 92, in render_report
    }).create_report(res_ids, data)
  File "/home/odoo/erp/reporting-engine/report_py3o/models/py3o_report.py", line 360, in create_report
    with open(result_path, 'r+b') as fd:
TypeError: coercing to Unicode: need string or buffer, tuple found
2017-03-30 08:44:19,612 1012 ERROR test8 odoo.addons.web.controllers.main: An exception occured during an http request
Traceback (most recent call last):
  File "/home/odoo/erp/odoo/addons/web/controllers/main.py", line 68, in wrap
    return f(*args, **kwargs)
  File "/home/odoo/erp/odoo/addons/web/controllers/main.py", line 1468, in index
    request.session.db, request.session.uid, request.session.password, report_id])
  File "/home/odoo/erp/odoo/odoo/http.py", line 118, in dispatch_rpc
    result = dispatch(method, params)
  File "/home/odoo/erp/odoo/odoo/service/report.py", line 35, in dispatch
    res = fn(db, uid, *params)
  File "/home/odoo/erp/odoo/odoo/service/report.py", line 142, in exp_report_get
    return _check_report(report_id)
  File "/home/odoo/erp/odoo/odoo/service/report.py", line 120, in _check_report
    raise UserError('%s: %s' % (exc.message, exc.traceback))
UserError: (u"coercing to Unicode: need string or buffer, tuple found: (<type 'exceptions.TypeError'>, TypeError('coercing to Unicode: need string or buffer, tuple found',), <traceback object at 0x710332c35758>)", None)

Note : if you open the attachment from the attachment drop-down menu, you will access the invoice without problems.
In fact, when you have the crash, the variable "result_path" in the method create_report() of report_py3o/models/py3o_report.py contains the binary version of the report (and not a path)...

This regression has probably been introduced recently. @lmignon what do you think about this ? Are you able to reproduce it ?

[10.0] xlsx report_type not working

There seems to be issues with the Excel Export module (report_xlsx).

On runbot, go in Settings-->Reports-->Reports.
Select Trail Balance and edit. Change PDF type to xlsx.
Go in Accounting-->PDF Report-->Trial Balance, keep the default parameter and click Print.
You get the following error:
Unknown report type: xlsx: (<type 'exceptions.NotImplementedError'>, NotImplementedError(u'Unknown report type: xlsx',), <traceback object at 0x7f1d32210d88>)

[10.0] report_xlsx Error

Hi I always get this error whenever I add the functionality to other report in odoo 10:
Unknown report type: xlsx: (<type 'exceptions.NotImplementedError'>, NotImplementedError(u'Unknown report type: xlsx',), <traceback object at 0x7f563407d680>)

Can anyone please give me an example on how to use this module in accounting report? Thank you!

[10] Can not delete Custom BI Views

When i try no return a custom bi view to draft state i got
"Cannot rename/delete fields that are still present in views:
Fields: x_bve.invoi.x_amount_total, x_bve.invoi.x_name
View: Graph Analysis"

And i can not delete the customs.

Thanks

8.0 Crash in report_custom_filename

Here is the scenario to reproduce the bug on an up-to-date Odoo v8 with up-to-date OCA/reporting-engine/8.0 branch:

  1. Install the module report_custom_filename
  2. Replace the native sale order report by an aeroo report (I guess the problem is the same with reporting engines other than Qweb)

To make it easier for you to reproduce the bug, I have prepared a small module "test_bug_reportfilename" that depend on report_aeroo and report_custom_filename and that replaces the native quotation report by a small aeroo report. Get it here:
http://people.via.ecp.fr/~alexis/test_bug_reportfilename.zip

  1. In Settings > Technical > Actions > Report
    Edit the report "Quotation / Order" and set the field "Download filename" to
    Quote-currency-${o.currency_id.name}.pdf
    This filename may be stupid, but it's easier to reproduce/understand the bug that way, with a field o.currency_id with is present on sale.order but not on res.partner.
  2. Go to the Form view of the customer Agrolait, click on the "Sales" button, select the first quotation in the tree view and click on "Print": you get a crash:
Traceback (most recent call last):
  File "/home/alexis/new_boite/dev/odoo8/addons/web/controllers/main.py", line 70, in wrap
    return f(*args, **kwargs)
  File "/home/alexis/new_boite/dev/reporting-engines8/report_custom_filename/controllers/reports.py", line 49, in index
    'object': objects[0],
  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 989, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/lib/python2.7/dist-packages/jinja2/environment.py", line 754, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "<template>", line 1, in top-level template code
  File "/usr/lib/python2.7/dist-packages/jinja2/sandbox.py", line 329, in getattr
    value = getattr(obj, attribute)
UndefinedError: 'openerp.api.res.partner object' has no attribute 'currency_id'

Code analysis:

Qweb reports use report_custom_filename/controllers/report_controller.py
Aeroo reports (and probably other report engines) use report_custom_filename/controllers/reports.py

In report_custom_filename/controllers/report_controller.py, the model that is used as a base for "o." is the model of the report. But, in report_custom_filename/controllers/reports.py, the model that is used as a base for "o." is context['active_model']. When you click on the "Sales" button in the form view of the partner, you arrive on the tree view of sale orders, but context['active_model'] is still "res.partner" (maybe a bug of the web client, I don't know...), which triggers the crash in report_custom_filename.

[10.0] Type Error while working with report_xlsx module in Odoo10

This is the issue that I'm facing while I print the report out of Odoo in xlsx format using the report_xlsx module. Here are the screens showing error.

image

And here is the detailed server log:

image

Here is my code from reference:

my_module/report/file_name.py :
image

my_module/views/templates.xml :
image

Help Needed! Thanks in advance.

[FIX][report_xls] Protect import. (#64)

@pedrobaeza Since 65223f4 was commited i get this error:
File "/home/odoo/git/Odoo/odoo/openerp/service/report.py", line 119, in _check_report
raise openerp.osv.orm.except_orm(exc.message, exc.traceback)
except_orm: (u"type object 'report_xls' has no attribute 'xls_types'", (, AttributeError("type object 'report_xls' has no attribute 'xls_types'",), ))

Can you please fix this quickly.

[10.0] report_py3o: make escape_false=True work on ODS reports

With ODT py3o reports, thanks to an enhancement made several months ago by @lmignon in report_py3o (cf https://github.com/OCA/reporting-engine/blob/10.0/report_py3o/models/py3o_report.py#L244) and py3o.template, an empty field displayed in the ODT report is not displayed as "False" but as an empty value.

It would be great to have the same in ODS report. Currently, to avoid to display "False" when the email is empty we have to use in the ODS template : ${o.email or ''}

error print report demo

in menu user, error when print of the report using py3o Demo Report:
running on odoo 10 in debian vagrant.

must be string or buffer, not bool: (<type 'exceptions.TypeError'>, TypeError('must be string or buffer, not bool',), <traceback object at 0x7fafd45eb830>)

[9.0] bi_view_editor show empty records

I'm using the BI view editor to generate a report based on account.move.line, the idea is to get the source and relevant data from the record, for example, get the payment and check number if the move has been generated by a payment or the invoice number and invoice date if the move has been generated from an invoice.

The problem is that if I select data from the move and, for example, check number, only records with check number will be shown, records with no check number will be filtered. Same from invoices, if I choose to show the invoice date in the view, all moves with no invoice number will be filtered.

For this, If I want to see the moves from invoices and payments at the same time, showing the check number and the invoice date at the same time, the view will be empty as no move will have check number and invoice date at the same time.

There is any way to get all the records from the model and that if no data is found in the field it will be shown empty instead of been filtered?

Thanks a lot for your answer.

Custom report filenames Bug

Hello,

I get this error after installing report_custom_filename module:

Odoo Server Error
Traceback (most recent call last):
File "C:\Program Files (x86)\Odoo 8.0-20151213\server.\openerp\http.py", line 537, in _handle_exception
File "C:\Program Files (x86)\Odoo 8.0-20151213\server.\openerp\http.py", line 1415, in _dispatch_nodb
File "werkzeug\routing.pyc", line 1433, in match
NotFound: 404: Not Found

I have 8.0-20151213 odoo version

Txs for your job.

module: report_custom_filename
version: 8.0

Steps to reproduce

  • ...

Current behavior

Expected behavior

[10.0] Fusion server throwing error when trying to convert to PDF

I get the following error when using the py3o.fusion test form to convert an ODT file to PDF:

Renderserver error: ServerError('<twisted.python.failure.Failure exceptions.TypeError: Package py3oconverter.Convertor is not Callable>',)

I have followed the installation instructions to a tee. This page claims you'll get this error when the .class file is not located within the correct package hierarchy.

Just wondering if anybody else had gotten this error and what you did to resolve it.

Migration to version 11.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-11.0

Modules to migrate

Duplicate of previous issue...unable to update...installed on Debian 8.7

I get the following error when using the py3o.fusion test form to convert an ODF file to PDF:

Renderserver error: ServerError('<twisted.python.failure.Failure exceptions.TypeError: Package py3oconverter.Convertor is not Callable>',)

I have followed the installation instructions to a tee. This page claims you'll get this error when the .class file is not located within the correct package hierarchy.

Just wondering if anybody else had gotten this error and what you did to resolve it.

Template Report

Hi guys,

is there somewhere a template xls report out there that i can use to develop my first report? I'm a bit blown away by the account_move_line_report_xls report.

Thanks,
Michael

[10.0] report_py3o: Cannot pass context values to ODT reports

Hi all,

I'm not sure why this happens but since commit c74b4e2 I cannot read context values from ODT reports.

For example, if I call a function like this one from a button to generate a report:

@api.multi
def generate_report(self):
    self.ensure_one()
    context = self._context.copy()
    context['foo'] = 'foo'
    self = self.with_context(context)
    return self.env['report'].get_action(
    self, 'report_name')

I used to pass values to context and refer variables in the ODT template as py3o.foo, and that used to work. But since last merge I'm having server errors such as UndefinedError: "foo" not defined.

Thanks in advance.

[10.0]Element Page Visibility suggestion

Hello,

If ever someone had a few minutes to implement four new classes :
only-on-odd-pages
not-on-odd-pages
only-on-even-pages
not-on-even-pages.

We are a small firm and we are printing our Terms and Conditions on the back of each page.
As I'm in the process of customizing the invoice and sale reports, these classes would greatly help me doing so.

Of course, after that, I would have to find a way to number only the front of each pages or to divide by 2 the page number before showing it on my pdf.

Thanks

Regards

Vart

Expected singleton: account.invoice

Trying to get report of invoice (account.invoice) using py3o & libreoffice. We are getting errors when multiple products are listed in invoice.

Expected singleton: account.invoice.line(14, 15): (<type 'exceptions.ValueError'>, ValueError('Expected singleton: account.invoice.line(14, 15)',), <traceback object at 0x7fe2de3bef80>)

[10.0] Error in following readme report_py3o

When following the readme of the module for the installation an error wil occure on pip install service-identity. This is because of missing libraries.

The following command will solve this error by installing the dependencies. (this was needed because I installed it on a clean system)
sudo apt-get install build-essential libssl-dev libffi-dev python-dev

9.0 report_custom_filename incorrect migration

Hi,

I'm having a crash on the combination of report_custom_filename + report_xml on v9. I've identified the cause and decided to report. On method 'index' of class 'Reports' we have the following code:
v8
report_xml = http.request.session.model('ir.actions.report.xml')
report_ids = report_xml.search(
[('report_name', '=', action['report_name'])],
0, False, False, context)
for report in report_xml.browse(report_ids):
if not report.download_filename:
continue

v9
report_xml = http.request.session.model('ir.actions.report.xml')
reports = report_xml.search(
[('report_name', '=', action['report_name'])],
0, False, False, context)
for report in reports:
if not report.download_filename:
continue

the crash trace shows that on the line before the last one 'report' is an int so it couldn't possibly have a download_filename method. I think the developer applied a standard v8 to v9 API migration that doesn't apply to http requests. Keeping the v8 version solves the issue.

Invoice report using Py3o

We installed report_py3o on odoo 10 .
We followed the instructions as per guidelines and getting error while printing customer invoice.

"partner_id" not defined: (<class 'genshi.template.eval.UndefinedError'>, UndefinedError('"partner_id" not defined',), <traceback object at 0x7f0f9b0cee60>)

report_py3o: empty fields displayed as False

Using report_py3o on 10.0, with a fusion server installed with Docker.
When a field is empty, the Libreoffice variable is translated to the content: False.
Is it something that must be changed in report_py3o or in py3o.template?
Any hint on how to resolve this issue?

[10.0] Error when connecting Odoo with py3o.fusion

I followed the manual of the report_py3o module for installation.
But when I try to connect Odoo with the py3o fusion server, the fusion server gives an error and Odoo keeps waiting for a response he'll never get.
I used the standard report provided by the module on the res.users model.

py3o.fusion error:

2017-03-03 12:24:57,937 INFO formpage Request received launching thread
2017-03-03 12:24:57,938 ERROR formpage [Failure instance: Traceback: <type 'exceptions.IOError'>: [Errno 22] Invalid argument
/usr/lib/python2.7/threading.py:801:__bootstrap_inner
/usr/lib/python2.7/threading.py:754:run
/usr/local/lib/python2.7/dist-packages/twisted/_threads/_threadworker.py:46:work
/usr/local/lib/python2.7/dist-packages/twisted/_threads/_team.py:190:doWork
--- <exception caught here> ---
/usr/local/lib/python2.7/dist-packages/twisted/python/threadpool.py:250:inContext
/usr/local/lib/python2.7/dist-packages/twisted/python/threadpool.py:266:<lambda>
/usr/local/lib/python2.7/dist-packages/twisted/python/context.py:122:callWithContext
/usr/local/lib/python2.7/dist-packages/twisted/python/context.py:85:callWithContext
/usr/local/lib/python2.7/dist-packages/py3o/fusion/formpage.py:377:fusion
/usr/local/lib/python2.7/dist-packages/py3o/types/config.py:126:from_odf_file
/usr/local/lib/python2.7/dist-packages/py3o/types/config.py:92:inspect_meta
/usr/lib/python2.7/zipfile.py:963:open
]

System:

  • Ubuntu 16.04
  • Running from a Virtualenv
  • Installed the packages from Odoo with pip

Migration to version 10.0

Todo

https://github.com/OCA/maintainer-tools/wiki/Migration-to-version-10.0

Modules to migrate

Updating a module with `report_type` set to "py3o" throws critical error

I used the XML example provided in the installation instructions to create a new py3o report in my module, which installed successfully. I was also able to generate an ODF report in Odoo without problems. The issue occurs when I try to UPDATE the module (without having changed anything to the report) and get the following critical error in the log file:

2017-03-15 15:11:09,140 16327 CRITICAL dev odoo.service.server: Failed to initialize database `dev`.
Traceback (most recent call last):
File "odoo/odoo/service/server.py", line 898, in preload_registries
  registry = Registry.new(dbname, update_module=update_module)
File "odoo/odoo/modules/registry.py", line 78, in new
  odoo.modules.load_modules(registry._db, force_demo, status, update_module)
File "odoo/odoo/modules/loading.py", line 335, in load_modules
  force, status, report, loaded_modules, update_module)
File "odoo/odoo/modules/loading.py", line 237, in load_marked_modules
  loaded, processed = load_module_graph(cr, graph, progressdict, report=report, skip_modules=loaded_modules, perform_checks=perform_checks)
File "odoo/odoo/modules/loading.py", line 156, in load_module_graph
  _load_data(cr, module_name, idref, mode, kind='data')
File "odoo/odoo/modules/loading.py", line 95, in _load_data
  tools.convert_file(cr, module_name, filename, idref, mode, noupdate, kind, report)
File "odoo/odoo/tools/convert.py", line 848, in convert_file
  convert_xml_import(cr, module, fp, idref, mode, noupdate, report)
File "odoo/odoo/tools/convert.py", line 918, in convert_xml_import
  obj.parse(doc.getroot(), mode=mode)
File "odoo/odoo/tools/convert.py", line 802, in parse
  self._tags[rec.tag](rec, de, mode=mode)
File "odoo/odoo/tools/convert.py", line 710, in _tag_record
  id = self.env(context=rec_context)['ir.model.data']._update(rec_model, self.module, res, rec_id or False, not self.isnoupdate(data_node), noupdate=self.isnoupdate(data_node), mode=self.mode)
File "odoo/odoo/addons/base/ir/ir_model.py", line 1153, in _update
  record.write(values)
File "odoo/odoo/addons/base/ir/ir_actions.py", line 47, in write
  res = super(IrActions, self).write(vals)
File "odoo/odoo/models.py", line 3550, in write
  self._write(old_vals)
File "odoo/odoo/models.py", line 3606, in _write
  self._check_selection_field_value(name, val)
File "odoo/odoo/models.py", line 2116, in _check_selection_field_value
  field.convert_to_cache(value, self)
File "odoo/odoo/fields.py", line 1737, in convert_to_cache
  raise ValueError("Wrong value for %s: %r" % (self, value))
ParseError: "Wrong value for ir.actions.report.xml.report_type: 'py3o'" while parsing views/res_partner.xml:7, near
  <record id="partner_report" model="ir.actions.report.xml">
      <field name="name">Some Partner Report</field>
      <field name="model">res.partner</field>
      <field name="report_name">res.partner.some_report</field>
      <field name="report_type">py3o</field>
      <field name="py3o_filetype">odt</field>
      <field name="module">partner_some_report</field>
      <field name="py3o_template_fallback">report/some_report.odt</field>
  </record>

I have been able to reproduce this error by uninstalling the module, reinstalling (no error) and then updating (error).

bi_sql_editor - Add form view

The BI Sql editor could have the capability to add a form view, so that a user can navigate from the tree view to form view and from there to the specific object that may be defined in the query (e.g. a partner, product, sale order, etc..)

[Q] Visualisation of streaming data/anomaly highlighting

Hello,

this is a follow-up to OCA/vertical-medical#65 (comment)

Where I introduce https://github.com/nupic-community/nupic.visualizations as an interactive visualization tool for streaming data, monitoring and anomaly highlighting.
I'm wondering if the functionality could be any helpful for your projects?

The visualization is done "in browser", the only requirement is:

  • Node.js if you want to run locally (which is already a dependency of your projects)
  • or none, if one doesn't mind sending the data over the internet to our hosted online instance.

I'm not sure if we currently support a direct data feed (like REST?), instead of a file input, but that feature is planned and could be implemented.

Please let me know your opinions,
Cheers,
Mark

Decorated function executed even no module installed

Downloaded branch 7.0 from this module to being able to use excel report engine, left the entire folder onto the addons path and restart the server, after that the function decorated with @http.httprequest found on https://github.com/OCA/reporting-engine/blob/7.0/report_custom_filename/controllers/reports.py#L29 start to being executed event the report_custom_filename module is not being enabled on database.

Understand the simplest solution is delete the module from addons path, but wonder if anybody knows why is this behavior and if there is any way to corrected.

Already opened a bug on odoo here: odoo/odoo#6995

Error in custom_filename 7.0

i set ${o.name}.pdf to ewn file in report then try to print, i get this:

2015-11-07 20:39:27,962 14890 ERROR sgp openerp.addons.web.http.HttpRequest.dispatch: An error occurred while handling a json request
Traceback (most recent call last):
  File "/home/odoo/odoo/addons/web/http.py", line 285, in dispatch
    r = method(self, **self.params)
  File "/home/odoo/reporting-engine/report_custom_filename/controllers/reports.py", line 46, in index
    generated_filename = email_template.mako_template_env\
  File "/home/odoo/.virtualenvs/esigpen/local/lib/python2.7/site-packages/jinja2/environment.py", line 969, in render
    return self.environment.handle_exception(exc_info, True)
  File "/home/odoo/.virtualenvs/esigpen/local/lib/python2.7/site-packages/jinja2/environment.py", line 742, in handle_exception
    reraise(exc_type, exc_value, tb)
  File "<template>", line 1, in top-level template code
  File "/home/odoo/.virtualenvs/esigpen/local/lib/python2.7/site-packages/jinja2/sandbox.py", line 330, in getattr
    value = getattr(obj, attribute)
  File "/home/odoo/odoo/openerp/osv/orm.py", line 503, in __getattr__
    return self[name]
  File "/home/odoo/odoo/openerp/osv/orm.py", line 406, in __getitem__
    field_values = self._table.read(self._cr, self._uid, ids, field_names, context=self._context, load="_classic_write")
  File "/home/odoo/odoo/openerp/osv/orm.py", line 3707, in read
    result = self._read_flat(cr, user, select, fields, context, load)
  File "/home/odoo/odoo/openerp/osv/orm.py", line 3761, in _read_flat
    cr.execute(query, [tuple(sub_ids)] + rule_params)
  File "/home/odoo/odoo/openerp/sql_db.py", line 160, in wrapper
    raise psycopg2.OperationalError(msg)
OperationalError: Unable to use a closed cursor.

This happens when render try to access to attribute object, debugging

(Pdb) objects
[browse_record(prison.person, 69795)]
(Pdb) objects[0]
browse_record(prison.person, 69795)
(Pdb) objects[0].prontuario
*** OperationalError: Unable to use a closed cursor.
(Pdb) objects[0].name
*** OperationalError: Unable to use a closed cursor.
(Pdb) c

report_qweb_pdf_watermark inconsitent behaviour when some reports have no watermark defined

Hi,

I installed module and used it successfully on most of the PDF reports.
Reports with no watermark image set fails to be rendered.

My test configuration:

  • Odoo 10.0+e-20170809 (Community Edition) (Also reproduced on Enterprise edition)
  • wkhtmltox 0.12.2.1
  • debian 8.9

Steps to reproduce:
1/ Set watermark image on purchase order, sale order and acount invoices reports.
2/ Print an invoice or sale order

  • Result: PDF rendered with watermark -> OK
    3/ Print an account PDf report (such as General Ledger)
  • Result: PDF rendered with no watermark -> OK
    4/ Print another account PDF report (Sale/Purchase Journal)
  • Result: PDF Not redendered
  • Expected behaviour: PDF rendered with no watermark
  • Error message :
    Odoo Server Error Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/odoo/addons/report/controllers/main.py", line 100, in report_download response = self.report_routes(reportname, converter='pdf', **dict(data)) File "/usr/lib/python2.7/dist-packages/odoo/http.py", line 506, in response_wrap response = f(*args, **kw) File "/usr/lib/python2.7/dist-packages/odoo/addons/report/controllers/main.py", line 45, in report_routes pdf = report_obj.with_context(context).get_pdf(docids, reportname, data=data) File "/usr/lib/python2.7/dist-packages/odoo/addons/report_qweb_pdf_watermark/models/report.py", line 34, in get_pdf dict(env=self.env, docs=self.env[report.model].browse(docids)), File "/usr/lib/python2.7/dist-packages/odoo/api.py", line 752, in __getitem__ return self.registry[model_name]._browse((), self) File "/usr/lib/python2.7/dist-packages/odoo/modules/registry.py", line 174, in __getitem__ return self.models[model_name] KeyError: u'account.report.journal'

Thanks and best regards,

How to implement an if-condition

Hi ,

I'm using report_custom_filename in odoo8. Is it possible to add an if in the field? I tried

%if object.state in ('open','paid'): Invoice ${object.number} ${datetime.datetime.today()}.pdf

I wonder why if-condition not ends after ":" Any ideas whats going wrong?

Greetings, Claudius

[8.0] Error on Runbot: external dependency missing

On the latest PR over branch 8.0, runbot raises the following error:

Unable to install module "report_qweb_signer" because an external dependency is not met: Unable to find \'/usr/bin/java\' in path

Any tutorial to install this?

Sorry for the bad question, I still don't understand how to use this. I add it in my addons but the module doesn't appear in my list after I update modules list.

Thanks

[8.0] report_custom_filename: Module can't be installed

I donwloaded this module and tried to import it into Odoo 8 stable nightly build and it gives an error with no description. The server logs have this error:
ERROR production openerp.addons.base.ir.ir_ui_view:
Field download_filename does not exist
Error context:
View ir.actions.report.xml form
[view_id: 1085, xml_id: n/a, model: ir.actions.report.xml, parent_id: 7]

[8.0] report_qweb_signer Visible signature

Hello,

First of all I want to thank you all for the amazing work you do with Odoo.

I was wondering if it could be possible/easy to add a visible signature to the reports, because some customers might be picky about the invisible one.

Thank you

List of partner

Hello, I have problem to create one single ODT with list of partners.
How can I do the loop to make a list.
With normal py3o://for="o in objects" I can create a report with data of one partner.
How can I modify a loop to create in one ODT a list of many partner?
id Name Surname Email
1 Ciccio Pese [email protected]
2 Caio Sempronio [email protected]
3 Bepi Santo [email protected]

Thank you in advance.
Bye
Luca

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.