Giter Club home page Giter Club logo

Comments (5)

sbidoul avatar sbidoul commented on July 18, 2024

a lot of drawbacks

N'exagérons rien 😉

s/Folder/CmisFolder/ ?

openerp.addons.cmis is the one in connector-cims?

Questions regarding field properties:

  • backend_domain could be left for later, create_method is sufficient for now?
  • cmis_path may be not a field property at the beginning: this can be computed in the create method?
  • What's the purpose of cmis_object_type ?

from alfodoo.

lmignon avatar lmignon commented on July 18, 2024

s/Folder/CmisFolder/ ?

s/openerp.addons.cmis.fields.Folder/openerp.addons.cmis.fields.CmisFolder why not. CmisFolder was my first idea but the cmis prefix seems to be a redundant information since the field is defined under the openerp.addons.cmis namespace . But it's true that declaring a property xxx = fields.CmisFolder( removes any ambiguity when reading the code. -> 👍

openerp.addons.cmis is the one of connector-cmis?

Yes it is. Nevertheless IMO that's the right ns to provide the bases to integrate odoo with a cmis container. Here is the list of the addon names I imagine to provide the current functionalities.

  • cmis (bakend, fields, but no more dependency on connector)
  • cmis_alf (bakend extension for alfresco)
  • cmis_web (replaces web_cmis_viewer and provides all the cmis widgets)
  • cmis_web_alf (wdiget extensions for alfresco)
  • cmis_connector (could provide the specific functionalities that depend of the connector addon)
  • ....
  • backend_domain could be left for later, create_method is sufficient for now?

Why not but it's a safe way to remove the hard coded domain currently used by the widget. https://github.com/acsone/alfodoo/blob/9.0/web_cmis_viewer/static/src/js/web_cmis_viewer_widget.js#L349

*cmis_path may be not a field property at the beginning: this can be computed in the create method?

IMO the create method is to use in complex cases (when you need to provide specific cmis properties) . I imagine that the field will provide a default method that will create the folder as sub-folder of the cmis_path with a cm:name provided by the cmis_name_get method. The question with this default method is how can it be called by the web since it'ts not defined on the model itself. ( A specific controller?) In a first time we can declare the create_method as required. The advantage is that the method name will be available into the field description provided to the widget and callable on the model.

  • What's the purpose of cmis_object_type ?

A step too far... the purpose is to provide a parameter to specify a custom cmis type to create in place of cmis:folder

from alfodoo.

lmignon avatar lmignon commented on July 18, 2024

@sbidoul a basic implementation can be found here https://github.com/acsone/connector-cmis/blob/9.0-cmis-field.
The central piece is https://github.com/acsone/connector-cmis/blob/9.0-cmis-field/cmis/fields.py and you can see how it works in https://github.com/acsone/connector-cmis/blob/9.0-cmis-field/cmis/tests/models.py and https://github.com/acsone/connector-cmis/blob/9.0-cmis-field/cmis/tests/test_fields.py
At this stage the backend name is not stored in the field value. Indeed, IMO, we can avoid to store the backend_name into the field value since it"s always available on the field definition.

from alfodoo.

sbidoul avatar sbidoul commented on July 18, 2024

At this stage the backend name is not stored in the field value. Indeed, IMO, we can avoid to store the backend_name into the field value since it"s always available on the field definition.

Yes, it's simpler.

from alfodoo.

lmignon avatar lmignon commented on July 18, 2024

merged 5162a29

from alfodoo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.