Skip to Content
Menu

Export Attachment

by
Odoo

22.82

v 11.0 v 12.0 Third Party 12
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 186
Technical Name om_export_attachment
LicenseSee License tab
Versions 11.0 12.0 13.0 14.0 15.0 16.0 17.0
You bought this module and need support? Click here!
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 186
Technical Name om_export_attachment
LicenseSee License tab
Versions 11.0 12.0 13.0 14.0 15.0 16.0 17.0
Export Attachment

This plugin will help to create action for mass export attachment in zip file for any models like sale, purchase, invoice, picking etc.



Features


Export Attachment for any model like sale, purchase, account, project, task etc.

Export Attachment in zip file.

Mass export attachment.

How Application Work



Apply create export attachment action Technical Groups.



Export Attachment action menu.



Create sale export attachment action.



Export Attachment action list view.



Select sale order and click to Sale attachment Export.



Sale Export Attachment.



Sale order Exported Attachment Zip file.



Unzip Sale order Exported Attachment Zip file.



Sale order SO007 Attachment Files.



Support Your Business

You will get free support and assistance in case of any issues
omapps180@gmail.com



Odoo Proprietary License v1.0

This software and associated files (the "Software") may only be used (executed,
modified, executed after modifications) if you have purchased a valid license
from the authors, typically via Odoo Apps, or if you have received a written
agreement from the authors of the Software (see the COPYRIGHT file).

You may develop Odoo modules that use the Software as a library (typically
by depending on it, importing it and using its resources), but without copying
any source code or material from the Software. You may distribute those
modules under the license of your choice, provided that this license is
compatible with the terms of the Odoo Proprietary License (For example:
LGPL, MIT, or proprietary licenses similar to this one).

It is forbidden to publish, distribute, sublicense, or sell copies of the Software
or modified copies of the Software.

The above copyright notice and this permission notice must be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

Please log in to comment on this module

  • The author can leave a single reply to each comment.
  • This section is meant to ask simple questions or leave a rating. Every report of a problem experienced while using the module should be addressed to the author directly (refer to the following point).
  • If you want to start a discussion with the author or have a question related to your purchase, please use the support page.
There are no ratings yet!
Error invoice
by
Aitor Fernández Domínguez
on 3/13/24, 10:51 AM Confirmed Purchase

Hi.

I Have problem with invoices.

This is the error.

Error:

Odoo Server Error


Traceback (most recent call last):

  File "/usr/lib/python3.5/base64.py", line 518, in _input_type_check

    m = memoryview(s)

TypeError: memoryview: a bytes-like object is required, not 'str'


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


Traceback (most recent call last):

  File "/opt/odoo11-pre/odoo/odoo/http.py", line 653, in _handle_exception

    return super(JsonRequest, self)._handle_exception(exception)

  File "/opt/odoo11-pre/odoo/odoo/http.py", line 312, in _handle_exception

    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

  File "/opt/odoo11-pre/odoo/odoo/tools/pycompat.py", line 87, in reraise

    raise value

  File "/opt/odoo11-pre/odoo/odoo/http.py", line 695, in dispatch

    result = self._call_function(**self.params)

  File "/opt/odoo11-pre/odoo/odoo/http.py", line 344, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "/opt/odoo11-pre/odoo/odoo/service/model.py", line 97, in wrapper

    return f(dbname, *args, **kwargs)

  File "/opt/odoo11-pre/odoo/odoo/http.py", line 337, in checked_call

    result = self.endpoint(*a, **kw)

  File "/opt/odoo11-pre/odoo/odoo/http.py", line 939, in __call__

    return self.method(*args, **kw)

  File "/opt/odoo11-pre/odoo/odoo/http.py", line 517, in response_wrap

    response = f(*args, **kw)

  File "/opt/odoo11-pre/odoo/addons/web/controllers/main.py", line 938, in call_button

    action = self._call_kw(model, method, args, {})

  File "/opt/odoo11-pre/odoo/addons/web/controllers/main.py", line 926, in _call_kw

    return call_kw(request.env[model], method, args, kwargs)

  File "/opt/odoo11-pre/odoo/odoo/api.py", line 699, in call_kw

    return call_kw_multi(method, model, args, kwargs)

  File "/opt/odoo11-pre/odoo/odoo/api.py", line 690, in call_kw_multi

    result = method(recs, *args, **kwargs)

  File "/opt/odoo11-pre/extramodules/om_export_attachment/wizard/export_attachment.py", line 47, in action_export

    fh.write(base64.decodebytes(attachment.datas))

  File "/usr/lib/python3.5/base64.py", line 552, in decodebytes

    _input_type_check(s)

  File "/usr/lib/python3.5/base64.py", line 521, in _input_type_check

    raise TypeError(msg) from err

TypeError: expected bytes-like object, not str



Best regards.


Error again
by
Aitor Fernández Domínguez
on 3/7/24, 8:46 AM Confirmed Purchase

I was able to solve the error by putting the path by hand. I now have the problem with invoices, when trying to export the attachment the following error appears. 

