Skip to content

[14.0][MIG] report_label#502

Merged
OCA-git-bot merged 9 commits into
OCA:14.0from
StefanRijnhart:mig/14.0/report_label
Sep 27, 2022
Merged

[14.0][MIG] report_label#502
OCA-git-bot merged 9 commits into
OCA:14.0from
StefanRijnhart:mig/14.0/report_label

Conversation

@StefanRijnhart
Copy link
Copy Markdown
Member

No description provided.

@StefanRijnhart StefanRijnhart added this to the 14.0 milestone Apr 20, 2021
@StefanRijnhart StefanRijnhart changed the title [14.0][MIG] report label [14.0][MIG] report_label Apr 20, 2021
Copy link
Copy Markdown
Contributor

@ivantodorovich ivantodorovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review LGTM 👍
gh is complaining about pre-commit though, would you check?

@StefanRijnhart StefanRijnhart force-pushed the mig/14.0/report_label branch from 04cb516 to 3d924cc Compare April 20, 2021 13:59
@StefanRijnhart
Copy link
Copy Markdown
Member Author

@ivantodorovich fixed now. Thanks for the nice module BTW!

@ivantodorovich
Copy link
Copy Markdown
Contributor

@ivantodorovich fixed now. Thanks for the nice module BTW!

Thank you for migrating it ❤️

@StefanRijnhart StefanRijnhart force-pushed the mig/14.0/report_label branch 2 times, most recently from b776e40 to 8d08f00 Compare April 20, 2021 15:28
Comment thread report_label/__manifest__.py Outdated
"category": "Reporting",
"maintainers": ["ivantodorovich"],
"depends": [
"base",
Copy link
Copy Markdown
Contributor

@rousseldenis rousseldenis Dec 9, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@StefanRijnhart I have a problem launching an update --all after having installed report_label.

Adding 'base_automation' here solves the problem, but I haven't found the root problem.

image

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I'll have a look

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There you have it: https://github.com/odoo/odoo/blob/14.0/addons/base_automation/views/base_automation_view.xml#L8-L9. Base automation extends the view from ir.actions.server but report_label's button is invalid for that model unless report_label depends on base_automation so that the button's action is also available on the base.automation model (which also inherits from the ir.actions.server model, by delegation)
I added the module dependency because I can't think of a less hacky way around it at this moment.

@StefanRijnhart StefanRijnhart force-pushed the mig/14.0/report_label branch 3 times, most recently from 742c7c1 to 35ae1bf Compare December 9, 2021 19:42
Copy link
Copy Markdown

@Daniel-CA Daniel-CA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Copy link
Copy Markdown

@andreampiovesana andreampiovesana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go

@elvise
Copy link
Copy Markdown

elvise commented May 10, 2022

@StefanRijnhart can you rebase please ?

@elvise
Copy link
Copy Markdown

elvise commented May 10, 2022

@rousseldenis merge ?

@StefanRijnhart StefanRijnhart force-pushed the mig/14.0/report_label branch from 35ae1bf to 0418334 Compare May 10, 2022 16:02
@StefanRijnhart
Copy link
Copy Markdown
Member Author

@elvise rebase done.

@francesco-ooops
Copy link
Copy Markdown
Contributor

@StefanRijnhart error in precommit prevents module installation in runboat, would you have some time to try to fix it?
let us know if you need any help.

@francesco-ooops
Copy link
Copy Markdown
Contributor

It's marked for installation in the runboat logs, but the logs stop after installing module 39 out of 48: https://runboat.odoo-community.org/api/v1/builds/b99a74bb9-617a-4279-bd2f-2aae739565d9/init-log. Do you know what could have caused that?

@sbidoul any hint on this behavior?

@francesco-ooops
Copy link
Copy Markdown
Contributor

seems runboat can't load correctly module kpi_dashboard_bokeh in any PR in this repo after it was merged here, @etobella do you have any idea what could be the cause?

@sbidoul
Copy link
Copy Markdown
Member

sbidoul commented May 11, 2022

I see no additional information on the cluster. So it looks like the installation indeed exited with code 0 before having finished... this might be reproducible locally.

Copy link
Copy Markdown
Contributor

@francesco-ooops francesco-ooops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on the functional side: I followed configuration + usage instructions and tried to use demo data from the module itself, but after launching the server action a document layout page that seems out of context pops up, and label is not printed

not sure if the problem lies with demo data or code as I cannot compare behavior with v.12 as runboat has issues

@StefanRijnhart
Copy link
Copy Markdown
Member Author

That would be the standard document layout popout that you need to go through on every new Odoo database. What happens if you go through that wizard and then try again?

@francesco-ooops
Copy link
Copy Markdown
Contributor

That would be the standard document layout popout that you need to go through on every new Odoo database.

Which option should be selected for the module to work?

What happens if you go through that wizard and then try again?

"The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application."

@StefanRijnhart
Copy link
Copy Markdown
Member Author

Any option will do. It's just to determine the basic layout for other kinds of reports.

I tried printing the labels on a fresh install, and I do not encounter an error:
image

Copy link
Copy Markdown
Contributor

@francesco-ooops francesco-ooops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good for me then, maybe it's due to the runboat not building completely in the first place

who can we ask for merge?

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@StefanRijnhart
Copy link
Copy Markdown
Member Author

Ah, you installed the module manually on runboat. In that case I can fetch the error from the logs there, and it's

Traceback (most recent call last):
  File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 237, in _dispatch
    result = request.dispatch()
  File "/opt/odoo/odoo/http.py", line 806, in dispatch
    r = self._call_function(**self.params)
  File "/opt/odoo/odoo/http.py", line 359, in _call_function
    return checked_call(self.db, *args, **kwargs)
  File "/opt/odoo/odoo/service/model.py", line 94, in wrapper
    return f(dbname, *args, **kwargs)
  File "/opt/odoo/odoo/http.py", line 347, in checked_call
    result = self.endpoint(*a, **kw)
  File "/opt/odoo/odoo/http.py", line 912, in __call__
    return self.method(*args, **kw)
  File "/opt/odoo/odoo/http.py", line 531, in response_wrap
    response = f(*args, **kw)
  File "/mnt/data/odoo-addons-dir/report_xml/controllers/main.py", line 95, in report_download
    return super().report_download(data, token, context)
  File "/opt/odoo/odoo/http.py", line 531, in response_wrap
    response = f(*args, **kw)
Exception

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/odoo-venv/lib/python3.6/site-packages/werkzeug/serving.py", line 306, in run_wsgi
    execute(self.server.app)
  File "/opt/odoo-venv/lib/python3.6/site-packages/werkzeug/serving.py", line 294, in execute
    application_iter = app(environ, start_response)
  File "/opt/odoo/odoo/service/server.py", line 441, in app
    return self.app(e, s)
  File "/opt/odoo/odoo/service/wsgi_server.py", line 113, in application
    return application_unproxied(environ, start_response)
  File "/opt/odoo/odoo/service/wsgi_server.py", line 88, in application_unproxied
    result = odoo.http.root(environ, start_response)
  File "/opt/odoo/odoo/http.py", line 1328, in __call__
    return self.dispatch(environ, start_response)
  File "/opt/odoo/odoo/http.py", line 1294, in __call__
    return self.app(environ, start_wrapped)
  File "/opt/odoo-venv/lib/python3.6/site-packages/werkzeug/middleware/shared_data.py", line 220, in __call__
    return self.app(environ, start_response)
  File "/opt/odoo/odoo/http.py", line 1518, in dispatch
    result = ir_http._dispatch()
  File "/opt/odoo/addons/auth_signup/models/ir_http.py", line 19, in _dispatch
    return super(Http, cls)._dispatch()
  File "/opt/odoo/addons/web_editor/models/ir_http.py", line 21, in _dispatch
    return super(IrHttp, cls)._dispatch()
  File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 241, in _dispatch
    return cls._handle_exception(e)
  File "/opt/odoo/odoo/addons/base/models/ir_http.py", line 209, in _handle_exception
    return request._handle_exception(exception)
  File "/opt/odoo/odoo/http.py", line 744, in _handle_exception
    return super(HttpRequest, self)._handle_exception(exception)
  File "/opt/odoo/odoo/http.py", line 315, in _handle_exception
    raise exception.with_traceback(None) from new_cause
TypeError: report_download() takes 3 positional arguments but 4 were given - - -

Let me try to fix it here.

@StefanRijnhart
Copy link
Copy Markdown
Member Author

@francesco-ooops I Just checked on runboat, after manual installation of the module and selection of the company reporting style, you can now print the demo labels from the module in this PR.

@francesco-ooops
Copy link
Copy Markdown
Contributor

@francesco-ooops I Just checked on runboat, after manual installation of the module and selection of the company reporting style, you can now print the demo labels from the module in this PR.

confirmed, LGTM now!

@francesco-ooops
Copy link
Copy Markdown
Contributor

@OCA/reporting-engine-maintainers can we proceed with merge?

@github-actions
Copy link
Copy Markdown

There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.

@github-actions github-actions Bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Sep 25, 2022
@HviorForgeFlow
Copy link
Copy Markdown
Member

/ocabot merge nobump

@OCA-git-bot
Copy link
Copy Markdown
Contributor

On my way to merge this fine PR!
Prepared branch 14.0-ocabot-merge-pr-502-by-HviorForgeFlow-bump-nobump, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 755c3bd into OCA:14.0 Sep 27, 2022
@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at f8a77f8. Thanks a lot for contributing to OCA. ❤️

@toan-syncoria
Copy link
Copy Markdown

Do we have ver 15?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved merged 🎉 ready to merge stale PR/Issue without recent activity, it'll be soon closed automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.