Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[10.0] report_py3o_fusion_server breaks simple reports #200

Closed
alexis-via opened this issue Mar 11, 2018 · 3 comments
Closed

[10.0] report_py3o_fusion_server breaks simple reports #200

alexis-via opened this issue Mar 11, 2018 · 3 comments

Comments

@alexis-via
Copy link
Contributor

Since the merge of the big PR #180 by @hbrunn , there are several breakages when using report_py3o_fusion_server.

Here is one example:

  1. install report_py3o
  2. install stock_inventory_valuation_ods from https://github.com/akretion/odoo-usability/tree/10.0/stock_inventory_valuation_ods (it depends on stock_inventory_valuation from https://github.com/akretion/odoo-addons-grap/tree/10-port-stock_inventory_valuation/stock_inventory_valuation)
  3. Go to the menu Inventory > Inventory Adjustments, select any inventory and do "Print > Inventory Valuation (ODS)" => It works, you get an ODS file
  4. Install the module report_py3o_fusion_server
  5. Repeat step 3: it breaks:
Traceback (most recent call last):
  File "/home/alexis/new_boite/dev/reporting-engine0/report_py3o/controllers/main.py", line 84, in report_download
    reportname, docids=docids, converter='py3o')
  File "/home/alexis/new_boite/dev/odoo0/odoo/http.py", line 506, in response_wrap
    response = f(*args, **kw)
  File "/home/alexis/new_boite/dev/reporting-engine0/report_py3o/controllers/main.py", line 52, in report_routes
    res, filetype = py3o_report.create_report(docids, data)
  File "/home/alexis/new_boite/dev/reporting-engine0/report_py3o/models/py3o_report.py", line 374, in create_report
    model_instance, data, save_in_attachment))
  File "/home/alexis/new_boite/dev/reporting-engine0/report_py3o/models/py3o_report.py", line 315, in _get_or_create_single_report
    model_instance, data, save_in_attachment)
  File "/home/alexis/new_boite/dev/reporting-engine0/report_py3o_fusion_server/models/py3o_report.py", line 71, in _create_single_report
    report_xml.py3o_server_id.url, data=fields, files=files)
  File "/usr/lib/python2.7/dist-packages/requests/api.py", line 107, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/api.py", line 53, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 454, in request
    prep = self.prepare_request(req)
  File "/usr/lib/python2.7/dist-packages/requests/sessions.py", line 388, in prepare_request
    hooks=merge_hooks(request.hooks, self.hooks),
  File "/usr/lib/python2.7/dist-packages/requests/models.py", line 293, in prepare
    self.prepare_url(url, params)
  File "/usr/lib/python2.7/dist-packages/requests/models.py", line 353, in prepare_url
    raise MissingSchema(error)
MissingSchema: Invalid URL 'False': No schema supplied. Perhaps you meant http://False?
@hbrunn
Copy link
Member

hbrunn commented Mar 14, 2018

we probably need another conditional to just call super when there's no server defined in https://github.com/OCA/reporting-engine/pull/180/files#diff-ae25dd9608ed1c968919639e1efd38c5R35 right?

@alexis-via
Copy link
Contributor Author

I'm not familiar at all with that kind of code, so I can't say about the solution. But if you think you can fix it, it would be really great, because it's a bad regression. In the meantime, I don't upgrade the code of OCA/reporting-engine for my users on v10.

@hbrunn
Copy link
Member

hbrunn commented Mar 21, 2018

I thought you were the author of this module? That's why I was a bit confused that you'd file a bug report instead of just a PR. I didn't change so much of the code actually, just moved around and refactored. Anyways, I'm waiting for a build to finish and #201 should fix this.

If you're up for a horse trade, how about OCA/edi#11 ?

BT-nfrei referenced this issue in brain-tec/reporting-engine May 23, 2018
* Move to report_py3o after import from HG

* Add setup

* [FIX] View inheritance may not use attribute 'string' as a selector.

* [IMP] New API + Short Hearder

* Remove unicode string

* [IMP] Add the possiblity to get the template from an absolute path on the server

* [IMP] Allow user to use local fusion

* Add a simple way to extend the parser context

* Remove ACL on removed model

* Improve filetype selection name

* Fix native flag

* fixed missing comma in model definition

* Add simple tests and fix call to fusion server

* Fix skip fusion on server when the fusion is local

* Improve tests

* Replace openerp element by odoo

* Small usability improvements

Replace README.md by README.rst (not finished)

* Take into accounts most remarks of @lasley

Remove <data> in views
Protect import of py3o libs
Remove dep on base module
Other small changes

* Replace plain SQL by orm

* rename module ir_report to ir_actions_report_xml

* Add more tests and fixes issues found by tests

* [FIX] Check constrains only if report_type == 'py3o'

* report_py3o: full installation procedure in README

* Port report_py3o to Odoo v10

* Update version numbers

Rename __openerp__.py to __manifest__.py

* PEP8 fix

* Update README

* [IMP] Escape 'False' when rendering value

