This repository was archived by the owner on Feb 16, 2026. It is now read-only.
forked from OCA/server-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
11.0 mig attachment base synchronize #2
Closed
Closed
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 7cdfe5a
change way to open new cursor
florian-dacosta b8a3690
Order ir attachment metadata by create date
florian-dacosta 09a2b5e
ADD tests
angelmoya aa3118c
[MIG] Make modules uninstallable
pedrobaeza ed2c71e
[MIG] Rename manifest files
pedrobaeza a7b80b9
[MIG] Migrate module to v10
florian-dacosta c8c5928
[FIX] website uri
sbidoul a73ef2c
OCA Transbot updated translations from Transifex
oca-transbot 184174c
OCA Transbot updated translations from Transifex
oca-transbot e4f5a56
OCA Transbot updated translations from Transifex
oca-transbot 1577e61
OCA Transbot updated translations from Transifex
oca-transbot 19f916e
OCA Transbot updated translations from Transifex
oca-transbot 33fdfbc
OCA Transbot updated translations from Transifex
oca-transbot 3eb41d5
OCA Transbot updated translations from Transifex
oca-transbot 204fed0
OCA Transbot updated translations from Transifex
oca-transbot 91d541e
[UPD] Update attachment_base_synchronize.pot
oca-travis 8a678ed
[WIP][MIG]attachment_base_synchronize:Migration to 11.0
Kiplangatdan 3821837
Update README
Kiplangatdan b294e1f
[ADD]batch_limit configuration
Kiplangatdan 90d90a6
[IMP] Readme
Kiplangatdan de55e19
fixup! [WIP][MIG]attachment_base_synchronize:Migration to 11.0
51d39f2
fixup! [WIP][MIG]attachment_base_synchronize:Migration to 11.0
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> | ||
| * 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. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| from . import models |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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': [], | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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
10
attachment_base_synchronize/demo/attachment_metadata_demo.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.