Skip to Content
Menu
v 16.0 Third Party 5
Download for v 16.0 Deploy on Odoo.sh
Availability
Odoo Online
Odoo.sh
On Premise
Lines of code 270
Technical Name storyblok_base
LicenseAGPL-3
Websitehttps://www.mint-system.ch/
You bought this module and need support? Click here!
License: GPL-3

Storyblok Base

Upload files to storyblok.

Configuration

  • Setup Storyblok API

  • Add Storyblok folder and connect with API and model

Once the asset field is updated, the file will be uploaded to Storyblok folder. The asset url and id are stored on the record as 'document_url' and storyblok_asset_id.

Usage

  • Inherit the Storyblok asset mixin in model with asset field:

class Partner(models.Model):
    _name = "res.partner"
    _inherit = ["res.partner", "storyblok.asset.mixin"]
  • Define an inverse method of the asset field:

image_1920 = fields.Image(inverse="_inverse_image_1920")

def _inverse_image_1920(self):
    self.upload_asset(self.image_1920)
  • To prevent upload use storyblok_update context.

self.with_context(storyblok_upload=False).write({"image_1920": filepath})

Maintainer

https://raw.githubusercontent.com/Mint-System/Wiki/master/assets/mint-system-logo.png

This module is maintained by Mint System GmbH.

For support and more information, please visit our Website.

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, please use the developer contact information. They can usually be found in the description.
Please choose a rating from 1 to 5 for this module.