CMIS Field

This is the API documentation for new field defined by the addob cmis_field.

These classes are not intended for use by module developers.

class odoo.addons.cmis_field.fields.cmis_folder.CmisFolder(backend_name=None, string=None, **kwargs)[source]

Bases: odoo.fields.Field

A reference to a cmis:folder. (cmis:objectId)

Parameters:
  • backend_name – The attribute backend_name is mandatory if more than one backend id configured. Otherwize you must have configured one backend ir order to prevent errors when loading a view that includes this kind of field.
  • allow_create – Allow create from UI (by default True)
  • allow_delete – Allow delete from UI (by default False)
  • create_method – name of a method that create the field into the CMIS repository. The method must assign the field on all records of the invoked recordset. The method is called with the field definition instance and the bakend as paramaters (optional)
  • create_parent_get – name of a method that return the cmis:objectId of the folder to use as parent. The method is called with the field definition instance and the bakend as paramaters. (optional: by default the folder is created as child of backend.initial_directory_write + ‘/’ model._name)
  • create_name_get – name of a method that return the name of the folder to create into the CMIS repository. The method is called with the field definition instance and the bakend as paramaters. (optional: by default instance.name_get)
Return type:

dict

Returns:

a dictionay with an entry for each record of the invoked recordset with the following structure

{record.id: 'cmis:objectId'}

Return type:

dict

Returns:

a dictionay with an entry for each record of the invoked recordset with the following structure

{record.id: 'name'}

Parem create_properties_get:
 

name of a method that return a dictionary of CMIS properties ro use to create the folder. The method is called with the field definition instance and the bakend as paramaters (optional: default empty)

Return type:

dict

Returns:

a dictionay with an entry for each record of the invoked recordset with the following structure

{record.id: {'cmis:xxx': 'val1', ...}}

allow_create
allow_delete
backend_name
column_type = ('varchar', 'VARCHAR')
create_method
create_name_get
create_parent_get
create_properties_get
create_value(records)[source]

Create a new folder for each record into the cmis container and store the value as field value

description_attrs = [('allow_create', '_description_allow_create'), ('allow_delete', '_description_allow_delete'), ('backend', '_description_backend'), ('change_default', '_description_change_default'), ('company_dependent', '_description_company_dependent'), ('depends', '_description_depends'), ('deprecated', '_description_deprecated'), ('groups', '_description_groups'), ('help', '_description_help'), ('manual', '_description_manual'), ('readonly', '_description_readonly'), ('related', '_description_related'), ('required', '_description_required'), ('searchable', '_description_searchable'), ('sortable', '_description_sortable'), ('states', '_description_states'), ('store', '_description_store'), ('string', '_description_string')]
get_backend(env, raise_if_not_found=True)[source]
get_cmis_object(record)[source]

Returns an instance of cmislib.browser.binding.BrowserFolder This instance is a proxy object that can be used to perform action on the folder into the cmis container :param record:

get_create_names(records, backend)[source]

return the names of the folders to create into the CMIS repository for the given recordset. :rtype: dict :return: a dictionay with an entry for each record with the following structure

{record.id: 'name'}
get_create_parents(records, backend)[source]

return the cmis:objectId of the cmis folder to use as parent of the new folder. :rtype: dict :return: a dictionay with an entry for each record with the following structure

{record.id: 'cmis:objectId'}
get_create_properties(records, backend)[source]

Return the properties to use to created the folder into the CMIS container. :rtype: dict :return: a dictionay with an entry for each record with the following structure

{record.id: {'cmis:xxx': 'val1', ...}}
get_default_parent_path_parts(records, backend)[source]

Return the default path parts into the cmis container to use as parent on folder create. By default: backend.initial_directory_write / record._name

related_attrs = [('comodel_name', '_related_comodel_name'), ('group_operator', '_related_group_operator'), ('groups', '_related_groups'), ('help', '_related_help'), ('readonly', '_related_readonly'), ('string', '_related_string')]
type = 'cmis_folder'