Make attachments of other models in poweremail.template #112
GitHub Actions / PY3TestsResults
failed
Feb 28, 2025 in 0s
1 errors, 92 pass in 1m 33s
2 files 2 suites 1m 33s ⏱️
93 tests 92 ✅ 0 💤 0 ❌ 1 🔥
94 runs 93 ✅ 0 💤 0 ❌ 1 🔥
Results for commit fbcb7b7.
Annotations
github-actions / PY3TestsResults
test_generate_attachments_with_report_template_object_reference (poweremail.tests.test_attach_other_models.TestAttachOtherModels.test_generate_attachments_with_report_template_object_reference) with error
src/1740730860/poweremail.xml [took 0s]
Raw output
Error At test_generate_attachments_with_report_template_object_reference
Traceback (most recent call last):
File "/home/ci_replicante/.pyenv/versions/3.11.4/envs/1740730860/lib/python3.11/site-packages/mock/mock.py", line 1452, in patched
return func(*newargs, **newkeywargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ci_replicante/ci_runners/Buda/_work/poweremail/poweremail/src/erp/server/bin/addons/poweremail/tests/test_attach_other_models.py", line 96, in test_generate_attachments_with_report_template_object_reference
mailbox_id = pm_tmp_obj.generate_mail(cursor, uid, tmpl_id, [1], context={})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ci_replicante/ci_runners/Buda/_work/poweremail/poweremail/src/erp/server/bin/addons/poweremail/poweremail_template.py", line 1099, in generate_mail
return self.generate_mail_sync(cursor, user, template_id, record_ids, context=context)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ci_replicante/ci_runners/Buda/_work/poweremail/poweremail/src/erp/server/bin/addons/poweremail/poweremail_template.py", line 1131, in generate_mail_sync
self._generate_attach_reports(cursor, user, template, [record_id], mail, context=context)
File "/home/ci_replicante/ci_runners/Buda/_work/poweremail/poweremail/src/erp/server/bin/addons/poweremail/poweremail_template.py", line 951, in _generate_attach_reports
'datas': base64.b64encode(result),
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/ci_replicante/.pyenv/versions/3.11.4/lib/python3.11/base64.py", line 58, in b64encode
encoded = binascii.b2a_base64(s, newline=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: a bytes-like object is required, not 'str'
Loading