Skip to content

Commit a3ebf26

Browse files
committed
[IMP] dms: Show Upload button in the file kanban view only if it is allowed to create
TT50055 [BOT] post-merge updates [BOT] post-merge updates
1 parent 32fe05a commit a3ebf26

File tree

4 files changed

+28
-26
lines changed

4 files changed

+28
-26
lines changed

dms/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Document Management System
77
!! This file is generated by oca-gen-addon-readme !!
88
!! changes will be overwritten. !!
99
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10-
!! source digest: sha256:6a314d55775609f48d0cd0a6da9c801d0eb48b481cc2fe12105fcc4c57c73fe2
10+
!! source digest: sha256:a80857552a72c549c1408dee6bba18376f617070f6175b601833510cb99d8e4f
1111
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1212
1313
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png

dms/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{
66
"name": "Document Management System",
77
"summary": """Document Management System for Odoo""",
8-
"version": "17.0.1.1.0",
8+
"version": "17.0.1.2.0",
99
"category": "Document Management",
1010
"license": "LGPL-3",
1111
"website": "https://github.com/OCA/dms",

dms/static/description/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ <h1 class="title">Document Management System</h1>
367367
!! This file is generated by oca-gen-addon-readme !!
368368
!! changes will be overwritten. !!
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370-
!! source digest: sha256:6a314d55775609f48d0cd0a6da9c801d0eb48b481cc2fe12105fcc4c57c73fe2
370+
!! source digest: sha256:a80857552a72c549c1408dee6bba18376f617070f6175b601833510cb99d8e4f
371371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372372
<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/17.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-17-0/dms-17-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=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373373
<p>DMS is a module for creating, managing and viewing document files

dms/static/src/js/views/file_kanban_renderer.xml

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -22,29 +22,31 @@
2222
t-inherit-mode="primary"
2323
>
2424
<xpath expr="//div" position="inside">
25-
<button
26-
type="button"
27-
class="d-inline d-md-none btn btn-primary mx-1"
28-
t-on-click.prevent="uploadDocument"
29-
>
30-
Scan
31-
</button>
32-
<input
33-
type="file"
34-
name="ufile"
35-
class="d-none"
36-
t-ref="fileInput"
37-
multiple="1"
38-
accept="*"
39-
t-on-change="onChangeFileInput"
40-
/>
41-
<button
42-
type="button"
43-
class="d-none d-md-inline btn btn-primary mx-1"
44-
t-on-click.prevent="uploadDocument"
45-
>
46-
Upload
47-
</button>
25+
<t t-if="props.archInfo.activeActions.create">
26+
<button
27+
type="button"
28+
class="d-inline d-md-none btn btn-primary mx-1"
29+
t-on-click.prevent="uploadDocument"
30+
>
31+
Scan
32+
</button>
33+
<input
34+
type="file"
35+
name="ufile"
36+
class="d-none"
37+
t-ref="fileInput"
38+
multiple="1"
39+
accept="*"
40+
t-on-change="onChangeFileInput"
41+
/>
42+
<button
43+
type="button"
44+
class="d-none d-md-inline btn btn-primary mx-1"
45+
t-on-click.prevent="uploadDocument"
46+
>
47+
Upload
48+
</button>
49+
</t>
4850
</xpath>
4951
</t>
5052
</templates>

0 commit comments

Comments
 (0)