Error:

Odoo Server Error


Traceback (most recent call last):

  File "/usr/lib/python3.5/base64.py", line 518, in _input_type_check

    m = memoryview(s)

TypeError: memoryview: a bytes-like object is required, not 'str'


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


Traceback (most recent call last):

  File "/opt/odoo11-pre/odoo/odoo/http.py", line 653, in _handle_exception

    return super(JsonRequest, self)._handle_exception(exception)

  File "/opt/odoo11-pre/odoo/odoo/http.py", line 312, in _handle_exception

    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

  File "/opt/odoo11-pre/odoo/odoo/tools/pycompat.py", line 87, in reraise

    raise value

  File "/opt/odoo11-pre/odoo/odoo/http.py", line 695, in dispatch

    result = self._call_function(**self.params)

  File "/opt/odoo11-pre/odoo/odoo/http.py", line 344, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "/opt/odoo11-pre/odoo/odoo/service/model.py", line 97, in wrapper

    return f(dbname, *args, **kwargs)

  File "/opt/odoo11-pre/odoo/odoo/http.py", line 337, in checked_call

    result = self.endpoint(*a, **kw)

  File "/opt/odoo11-pre/odoo/odoo/http.py", line 939, in __call__

    return self.method(*args, **kw)

  File "/opt/odoo11-pre/odoo/odoo/http.py", line 517, in response_wrap

    response = f(*args, **kw)

  File "/opt/odoo11-pre/odoo/addons/web/controllers/main.py", line 938, in call_button

    action = self._call_kw(model, method, args, {})

  File "/opt/odoo11-pre/odoo/addons/web/controllers/main.py", line 926, in _call_kw

    return call_kw(request.env[model], method, args, kwargs)

  File "/opt/odoo11-pre/odoo/odoo/api.py", line 699, in call_kw

    return call_kw_multi(method, model, args, kwargs)

  File "/opt/odoo11-pre/odoo/odoo/api.py", line 690, in call_kw_multi

    result = method(recs, *args, **kwargs)

  File "/opt/odoo11-pre/extramodules/om_export_attachment/wizard/export_attachment.py", line 47, in action_export

    fh.write(base64.decodebytes(attachment.datas))

  File "/usr/lib/python3.5/base64.py", line 552, in decodebytes

    _input_type_check(s)

  File "/usr/lib/python3.5/base64.py", line 521, in _input_type_check

    raise TypeError(msg) from err

TypeError: expected bytes-like object, not str


Error creating files
by
Aitor Fernández Domínguez
on 3/7/24, 8:32 AM Confirmed Purchase

Hi.

I bought this module, but i have one error.

¿You can help me?

Thanks

Error:

Odoo Server Error


Traceback (most recent call last):

  File "/opt/odoo11-pre/odoo/odoo/http.py", line 653, in _handle_exception

    return super(JsonRequest, self)._handle_exception(exception)

  File "/opt/odoo11-pre/odoo/odoo/http.py", line 312, in _handle_exception

    raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])

  File "/opt/odoo11-pre/odoo/odoo/tools/pycompat.py", line 87, in reraise

    raise value

  File "/opt/odoo11-pre/odoo/odoo/http.py", line 695, in dispatch

    result = self._call_function(**self.params)

  File "/opt/odoo11-pre/odoo/odoo/http.py", line 344, in _call_function

    return checked_call(self.db, *args, **kwargs)

  File "/opt/odoo11-pre/odoo/odoo/service/model.py", line 97, in wrapper

    return f(dbname, *args, **kwargs)

  File "/opt/odoo11-pre/odoo/odoo/http.py", line 337, in checked_call

    result = self.endpoint(*a, **kw)

  File "/opt/odoo11-pre/odoo/odoo/http.py", line 939, in __call__

    return self.method(*args, **kw)

  File "/opt/odoo11-pre/odoo/odoo/http.py", line 517, in response_wrap

    response = f(*args, **kw)

  File "/opt/odoo11-pre/odoo/addons/web/controllers/main.py", line 938, in call_button

    action = self._call_kw(model, method, args, {})

  File "/opt/odoo11-pre/odoo/addons/web/controllers/main.py", line 926, in _call_kw

    return call_kw(request.env[model], method, args, kwargs)

  File "/opt/odoo11-pre/odoo/odoo/api.py", line 699, in call_kw

    return call_kw_multi(method, model, args, kwargs)

  File "/opt/odoo11-pre/odoo/odoo/api.py", line 690, in call_kw_multi

    result = method(recs, *args, **kwargs)

  File "/opt/odoo11-pre/extramodules/om_export_attachment/wizard/export_attachment.py", line 27, in action_export

    file_path = file_path + '/attachment'

TypeError: unsupported operand type(s) for +: 'bool' and 'str'

Re: Error creating files
by
OM Apps
on 3/7/24, 12:27 PM Author Reviewed

Thank You for buying our apps please check in local and get back to you or please share small video or share demo server details so I check