TIP: You can type at any time to perform a new search.
DMS Field
dms_field · OCA/dms
- Repository
- OCA/dms · module folder · Try on Runboat
- Module version
- Category
- Uncategorized
- Folder size
- 1.28 MB
- License
- LGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/dms
- Last tracking update
- 2026-08-11 17:15:20
- Authors
- Odoo Community Association (OCA), Creu Blanca
- Maintainers
- Odoo Community Association (OCA), Creu Blanca
- Committers
- Enric Tobella, Víctor Martínez, Carlos Roca, CarlosRoca13, Weblate, OCA-git-bot, oca-ci, anusrinps96
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- dms_field_auto_classification, hr_dms_field
- Description
This addon creates a new kind of view and allows to define a folder related to a record.
Code Analysis ⓘ
Views touched (7)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
dms_directory_dms_tree_view |
dms.directory.dms_tree (in dms_field) | dms.directory | dms_list | New |
dms_storage_dms_tree_view |
dms.storage.dms_tree (in dms_field) | dms.storage | dms_list | New |
view_dms_access_groups_form |
dms_access.group.form | dms.access.group | form | Inherits dms.view_dms_access_groups_form |
view_dms_access_groups_tree |
dms_access_groups.tree | dms.access.group | tree | Inherits dms.view_dms_access_groups_tree |
view_dms_field_template_form |
dms.field.template | form | New | |
view_dms_field_template_tree |
dms.field.template | list | New | |
view_partner_form |
res.partner.form | res.partner | form | Inherits base.view_partner_form |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (8)
New fields (2)
-
company_idMany2one → res.companycomodel_name='res.company'compute='_compute_company_id'store=Truestring='Company' -
dms_field_refReferenceselection='_selection_reference_value'string='DMS field reference'
No public methods.
New fields (1)
-
parent_idMany2onedefault=<expr>
-
search_parents(self, domain=False, offset=0, limit=None, order=None, count=False)@api.modelThis method finds the top level elements of the hierarchy for a given search query. :param domain: a search domain <reference/orm/domains> (default: empty list) :param offset: the number of results to ignore (default: none) :param limit: maximum number of records to return (default: all) :param order: a string to define the sort order of the query (default: none) :param count: counts and returns the number of matching records (default: False) :returns: the top level elements for the given search query -
search_read_parents(self, domain=False, fields=None, offset=0, limit=None, order=None)@api.modelThis method finds the top level elements of the hierarchy for a given search query. :param domain: a search domain <reference/orm/domains> (default: empty list) :param fields: a list of fields to read (default: all fields of the model) :param offset: the number of results to ignore (default: none) :param limit: maximum number of records to return (default: all) :param order: a string to define the sort order of the query (default: none) :returns: the top level elements for the given search query
New fields (1)
-
dms_directory_idsOne2many → dms.directoryauto_join=Truedomain=<expr>string='DMS Directories' args: 'dms.directory', 'res_id'
-
create(self, vals_list)@api.model_create_multiCreate a dms directory when creating the record if exist a template. We need to avoid applying a template except when testing functionality with dms_field* modules to avoid the error that a directory with the same name already exists (example: create partner). -
models_to_track_dms_field_template(self)@api.modelModels to be tracked for dms field templates :args: :returns: list of models -
unlink(self)When deleting a record, we also delete the linked directories and the auto-generated access group. -
web_save(self, vals, specification, next_id=None)We need to intercept this method to avoid a dms.directory access error in some cases. Example: A user is modifying an employee field via UX but does NOT have access to the linked directory (due to the corresponding dms.access.group), even if the dms_directory_ids field were invisible, it would show a dms.directory access error when saving. The appropriate solution is usually to define a group for the dms_directory_ids field so that only users who have access to it can see it, but there is no specific group that allows us to know whether or not the user will have access to the directory, which is why this hack is done. -
write(self, vals)When modifying a record that has linked directories and changing the user_id field it is necessary to update the auto-generated access group (name and explicit_user_ids).
New fields (9)
-
company_idMany2one → res.companycomodel_name='res.company'index=Truestore=Truestring='Company' -
directory_format_nameChardefault='{{object.display_name}}'help='You can set expressions to be used for the directory name,\n e.g.: {{object.name}}'string='Directory format name' -
group_idsMany2many → dms.access.groupcomodel_name='dms.access.group'string='Groups' -
modelCharcompute='_compute_model'compute_sudo=Truestore=Truestring='Model name' -
model_idMany2one → ir.modelcomodel_name='ir.model'domain=[('transient', '=', False), ('model', '!=', 'dms.field.template')]index=Truestring='Model' -
nameCharrequired=True -
parent_directory_idMany2one → dms.directorycomodel_name='dms.directory'domain="[('storage_id', '=', storage_id)]"string='Parent directory' -
storage_idMany2one → dms.storagecomodel_name='dms.storage'domain=[('save_type', '!=', 'attachment')]string='Storage' -
user_field_idMany2one → ir.model.fieldscomodel_name='ir.model.fields'domain="[('model_id', '=', model_id),('relation', '=', 'res.users')]"string='User field'
-
create(self, vals_list)@api.model_create_multiCreate dms directory automatically in the creation in install mode. -
create_dms_directory(self)@api.modelAccording to the model, create the directory linked to that record and the subdirectories.
New fields (1)
-
field_template_idsOne2many → dms.field.templatecomodel_name='dms.field.template'inverse_name='storage_id'string='File templated ids'
-
get_js_tree_data(self)@api.model
New fields (1)
-
view_modeSelectionondelete={'dms_list': 'cascade'}selection_add=[('dms_list', 'DMS Tree')]
No public methods.
New fields (1)
-
typeSelectionselection_add=[('dms_list', 'DMS Tree')]
No public methods.
New fields (0)
No new fields.
Public methods (0)No public methods.
Loading…
Loading…
Loading…
Loading…
Loading…
- Status
- Open migration PR — not merged yet for this version
- CI status
- checks failing
- Open since
- 59 days ago
- Last activity
- 59 days ago
- Repository
- OCA/dms
- Pull request
- [19.0][MIG] dms_field: Migration to 19.0 (#486)