diff --git a/muk_attachment_lobject/README.rst b/muk_attachment_lobject/README.rst new file mode 100644 index 0000000..bf0c92a --- /dev/null +++ b/muk_attachment_lobject/README.rst @@ -0,0 +1,122 @@ +=================================== +MuK Large Object Attachment Storage +=================================== + +Provides a new attachment location to save attachments as PostgreSQL large objects. +To enable the large object storage option change the `ir_attachment.location` +parameter to `lobject`. + +**Advantages over the in-database storage** + +* Better RAM efficiency (This is more important for large files than for small ones.) +* Possibility to easily dump the base without the large objects (This can be useful for reproducing bugs.) + +**Advantages over the file system storage** + +* Large objects are transactional (fully ACID) +* They work out of the box in multi-system setups (So there is no need for NFS or similar file sharing tools.) +* Enables you to easily create backups of the entire system + + +Installation +============ + +To install this module, you need to: + +Download the module and add it to your Odoo addons folder. Afterward, log on to +your Odoo server and go to the Apps menu. Trigger the debug mode and update the +list by clicking on the "Update Apps List" link. Now install the module by +clicking on the install button. + +Another way to install this module is via the package management for Python +(`PyPI `_). + +To install our modules using the package manager make sure +`odoo-autodiscover `_ is installed +correctly. Then open a console and install the module by entering the following +command: + +``pip install --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` + +The module name consists of the Odoo version and the module name, where +underscores are replaced by a dash. + +**Module:** + +``odoo-addon-`` + +**Example:** + +``sudo -H pip3 install --extra-index-url https://nexus.mukit.at/repository/odoo/simple odoo11-addon-muk-utils`` + +Once the installation has been successfully completed, the app is already in the +correct folder. Log on to your Odoo server and go to the Apps menu. Trigger the +debug mode and update the list by clicking on the "Update Apps List" link. Now +install the module by clicking on the install button. + +The biggest advantage of this variant is that you can now also update the app +using the "pip" command. To do this, enter the following command in your console: + +``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` + +When the process is finished, restart your server and update the application in +Odoo. The steps are the same as for the installation only the button has changed +from "Install" to "Upgrade". + +You can also view available Apps directly in our `repository `_ +and find a more detailed installation guide on our `website `_. + +For modules licensed under OPL-1, you will receive access data when you purchase +the module. If the modules were not purchased directly from +`MuK IT `_ please contact our support (support@mukit.at) +with a confirmation of purchase to receive the corresponding access data. + +Upgrade +============ + +To upgrade this module, you need to: + +Download the module and add it to your Odoo addons folder. Restart the server +and log on to your Odoo server. Select the Apps menu and upgrade the module by +clicking on the upgrade button. + +If you installed the module using the "pip" command, you can also update the +module in the same way. Just type the following command into the console: + +``pip install --upgrade --extra-index-url https://nexus.mukit.at/repository/odoo/simple `` + +When the process is finished, restart your server and update the application in +Odoo, just like you would normally. + +Configuration +============= + +The module has an init hook, which automatically stores all attachments in +large objects. To activate this hook the config parameter `auto_storage_migration` +has to be set to `true`. + +Usage +============= + +This module has no direct visible effect on the system. However, existing and +future attachments are stored as large objects. + +Credits +======= + +Contributors +------------ + +* Mathias Markl + +Author & Maintainer +------------------- + +This module is maintained by the `MuK IT GmbH `_. + +MuK IT is an Austrian company specialized in customizing and extending Odoo. +We develop custom solutions for your individual needs to help you focus on +your strength and expertise to grow your business. + +If you want to get in touch please contact us via mail +(sale@mukit.at) or visit our website (https://mukit.at). diff --git a/muk_attachment_lobject/__manifest__.py b/muk_attachment_lobject/__manifest__.py index c45a98b..b191f78 100644 --- a/muk_attachment_lobject/__manifest__.py +++ b/muk_attachment_lobject/__manifest__.py @@ -16,11 +16,11 @@ # along with this program. If not, see . # ################################################################################### - + { "name": "MuK Large Objects Attachment", "summary": """Large Objects Attachment Location""", - "version": '12.0.2.1.7', + "version": '12.0.2.1.8', "category": 'Extra Tools', "license": "AGPL-3", "website": "http://www.mukit.at", diff --git a/muk_attachment_lobject/i18n/de.po b/muk_attachment_lobject/i18n/de.po index 8296513..187c385 100644 --- a/muk_attachment_lobject/i18n/de.po +++ b/muk_attachment_lobject/i18n/de.po @@ -7,13 +7,16 @@ msgstr "" "Project-Id-Version: Odoo Server 12.0-20190128\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2019-02-27 13:03+0000\n" -"PO-Revision-Date: 2019-02-27 13:03+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" +"PO-Revision-Date: 2019-05-08 09:06+0000\n" +"Last-Translator: Manuel Marklo \n" +"Language-Team: German \n" +"Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.4\n" #. module: muk_attachment_lobject #: model:ir.model,name:muk_attachment_lobject.model_ir_attachment @@ -23,16 +26,15 @@ msgstr "Dateianhang" #. module: muk_attachment_lobject #: model:ir.model.fields,field_description:muk_attachment_lobject.field_ir_attachment__store_lobject msgid "Data" -msgstr "" +msgstr "Daten" #. module: muk_attachment_lobject #: code:addons/muk_attachment_lobject/models/ir_attachment.py:65 #, python-format msgid "Only administrators can execute this action." -msgstr "" +msgstr "Nur Administratoren können diese Aktion ausführen." #. module: muk_attachment_lobject #: model_terms:ir.ui.view,arch_db:muk_attachment_lobject.view_attachment_form msgid "Storage" -msgstr "" - +msgstr "Speicher" diff --git a/muk_attachment_lobject/models/ir_attachment.py b/muk_attachment_lobject/models/ir_attachment.py index 30f44e9..dd3b5c3 100644 --- a/muk_attachment_lobject/models/ir_attachment.py +++ b/muk_attachment_lobject/models/ir_attachment.py @@ -108,7 +108,7 @@ class LObjectIrAttachment(models.Model): vals = self._update_datas_vals(vals, attach, bin_data) vals['store_lobject'] = bin_data clean_vals = self._get_datas_clean_vals(attach) - super(LObjectIrAttachment, attach.sudo()).write(vals) + models.Model.write(attach.sudo(), vals) self._clean_datas_after_write(clean_vals) else: super(LObjectIrAttachment, attach)._inverse_datas() \ No newline at end of file