Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
fc0d719
Migrate and rename attachment_metadata to attachment_base_synchronize
florian-dacosta Aug 1, 2016
7cdfe5a
change way to open new cursor
florian-dacosta Aug 3, 2016
b8a3690
Order ir attachment metadata by create date
florian-dacosta Aug 19, 2016
09a2b5e
ADD tests
angelmoya Oct 3, 2016
aa3118c
[MIG] Make modules uninstallable
pedrobaeza Oct 6, 2016
ed2c71e
[MIG] Rename manifest files
pedrobaeza Oct 6, 2016
a7b80b9
[MIG] Migrate module to v10
florian-dacosta Mar 6, 2017
c8c5928
[FIX] website uri
sbidoul Jul 7, 2017
a73ef2c
OCA Transbot updated translations from Transifex
oca-transbot Jul 15, 2017
184174c
OCA Transbot updated translations from Transifex
oca-transbot Jul 29, 2017
e4f5a56
OCA Transbot updated translations from Transifex
oca-transbot Aug 5, 2017
1577e61
OCA Transbot updated translations from Transifex
oca-transbot Dec 2, 2017
19f916e
OCA Transbot updated translations from Transifex
oca-transbot Dec 30, 2017
33fdfbc
OCA Transbot updated translations from Transifex
oca-transbot Jan 16, 2018
3eb41d5
OCA Transbot updated translations from Transifex
oca-transbot Jan 27, 2018
204fed0
OCA Transbot updated translations from Transifex
oca-transbot Mar 3, 2018
91d541e
[UPD] Update attachment_base_synchronize.pot
oca-travis Jun 24, 2018
8a678ed
[WIP][MIG]attachment_base_synchronize:Migration to 11.0
Kiplangatdan Jul 30, 2018
3821837
Update README
Kiplangatdan Aug 7, 2018
b294e1f
[ADD]batch_limit configuration
Kiplangatdan Nov 2, 2018
90d90a6
[IMP] Readme
Kiplangatdan Nov 14, 2018
de55e19
fixup! [WIP][MIG]attachment_base_synchronize:Migration to 11.0
Dec 9, 2018
51d39f2
fixup! [WIP][MIG]attachment_base_synchronize:Migration to 11.0
Dec 10, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions attachment_base_synchronize/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3

====================
Attachment Metadata
====================

This module extends ir.attachment model with some new fields for a better control for import and export of files.

The main feature is an integrity file check with a hash.

A file hash is short representation (signature) computed from file data.
Hashes computed before send file and after received file can be compared to be sure of the content integrity.

An example of the use of this module, can be found in the module `external_file_location`.


Usage
=====

Go the menu Settings > Technical > Database Structure > Meta Data Attachments

You can create / see standard attachments with additional fields

Configure the batch limit for attachments that can be sync by the cron task at a go:

Settings > Technical > System parameters > attachment_sync_cron_batch_limit



.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/149/10.0


Known issues / Roadmap
======================

The purpose of this module is not to import the data of the file but only exchange files with external application.


Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/{project_repo}/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smash it by providing detailed and welcomed feedback.

Credits
=======

Images
------

* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.


Contributors
------------

* Valentin CHEMIERE <valentin.chemiere@akretion.com>
* Florian da Costa <florian.dacosta@akretion.com>
* Angel Moya <http://angelmoya.es>
Comment thread
Kiplangatdan marked this conversation as resolved.
* Dan Kiplangat <dan@sunflowerweb.nl>

Maintainer
----------

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

This module is maintained by the OCA.

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

To contribute to this module, please visit https://odoo-community.org.
1 change: 1 addition & 0 deletions attachment_base_synchronize/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
29 changes: 29 additions & 0 deletions attachment_base_synchronize/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2015 Florian DA COSTA @ Akretion
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
'name': 'Attachment Base Synchronize',
'version': '11.0.1.0.0',
'author': 'Akretion,Odoo Community Association (OCA)',
'summary': 'This module enhances ir.attachment for better '
'control of import and export of files',
'website': 'https://www.akretion.com',
'license': 'AGPL-3',
'category': 'Generic Modules',
'depends': [
'base',
'mail',
],
'data': [
'views/attachment_view.xml',
'security/ir.model.access.csv',
'data/cron.xml',
'data/ir_config_parameter.xml',
],
'demo': [
'demo/attachment_metadata_demo.xml'
],
'installable': True,
'application': False,
'images': [],
}
17 changes: 17 additions & 0 deletions attachment_base_synchronize/data/cron.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo noupdate="1">

<record model="ir.cron" id="cronjob_run_attachments_metadata">
<field name='name'>Run Attachments Metadata</field>
<field name='interval_number'>30</field>
<field name='interval_type'>minutes</field>
<field name="numbercall">-1</field>
<field name="active">False</field>
<field name="doall" eval="False" />
<field name="model_id" ref="model_ir_attachment_metadata"/>
<field name="state">code</field>
<field name="code">model.run_attachment_metadata_scheduler()</field>
<field name="args">([])</field>
</record>

</odoo>
7 changes: 7 additions & 0 deletions attachment_base_synchronize/data/ir_config_parameter.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo noupdate="1">
<record id="attachment_sync_cron_batch_limit" model="ir.config_parameter">
<field name="key">attachment_sync_cron_batch_limit</field>
<field name="value">200</field>
</record>
</odoo>
10 changes: 10 additions & 0 deletions attachment_base_synchronize/demo/attachment_metadata_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<odoo noupdate="1">

<record id="attachment_metadata" model="ir.attachment.metadata">
<field name="datas">bWlncmF0aW9uIHRlc3Q=</field>
<field name="datas_fname">attachment_metadata.doc</field>
<field name="name">attachment_metadata.doc</field>
</record>

</odoo>
Loading