Skip to content

Commit

Permalink
[FIX] dms: Improve search by model
Browse files Browse the repository at this point in the history
  • Loading branch information
etobella authored and kobros-tech committed Jan 13, 2025
1 parent edb42ac commit 555c005
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dms/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Document Management System
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e13f9a1fdae0da1ea90ed26eeb706cc156dbff2c4a6ff3c8ff60e78164c4c294
!! source digest: sha256:a0cce9518fc75017ba550bbfe7ac102af392bd5367a1da8362d7d17b3df143f5
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
2 changes: 1 addition & 1 deletion dms/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "Document Management System",
"summary": """Document Management System for Odoo""",
"version": "16.0.1.1.0",
"version": "16.0.1.1.1",
"category": "Document Management",
"license": "LGPL-3",
"website": "https://github.com/OCA/dms",
Expand Down
1 change: 1 addition & 0 deletions dms/i18n/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -1529,6 +1529,7 @@ msgstr "Migrationsstatus"

#. module: dms
#: model:ir.model.fields,field_description:dms.field_dms_directory__model_id
#: model:ir.model.fields,field_description:dms.field_dms_storage__model
msgid "Model"
msgstr "Modell"

Expand Down
1 change: 1 addition & 0 deletions dms/i18n/dms.pot
Original file line number Diff line number Diff line change
Expand Up @@ -1447,6 +1447,7 @@ msgstr ""

#. module: dms
#: model:ir.model.fields,field_description:dms.field_dms_directory__model_id
#: model:ir.model.fields,field_description:dms.field_dms_storage__model
msgid "Model"
msgstr ""

Expand Down
1 change: 1 addition & 0 deletions dms/i18n/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -1529,6 +1529,7 @@ msgstr "Estado de migración"

#. module: dms
#: model:ir.model.fields,field_description:dms.field_dms_directory__model_id
#: model:ir.model.fields,field_description:dms.field_dms_storage__model
msgid "Model"
msgstr "Modelo"

Expand Down
1 change: 1 addition & 0 deletions dms/i18n/fr.po
Original file line number Diff line number Diff line change
Expand Up @@ -1523,6 +1523,7 @@ msgstr "Etat de la migration"

#. module: dms
#: model:ir.model.fields,field_description:dms.field_dms_directory__model_id
#: model:ir.model.fields,field_description:dms.field_dms_storage__model
msgid "Model"
msgstr "Modèle"

Expand Down
1 change: 1 addition & 0 deletions dms/i18n/he_IL.po
Original file line number Diff line number Diff line change
Expand Up @@ -1462,6 +1462,7 @@ msgstr ""

#. module: dms
#: model:ir.model.fields,field_description:dms.field_dms_directory__model_id
#: model:ir.model.fields,field_description:dms.field_dms_storage__model
msgid "Model"
msgstr ""

Expand Down
1 change: 1 addition & 0 deletions dms/i18n/it.po
Original file line number Diff line number Diff line change
Expand Up @@ -1527,6 +1527,7 @@ msgstr "Stato migrazione"

#. module: dms
#: model:ir.model.fields,field_description:dms.field_dms_directory__model_id
#: model:ir.model.fields,field_description:dms.field_dms_storage__model
msgid "Model"
msgstr "Modello"

Expand Down
1 change: 1 addition & 0 deletions dms/i18n/nl.po
Original file line number Diff line number Diff line change
Expand Up @@ -1453,6 +1453,7 @@ msgstr ""

#. module: dms
#: model:ir.model.fields,field_description:dms.field_dms_directory__model_id
#: model:ir.model.fields,field_description:dms.field_dms_storage__model
msgid "Model"
msgstr ""

Expand Down
1 change: 1 addition & 0 deletions dms/i18n/pt_BR.po
Original file line number Diff line number Diff line change
Expand Up @@ -1524,6 +1524,7 @@ msgstr "Status da Migração"

#. module: dms
#: model:ir.model.fields,field_description:dms.field_dms_directory__model_id
#: model:ir.model.fields,field_description:dms.field_dms_storage__model
msgid "Model"
msgstr "Modelo"

Expand Down
1 change: 1 addition & 0 deletions dms/i18n/ru.po
Original file line number Diff line number Diff line change
Expand Up @@ -1452,6 +1452,7 @@ msgstr ""

#. module: dms
#: model:ir.model.fields,field_description:dms.field_dms_directory__model_id
#: model:ir.model.fields,field_description:dms.field_dms_storage__model
msgid "Model"
msgstr ""

Expand Down
5 changes: 5 additions & 0 deletions dms/models/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ class Storage(models.Model):
help="Indicate if directories and files auto-create in mail "
"composition process too",
)
model = fields.Char(search="_search_model", store=False)

def _search_model(self, operator, value):
allowed_items = self.env["ir.model"].sudo().search([("model", operator, value)])
return [("model_ids", "in", allowed_items.ids)]

@api.onchange("save_type")
def _onchange_save_type(self):
Expand Down
2 changes: 1 addition & 1 deletion dms/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ <h1 class="title">Document Management System</h1>
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:e13f9a1fdae0da1ea90ed26eeb706cc156dbff2c4a6ff3c8ff60e78164c4c294
!! source digest: sha256:a0cce9518fc75017ba550bbfe7ac102af392bd5367a1da8362d7d17b3df143f5
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/dms/tree/16.0/dms"><img alt="OCA/dms" src="https://img.shields.io/badge/github-OCA%2Fdms-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/dms-16-0/dms-16-0-dms"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/dms&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>DMS is a module for creating, managing and viewing document files directly
Expand Down

0 comments on commit 555c005

Please sign in to comment.