odoo-addon-dms 15.0.1.5.1.1__py3-none-any.whl → 15.0.1.6.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- odoo/addons/dms/__manifest__.py +1 -1
- odoo/addons/dms/models/abstract_dms_mixin.py +15 -1
- odoo/addons/dms/models/directory.py +17 -5
- odoo/addons/dms/models/dms_security_mixin.py +4 -1
- odoo/addons/dms/views/directory.xml +2 -2
- {odoo_addon_dms-15.0.1.5.1.1.dist-info → odoo_addon_dms-15.0.1.6.0.dist-info}/METADATA +1 -1
- {odoo_addon_dms-15.0.1.5.1.1.dist-info → odoo_addon_dms-15.0.1.6.0.dist-info}/RECORD +9 -9
- {odoo_addon_dms-15.0.1.5.1.1.dist-info → odoo_addon_dms-15.0.1.6.0.dist-info}/WHEEL +0 -0
- {odoo_addon_dms-15.0.1.5.1.1.dist-info → odoo_addon_dms-15.0.1.6.0.dist-info}/top_level.txt +0 -0
odoo/addons/dms/__manifest__.py
CHANGED
|
@@ -37,7 +37,21 @@ class AbstractDmsMixin(models.AbstractModel):
|
|
|
37
37
|
@api.model
|
|
38
38
|
def search_panel_select_range(self, field_name, **kwargs):
|
|
39
39
|
"""Add context to display short folder name."""
|
|
40
|
-
_self = self.with_context(
|
|
40
|
+
_self = self.with_context(
|
|
41
|
+
directory_short_name=True, skip_sanitized_parent_hierarchy=True
|
|
42
|
+
)
|
|
41
43
|
return super(AbstractDmsMixin, _self).search_panel_select_range(
|
|
42
44
|
field_name, **kwargs
|
|
43
45
|
)
|
|
46
|
+
|
|
47
|
+
def _search_panel_sanitized_parent_hierarchy(self, records, parent_name, ids):
|
|
48
|
+
if self.env.context.get("skip_sanitized_parent_hierarchy"):
|
|
49
|
+
all_ids = [value["id"] for value in records]
|
|
50
|
+
# Prevent error if user not access to parent record
|
|
51
|
+
for value in records:
|
|
52
|
+
if value["parent_id"] and value["parent_id"][0] not in all_ids:
|
|
53
|
+
value["parent_id"] = False
|
|
54
|
+
return records
|
|
55
|
+
return super()._search_panel_sanitized_parent_hierarchy(
|
|
56
|
+
records=records, parent_name=parent_name, ids=ids
|
|
57
|
+
)
|
|
@@ -258,7 +258,15 @@ class DmsDirectory(models.Model):
|
|
|
258
258
|
current_directory = self
|
|
259
259
|
while current_directory:
|
|
260
260
|
directories.insert(0, current_directory)
|
|
261
|
-
if
|
|
261
|
+
if (
|
|
262
|
+
(
|
|
263
|
+
access_token
|
|
264
|
+
and current_directory.access_token
|
|
265
|
+
and consteq(current_directory.access_token, access_token)
|
|
266
|
+
)
|
|
267
|
+
or not access_token
|
|
268
|
+
and current_directory.check_access_rights("read")
|
|
269
|
+
):
|
|
262
270
|
return directories
|
|
263
271
|
current_directory = current_directory.parent_id
|
|
264
272
|
if access_token:
|
|
@@ -267,11 +275,15 @@ class DmsDirectory(models.Model):
|
|
|
267
275
|
return directories
|
|
268
276
|
|
|
269
277
|
def _get_own_root_directories(self):
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
.search([("is_hidden", "=", False), ("parent_id", "=", False)])
|
|
273
|
-
.ids
|
|
278
|
+
res = self.env["dms.directory"].search_read(
|
|
279
|
+
[("is_hidden", "=", False)], ["parent_id"]
|
|
274
280
|
)
|
|
281
|
+
all_ids = [value["id"] for value in res]
|
|
282
|
+
res_ids = []
|
|
283
|
+
for item in res:
|
|
284
|
+
if not item["parent_id"] or item["parent_id"][0] not in all_ids:
|
|
285
|
+
res_ids.append(item["id"])
|
|
286
|
+
return res_ids
|
|
275
287
|
|
|
276
288
|
allowed_model_ids = fields.Many2many(
|
|
277
289
|
related="storage_id.model_ids",
|
|
@@ -102,7 +102,10 @@ class DmsSecurityMixin(models.AbstractModel):
|
|
|
102
102
|
self._directory_field,
|
|
103
103
|
inherited_access_field,
|
|
104
104
|
)
|
|
105
|
-
inherited_access_domain = [
|
|
105
|
+
inherited_access_domain = [
|
|
106
|
+
("storage_id_save_type", "=", "attachment"),
|
|
107
|
+
(inherited_access_field, "=", True),
|
|
108
|
+
]
|
|
106
109
|
domains = []
|
|
107
110
|
# Get all used related records
|
|
108
111
|
related_groups = self.sudo().read_group(
|
|
@@ -562,7 +562,7 @@
|
|
|
562
562
|
</page>
|
|
563
563
|
<page
|
|
564
564
|
string="Groups"
|
|
565
|
-
attrs="{'invisible':[('storage_id_inherit_access_from_parent_record', '=', True)]}"
|
|
565
|
+
attrs="{'invisible':[('storage_id_save_type', '=', 'attachment'),('storage_id_inherit_access_from_parent_record', '=', True)]}"
|
|
566
566
|
>
|
|
567
567
|
<field name="group_ids">
|
|
568
568
|
<tree>
|
|
@@ -575,7 +575,7 @@
|
|
|
575
575
|
</page>
|
|
576
576
|
<page
|
|
577
577
|
string="Complete Groups"
|
|
578
|
-
attrs="{'invisible':[('storage_id_inherit_access_from_parent_record', '=', True)]}"
|
|
578
|
+
attrs="{'invisible':[('storage_id_save_type', '=', 'attachment'),('storage_id_inherit_access_from_parent_record', '=', True)]}"
|
|
579
579
|
>
|
|
580
580
|
<field name="complete_group_ids">
|
|
581
581
|
<tree>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
odoo/addons/dms/README.rst,sha256=_NGbhYqeNMZkhpfkaClLUvJziBcuiQ_GdKC9YwNELA4,6906
|
|
2
2
|
odoo/addons/dms/__init__.py,sha256=jQ-fltIs1ohXt7udDkkJwzh7ckauQW2rbmv1Wtg3SjQ,47
|
|
3
|
-
odoo/addons/dms/__manifest__.py,sha256=
|
|
3
|
+
odoo/addons/dms/__manifest__.py,sha256=0ODOhdog_hdrI9k_xf651VMoZac5v5xc_9uBHuUoviE,2130
|
|
4
4
|
odoo/addons/dms/actions/file.xml,sha256=NlRIQoCbbDSaRmsumJP9dcrNtYpQji74hwhfi5TillE,524
|
|
5
5
|
odoo/addons/dms/controllers/__init__.py,sha256=akfNDwFGryweTYowOA3DbbP0zvLmQtCdihtGhYvsIPQ,40
|
|
6
6
|
odoo/addons/dms/controllers/main.py,sha256=3HvKTk8OiFPiqkKN952Ozy-9NmtpLnaYsguL-VSmicY,1902
|
|
@@ -21,13 +21,13 @@ odoo/addons/dms/i18n/it.po,sha256=ejaH7lZYmrLE_eq-mI7MdBIAGqOIYJEpgCg5jDb6FTQ,68
|
|
|
21
21
|
odoo/addons/dms/i18n/nl.po,sha256=XHKL8-miSI44Spuq3LfP6R7V50NzEOcqsC5jPdkbOGA,67836
|
|
22
22
|
odoo/addons/dms/i18n/ru.po,sha256=vsojqbV4yeGnl3lzEb5DDrVeU0OD9SnWFXReocZL0VU,67666
|
|
23
23
|
odoo/addons/dms/models/__init__.py,sha256=La9Zyaj_PZKuwp73-PAlyFwgZlK8skeYxl5LovFjTm8,371
|
|
24
|
-
odoo/addons/dms/models/abstract_dms_mixin.py,sha256=
|
|
24
|
+
odoo/addons/dms/models/abstract_dms_mixin.py,sha256=1cKd4uJE9MCop4GYaHLwpDyvLaLLGLewGkpPTFgDcv0,2080
|
|
25
25
|
odoo/addons/dms/models/access_groups.py,sha256=nwIRYs48rG4Gc1M65aYcNtzUDljTa0KSCyUsHPxB8ig,5482
|
|
26
26
|
odoo/addons/dms/models/base.py,sha256=h6hYw7C_OwbP9xih1Cw6v0lOWypEk1pocc0q2gLHaYA,599
|
|
27
27
|
odoo/addons/dms/models/category.py,sha256=goe3tZbwDXtlxrwGB0_sGMJW7RkJh3MtTBe4YvYokbI,4110
|
|
28
|
-
odoo/addons/dms/models/directory.py,sha256=
|
|
28
|
+
odoo/addons/dms/models/directory.py,sha256=TGRdrUNeL4_uBZsy94NPD_pslBBGRWJgcs_fIw-nDZ4,26375
|
|
29
29
|
odoo/addons/dms/models/dms_file.py,sha256=hOGDPDM2c83us0csug30Iu6OkVtdrFIFwe3i6Sophcc,21385
|
|
30
|
-
odoo/addons/dms/models/dms_security_mixin.py,sha256=
|
|
30
|
+
odoo/addons/dms/models/dms_security_mixin.py,sha256=GwanqRbJfFYgQhQwvp17f6V1AVzXktjGm_xDRpF6h0w,9703
|
|
31
31
|
odoo/addons/dms/models/ir_attachment.py,sha256=-AwkedqL2cgPZ794O31UIMvchrf_a9TPVE1rEb--CXQ,3248
|
|
32
32
|
odoo/addons/dms/models/mail_thread.py,sha256=ccAn2MHONCncjsJewBrLqMVBl6tmn2kezyJVJq2utVk,583
|
|
33
33
|
odoo/addons/dms/models/mixins_thumbnail.py,sha256=DCb8wrWTjdQp2ev9SfYHe9LLZuC18c5jSftm2Er9Aho,1466
|
|
@@ -180,7 +180,7 @@ odoo/addons/dms/tests/data/mail02.eml,sha256=QDbZu4Xne3-VgntqqDBviBcSB4Y8Cgn_I8O
|
|
|
180
180
|
odoo/addons/dms/tools/__init__.py,sha256=X0El9WW-bmLhnUpcS_csCs0TR1RcxaQg36Dy8wyg_vI,19
|
|
181
181
|
odoo/addons/dms/tools/file.py,sha256=NYgdhsu1qdcLfMInmzhMs-PzDKmFm3wuo9kx610mSJs,1488
|
|
182
182
|
odoo/addons/dms/views/category.xml,sha256=fjes6BqnZpcB8IJhZliZP4C7HqjJHlRVqRo4mvlEt38,4434
|
|
183
|
-
odoo/addons/dms/views/directory.xml,sha256=
|
|
183
|
+
odoo/addons/dms/views/directory.xml,sha256=QSfsvI3d1hOX4RfMAGDNe4LAqxQkNf67BiP6xiQRXgc,34735
|
|
184
184
|
odoo/addons/dms/views/dms_access_groups_views.xml,sha256=vVeq7iGl7YfT1GKVGsulwOdPc6z3xS51hsRXfR2hR7w,5427
|
|
185
185
|
odoo/addons/dms/views/dms_file.xml,sha256=VoK4dkpTI335AjyaGOGRDGidlTEorqIafwnELevsrhI,29957
|
|
186
186
|
odoo/addons/dms/views/dms_portal_templates.xml,sha256=piujeenSeFNfeQzME_wphQ16Heg2AFmWtBnLO_yv3Z0,5638
|
|
@@ -188,7 +188,7 @@ odoo/addons/dms/views/menu.xml,sha256=YJxLfNpa7HqM5rj09kXGUeernJp9sSTA_mDICKvIs9
|
|
|
188
188
|
odoo/addons/dms/views/res_config_settings.xml,sha256=TMRNYnFW1U5Az5hqxIbkqIiaRaIzN7iGZO0M0TMu-Qk,5175
|
|
189
189
|
odoo/addons/dms/views/storage.xml,sha256=8WL4JZYzq1ngI6S_X7xSRuMSOykwk1br22Df0vm5W2Y,10448
|
|
190
190
|
odoo/addons/dms/views/tag.xml,sha256=A1-WfRlN5TumsEdIEUwx7G2RpX7iHV37ztKxGABLvi0,7186
|
|
191
|
-
odoo_addon_dms-15.0.1.
|
|
192
|
-
odoo_addon_dms-15.0.1.
|
|
193
|
-
odoo_addon_dms-15.0.1.
|
|
194
|
-
odoo_addon_dms-15.0.1.
|
|
191
|
+
odoo_addon_dms-15.0.1.6.0.dist-info/METADATA,sha256=8ciAjTRUw0WnSonBLEsCjgaeBiT0CDSNeMvzdYo3ixE,7576
|
|
192
|
+
odoo_addon_dms-15.0.1.6.0.dist-info/WHEEL,sha256=2wepM1nk4DS4eFpYrW1TTqPcoGNfHhhO_i5m4cOimbo,92
|
|
193
|
+
odoo_addon_dms-15.0.1.6.0.dist-info/top_level.txt,sha256=qBj40grFkGOfDZ2WDSw3y1RnDlgG0u8rP8pvGNdbz4w,5
|
|
194
|
+
odoo_addon_dms-15.0.1.6.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|