* [IMP] Replace old style parser by TransientModel
The goal is to improve the modularity by making the parser a true inheritable odoo model and share part of the code with the 'report' model

Conflicts:
	report_py3o/models/ir_actions_report_xml.py
	report_py3o/models/py3o_report.py
	report_py3o/tests/test_report_py3o.py

* FIX double dot in filename

* Add access to report_xml object in report

* FIX Adapt test suite to my recent commit to avoid double dot on filename extension

* [FIX] imports

* [IMP] Minimizes memory consumption

Conflicts:
	report_py3o/models/py3o_report.py

* * travis.yml
* flake8

* Update and improve README instructions to setup py3o

* [IMP] Allow to override/extend the way we get the fallback template

* [FIX] report_py3o: fix exception when report must be saved as attachement
The mehtod  must be called with a list of ids not with a list of browse records

* OCA Transbot updated translations from Transifex

* [FIX] delete PDF invoice attachment on invoice back to draft (native feature now working with py3o)

* [IMP] report_py3o: update authors and contributors

* OCA Transbot updated translations from Transifex

* report_py3o: bump version following last merge

* [IMP] report_py3o: Take into account print_report_name
If a Printed Report Name is set on the action report, use it as
downloaded filename
refs #133

* Fix py3o freeze when using server fusion

The template file has been partially read for the parsing of the
expressions, so use the original template data instead.  When the fusion
server receives an incomplete template, we don't receive any answer
back.

* Pass option for escaping False values to server

Needs https://bitbucket.org/faide/py3o.fusion/pull-requests/1

* Add option py3o_multi_in_one for Py3o reports

* OCA Transbot updated translations from Transifex

* [FIX] report_py3o:  must return the path to the report
refs #119

* OCA Transbot updated translations from Transifex

* [IMP] report_py3o: Allows to interpret \n and \t in texts, cleans html tags too

* OCA Transbot updated translations from Transifex

* [RFR] split off the fusion server to its own module

use libreoffice for conversions in the base version. Fixes #179

* Improve README.rst for report_py3o* modules

* [ADD] migration script to install report_py3o_fusion_server on upgrades

* OCA Transbot updated translations from Transifex

* [FIX] fallback to libreoffice conversion when no server is configured

fixes #200

* [FIX] report_py3o: Bump version number

* [IMP] check for template data, not for the id

* [FIX] If this is not a py3o report, do nothing at all. In some cases the UI remains blocked otherwise

* report_py3o: mention formatLang in README

* [11.0][MIG] report_py3o
lmignon pushed a commit to acsone/reporting-engine that referenced this issue Nov 26, 2018
lmignon pushed a commit to acsone/reporting-engine that referenced this issue Nov 19, 2019
njeudy pushed a commit to myceliandre/reporting-engine that referenced this issue Jan 7, 2020
elmeriniemela pushed a commit to elmeriniemela/reporting-engine that referenced this issue Oct 21, 2020
alexis-via pushed a commit to akretion/reporting-engine that referenced this issue Feb 2, 2021
apineux pushed a commit to acsone/reporting-engine that referenced this issue Jun 29, 2021
apineux pushed a commit to acsone/reporting-engine that referenced this issue Jun 30, 2021
leemannd pushed a commit to camptocamp/reporting-engine that referenced this issue Sep 28, 2021
leemannd pushed a commit to camptocamp/reporting-engine that referenced this issue Dec 9, 2021
alexis-via pushed a commit to akretion/reporting-engine that referenced this issue Dec 9, 2021
phuctranfxvn pushed a commit to phuctranfxvn/reporting-engine that referenced this issue Dec 22, 2021
phuctranfxvn pushed a commit to phuctranfxvn/reporting-engine that referenced this issue Feb 1, 2022
phuctranfxvn pushed a commit to phuctranfxvn/reporting-engine that referenced this issue May 15, 2022
alexis-via pushed a commit to akretion/reporting-engine that referenced this issue Dec 12, 2022
alexis-via pushed a commit to akretion/reporting-engine that referenced this issue Dec 12, 2022
Tardo pushed a commit to admingrupoisonores/reporting-engine that referenced this issue Mar 24, 2023
njeudy pushed a commit to Alusage/reporting-engine that referenced this issue Jun 29, 2023
njeudy pushed a commit to Alusage/reporting-engine that referenced this issue Jun 29, 2023
Ricardoalso pushed a commit to camptocamp/reporting-engine that referenced this issue Sep 8, 2023
alexis-via pushed a commit to akretion/reporting-engine that referenced this issue Oct 23, 2023
alexis-via pushed a commit to akretion/reporting-engine that referenced this issue Nov 2, 2023
Ricardoalso pushed a commit to camptocamp/reporting-engine that referenced this issue Nov 20, 2023
bealdav pushed a commit to akretion/reporting-engine that referenced this issue May 31, 2024
bealdav pushed a commit to akretion/reporting-engine that referenced this issue May 31, 2024
angelmoya pushed a commit to SidooSL/reporting-engine that referenced this issue Sep 25, 2024
psugne pushed a commit to versada/reporting-engine that referenced this issue Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants