Skip to content

Conversation

@vincent-cowboy
Copy link

@vincent-cowboy vincent-cowboy commented Jan 17, 2023

Inspired by #492

Help needed regarding RuntimeError("object unbound") when using xls format:

Traceback (most recent call last):
 (...)
  File "(...)/odoo15/oca/queue/base_export_async/models/delay_export.py", line 82, in export
    content = self._get_file_content(params)
  File "(...)/odoo15/oca/queue/base_export_async/models/delay_export.py", line 66, in _get_file_content
    return xlsx.from_data(columns_headers, import_data)
  File "(...)/odoo15/odoo/addons/web/controllers/main.py", line 1913, in from_data
    with ExportXlsxWriter(fields, len(rows)) as xlsx_writer:
  File "(...)/odoo15/odoo/addons/web/controllers/main.py", line 709, in __init__
    decimal_places = [res['decimal_places'] for res in request.env['res.currency'].search_read([], ['decimal_places'])]
  File "(...)/.pyenv/versions/odoo15/lib/python3.8/site-packages/werkzeug/local.py", line 348, in __getattr__
    return getattr(self._get_current_object(), name)
  File "(...)/.pyenv/versions/odoo15/lib/python3.8/site-packages/werkzeug/local.py", line 307, in _get_current_object
    return self.__local()
  File "(...)/.pyenv/versions/odoo15/lib/python3.8/site-packages/werkzeug/local.py", line 137, in _lookup
    raise RuntimeError("object unbound")
RuntimeError: object unbound

Guewen Baconnier and others added 8 commits January 13, 2023 18:06
Schedule exports based on an export list.
Susbcribed users will receive an email at the configured interval.
Currently translated at 100.0% (36 of 36 strings)

Translation: queue-12.0/queue-12.0-export_async_schedule
Translate-URL: https://translation.odoo-community.org/projects/queue-12-0/queue-12-0-export_async_schedule/fr/
Currently translated at 100.0% (36 of 36 strings)

Translation: queue-12.0/queue-12.0-export_async_schedule
Translate-URL: https://translation.odoo-community.org/projects/queue-12-0/queue-12-0-export_async_schedule/fr/
@vincent-cowboy vincent-cowboy changed the title [15.0][MIG] base_export_async: Migration to 14.0 [15.0][MIG] base_export_async: Migration to 15.0 Jan 17, 2023
@vincent-cowboy vincent-cowboy marked this pull request as draft January 17, 2023 11:14
Guewen Baconnier and others added 15 commits January 17, 2023 12:20
The UI still send it to the current user, but it will allow
reusing the module for other purposes: plan a regular export
to users.

Setting the recipient_ids instead of the email_to in mail.mail means
that we can still send the email, it will stay in the failed emails,
allowing to correct the user.
We cannot change the create_date of a record in the test, so it fails.
Change the current time past the TTL instead.
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: queue-12.0/queue-12.0-base_export_async
Translate-URL: https://translation.odoo-community.org/projects/queue-12-0/queue-12-0-base_export_async/
Currently translated at 100.0% (18 of 18 strings)

Translation: queue-12.0/queue-12.0-base_export_async
Translate-URL: https://translation.odoo-community.org/projects/queue-12-0/queue-12-0-base_export_async/fr/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: queue-12.0/queue-12.0-base_export_async
Translate-URL: https://translation.odoo-community.org/projects/queue-12-0/queue-12-0-base_export_async/
Currently translated at 100.0% (18 of 18 strings)

Translation: queue-12.0/queue-12.0-base_export_async
Translate-URL: https://translation.odoo-community.org/projects/queue-12-0/queue-12-0-base_export_async/da/
Currently translated at 94.4% (17 of 18 strings)

Translation: queue-12.0/queue-12.0-base_export_async
Translate-URL: https://translation.odoo-community.org/projects/queue-12-0/queue-12-0-base_export_async/pt/
@vincent-cowboy vincent-cowboy closed this by deleting the head repository Jan 17, 2023
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

Successfully merging this pull request may close these issues.

8 participants