Nurosoft Alibaba Cloud Object Storage Service Integration
by Nurosoft Consulting https://nurosoft.id
Odoo
$ 157.38
Availability |
Odoo Online
Odoo.sh
On Premise
|
Lines of code | 555 |
Technical Name |
nrs_filestore_aliyun_oss |
License | LGPL-3 |
Website | https://nurosoft.id |
Availability |
Odoo Online
Odoo.sh
On Premise
|
Lines of code | 555 |
Technical Name |
nrs_filestore_aliyun_oss |
License | LGPL-3 |
Website | https://nurosoft.id |

Nurosoft Alibaba Cloud Object Storage Service Integration
Enables Odoo to use Alibaba Cloud Object Storage Service as its filestore backend.
Prerequisites
-
Alibaba Cloud OSS SDK for Python V2, which can be installed by running the following command on your server.
pip install oss2
- An active storage plan for Alibaba Cloud Object Storage Service.
-
An Alibaba Cloud account with access to Object Storage Service (OSS) Management Console for viewing buckets.
For Resouce Access Management (RAM) users, grant access through the RAM console.
Configuration
-
Enable and configure the module through Settings → General Settings → Integrations → Alibaba Cloud Object Storage Service.
-
Find the Endpoint in the Overview tab of your bucket through Alibaba Cloud's Object Storage Service (OSS) Management Console. Scroll down to Port and copy the Endpoint for the port Access Over Internet.
-
Create an AccessKey pair through Alibaba Cloud's Resource Access Management (RAM) Console. Go to Identities → Users → Create User → Create AccessKey and choose Others for the scenario.
1. Open Console menu. 2. Choose Resource Access Management. 3. Click the user whom to generate the AccessKey pair for. 4. Press Create AccessKey. 5. Choose Others, check the checkbox, and Continue. 6. Copy the AccessKey ID and AccessKey Secret. -
Your Bucket Name should be the one where you copied your Endpoint from.
Refrain from changing Bucket Name after setting up. Only do it after you've copied all the files onto your new bucket. - Save your settings. Odoo will attempt to connect to your bucket using the settings. An error message will pop up if connection fails.
- To test your connection again, press Test Connection.
-
Object Key Prefix is your database name by default. All the files uploaded to your bucket will be prefixed with this, allowing multiple databases to use the same bucket. Check that the prefix hasn't been used in your bucket before using it.
Refrain from changing Object Key Prefix after setting up. Only do it after you've renamed all the files in your bucket. -
Operation Mode controls how new files are handled and how existing files are retrieved.
-
Normal (Prefer Local Reads)
In this mode, all new attachments will directly be uploaded to the bucket. For attachments that exist in both the local filestore and the remote bucket, the module will try fetching it locally first before fetching it remotely. This mode is the default. -
Normal (Prefer Remote Reads)
Same as the first option, only the read operation is reversed. If fetching from the remote bucket fails, the module will try to fetch from the local filestore. -
Redundant (Prefer Local Reads)
This mode makes sure new attachments will be stored locally in the filestore and remotely in the bucket, increasing reliability and durability. The read operation is the same as the one in the first option. -
Redundant (Prefer Remote Reads)
Same as the third option in its write operation and same as the first option in its read operation. -
Cutover (Local Writes)
This mode should be used when new attachments shouldnât be uploaded to the bucket. In this mode, all new attachments will only be stored locally, facilitating smooth cutover from Alibaba Cloud OSS to Odooâs local filestore, which is useful in the event the module wonât be used anymore. Attachments that are still in the bucket but not available locally will still be accessed remotely. The provided scheduled action Alibaba Cloud OSS: Sync Local Filestore can be manually run to fetch all the attachments in the bucket to the local filestore if needed.
-
Normal (Prefer Local Reads)
Do
Synchronizing Data
The module provides inactive scheduled actions that you can manually run to synchronize and clean up your local and remote filestore.
-
Alibaba Cloud OSS: Sync Local Filestore
Retrieves all attachments unavailable locally, from the remote bucket, and saves them to the local filestore. -
Alibaba Cloud OSS: Sync Remote Filestore
Uploads all attachments unavailable remotely, from the local filestore to the remote bucket. -
Alibaba Cloud OSS: Clean Local Filestore
Removes all attachments already in the remote bucket, from the local filestore. -
Alibaba Cloud OSS: Clean Remote Filestore
Removes all attachments already in the local filestore, from the remote bucket.
Frequently Asked Questions
-
Q: What would happen if a user uploads a new file but the bucket is temporarily offline?
A: On upload failure, the files will be cached temporarily in Odoo's local filestore. Upon the next Odoo's database vacuum operation, the module will attempt to reupload the file to the bucket until it succeeds. -
Q: Is there a way to exclude specific files from being uploaded to bucket?
A: First, enable Odoo's debug mode. Then, go to Settings → Technical → Parameters → System Parameters and look for nrs_filestore_aliyun_oss.ns_aliyun_oss_exclusions. As an example, set it to ir.*;-ir.ui.menu:web_icon_data to exclude all models with names that start with ir. but include field web_icon_data in model ir.ui.menu. -
Q: I cannot change my settings! What do I do?
A: This may happen if you've duplicated, restored, or upgraded your database with the module installed, as a means to prevent accidental modifications to the connected bucket. To unlock the settings, go to Settings → Technical → Parameters → System Parameters and delete nrs_filestore_aliyun_oss.ns_aliyun_oss_settings_locked.
Please log in to comment on this module