Overslaan naar inhoud
  • +31 653-919-302
Cafayate.Net
  • 0
  • 0
  • Aanmelden
  • Nederlands English (US) Español (AR)
  • Contact
  • Startpagina
  • Blog
  • Vacatures
  • Contact
Cafayate.Net
  • 0
  • 0
    • Startpagina
    • Blog
    • Vacatures
    • Contact
  • +31 653-919-302
  • Nederlands English (US) Español (AR)
  • Aanmelden
  • Contact

Odoo DarkroomJS Widget

  • Alle blogs
  • Tech Blog
  • Odoo DarkroomJS Widget
  • 5 maart 2021 in
    Administrator

    This module provides a DarkroomJS web widget for use with images fields.

    This widget will allow you to perform the following actions on images:

    • Zoom
    • Rotate
    • Crop
    • Step back in history client-side (before save)

    Usage

    To use this module, you need to:

    • Install web_widget_darkroom

    • Add the to any One2many image relation by using the darkroom widget. Options can be passed through to Darkroom using the optionskey:

      <field name="image_id" widget="darkroom"
                             options="{'minWidth': 100}" />
      

    The Odoo DarkroomJS widget passes options directly through to Darkroom, which are copied from the source below:

    // Default options
    defaults: {
      // Canvas properties (dimension, ratio, color)
      minWidth: null,
      minHeight: null,
      maxWidth: null,
      maxHeight: null,
      ratio: null,
      backgroundColor: '#fff',
    
      // Plugins options
      plugins: {},
    
      // Post-initialisation callback
      initialize: function() { /* noop */ }
    },
    

    An example implementation can be found [[https://repo.laslabs.com/projects/ODOO/repos/web/browse/web_widget_darkroom_example|in the LasLabs repo]] or [[https://github.com/laslabs/odoo-web/tree/release/9.0/web_widget_darkroom_example|on our GitHub mirror]].

    Known Issues/Roadmap

    • Plugins are not able to be added without inheriting, then redefining the widget in the registry due to JS inheritance. ** This is not scalable because there would need to be an explicit dependency chain in order to avoid registry overwrite.

    https://apps.openerp.com/apps/modules/9.0/web_widget_darkroom/

    in Tech Blog
    Hardening Ubuntu 14.04 Server

    Ontworpen voor bedrijven

    We zijn een team van gepassioneerde mensen met als doel levens te verbeteren met vernieuwende producten. We ontwikkelen geweldige oplossingen voor al je zakelijke uitdagingen. Onze producten zijn ontworpen voor kleine tot middelgrote bedrijven die hun prestaties willen optimaliseren.

    Neem contact op

    Plantexel
    Pedernera
    Salta Capital 
    Argentina

    • +31 653-919-302
    • [email protected]
    Volg ons
    Copyright © Plantexel
    Nederlands | English (US) | Español (AR)