Skip to content

Commit 67af352

Browse files
[MIG] document_url: Migration to 19.0
1 parent 75d9527 commit 67af352

File tree

6 files changed

+303
-40
lines changed

6 files changed

+303
-40
lines changed

document_url/README.rst

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
.. image:: https://odoo-community.org/readme-banner-image
2+
:target: https://odoo-community.org/get-involved?utm_source=readme
3+
:alt: Odoo Community Association
4+
15
==============
26
URL attachment
37
==============
@@ -13,17 +17,17 @@ URL attachment
1317
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
1418
:target: https://odoo-community.org/page/development-status
1519
:alt: Beta
16-
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
20+
.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png
1721
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1822
:alt: License: AGPL-3
1923
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fknowledge-lightgray.png?logo=github
20-
:target: https://github.com/OCA/knowledge/tree/18.0/document_url
24+
:target: https://github.com/OCA/knowledge/tree/19.0/document_url
2125
:alt: OCA/knowledge
2226
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/knowledge-18-0/knowledge-18-0-document_url
27+
:target: https://translation.odoo-community.org/projects/knowledge-19-0/knowledge-19-0-document_url
2428
:alt: Translate me on Weblate
2529
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/knowledge&target_branch=18.0
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/knowledge&target_branch=19.0
2731
:alt: Try me on Runboat
2832

2933
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -54,7 +58,7 @@ Bug Tracker
5458
Bugs are tracked on `GitHub Issues <https://github.com/OCA/knowledge/issues>`_.
5559
In case of trouble, please check there if your issue has already been reported.
5660
If you spotted it first, help us to smash it by providing a detailed and welcomed
57-
`feedback <https://github.com/OCA/knowledge/issues/new?body=module:%20document_url%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
61+
`feedback <https://github.com/OCA/knowledge/issues/new?body=module:%20document_url%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
5862

5963
Do not contact contributors directly about support or help with technical issues.
6064

@@ -95,6 +99,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
9599
mission is to support the collaborative development of Odoo features and
96100
promote its widespread use.
97101

98-
This module is part of the `OCA/knowledge <https://github.com/OCA/knowledge/tree/18.0/document_url>`_ project on GitHub.
102+
This module is part of the `OCA/knowledge <https://github.com/OCA/knowledge/tree/19.0/document_url>`_ project on GitHub.
99103

100104
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

document_url/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Copyright 2020 Tecnativa - Manuel Calero
33
{
44
"name": "URL attachment",
5-
"version": "18.0.1.0.0",
5+
"version": "19.0.1.0.0",
66
"category": "Tools",
77
"author": "Tecnativa, Odoo Community Association (OCA)",
88
"website": "https://github.com/OCA/knowledge",

document_url/static/description/index.html

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
55
<meta name="generator" content="Docutils: https://docutils.sourceforge.io/" />
6-
<title>URL attachment</title>
6+
<title>README.rst</title>
77
<style type="text/css">
88

99
/*
@@ -360,16 +360,21 @@
360360
</style>
361361
</head>
362362
<body>
363-
<div class="document" id="url-attachment">
364-
<h1 class="title">URL attachment</h1>
363+
<div class="document">
365364

365+
366+
<a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
367+
<img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
368+
</a>
369+
<div class="section" id="url-attachment">
370+
<h1>URL attachment</h1>
366371
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
367372
!! This file is generated by oca-gen-addon-readme !!
368373
!! changes will be overwritten. !!
369374
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370375
!! source digest: sha256:8ed037012bcf490a1ebf24d0315e26fe25b0d7ae2cb864dc18ca8b4eb875b218
371376
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
372-
<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/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/knowledge/tree/18.0/document_url"><img alt="OCA/knowledge" src="https://img.shields.io/badge/github-OCA%2Fknowledge-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/knowledge-18-0/knowledge-18-0-document_url"><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/knowledge&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
377+
<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/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/knowledge/tree/19.0/document_url"><img alt="OCA/knowledge" src="https://img.shields.io/badge/github-OCA%2Fknowledge-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/knowledge-19-0/knowledge-19-0-document_url"><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/knowledge&amp;target_branch=19.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373378
<p>Module that allows to attach an URL as a document.</p>
374379
<p><strong>Table of contents</strong></p>
375380
<div class="contents local topic" id="contents">
@@ -385,7 +390,7 @@ <h1 class="title">URL attachment</h1>
385390
</ul>
386391
</div>
387392
<div class="section" id="usage">
388-
<h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
393+
<h2><a class="toc-backref" href="#toc-entry-1">Usage</a></h2>
389394
<p>To use this module, you need to:</p>
390395
<ol class="arabic simple">
391396
<li>Open the form view of an object (Example: Customer Invoice
@@ -398,23 +403,23 @@ <h1><a class="toc-backref" href="#toc-entry-1">Usage</a></h1>
398403
</ol>
399404
</div>
400405
<div class="section" id="bug-tracker">
401-
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
406+
<h2><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h2>
402407
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/knowledge/issues">GitHub Issues</a>.
403408
In case of trouble, please check there if your issue has already been reported.
404409
If you spotted it first, help us to smash it by providing a detailed and welcomed
405-
<a class="reference external" href="https://github.com/OCA/knowledge/issues/new?body=module:%20document_url%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
410+
<a class="reference external" href="https://github.com/OCA/knowledge/issues/new?body=module:%20document_url%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
406411
<p>Do not contact contributors directly about support or help with technical issues.</p>
407412
</div>
408413
<div class="section" id="credits">
409-
<h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
414+
<h2><a class="toc-backref" href="#toc-entry-3">Credits</a></h2>
410415
<div class="section" id="authors">
411-
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
416+
<h3><a class="toc-backref" href="#toc-entry-4">Authors</a></h3>
412417
<ul class="simple">
413418
<li>Tecnativa</li>
414419
</ul>
415420
</div>
416421
<div class="section" id="contributors">
417-
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
422+
<h3><a class="toc-backref" href="#toc-entry-5">Contributors</a></h3>
418423
<ul class="simple">
419424
<li>Jonathan Nemry &lt;<a class="reference external" href="mailto:jonathan.nemry&#64;acsone.eu">jonathan.nemry&#64;acsone.eu</a>&gt;</li>
420425
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
@@ -432,18 +437,19 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
432437
</ul>
433438
</div>
434439
<div class="section" id="maintainers">
435-
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
440+
<h3><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h3>
436441
<p>This module is maintained by the OCA.</p>
437442
<a class="reference external image-reference" href="https://odoo-community.org">
438443
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
439444
</a>
440445
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
441446
mission is to support the collaborative development of Odoo features and
442447
promote its widespread use.</p>
443-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/knowledge/tree/18.0/document_url">OCA/knowledge</a> project on GitHub.</p>
448+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/knowledge/tree/19.0/document_url">OCA/knowledge</a> project on GitHub.</p>
444449
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
445450
</div>
446451
</div>
447452
</div>
453+
</div>
448454
</body>
449455
</html>
Lines changed: 212 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,214 @@
1-
.o_image.o_Attachment_url_ico {
2-
background-image: none;
3-
i {
4-
display: block;
5-
text-align: center;
6-
line-height: revert;
1+
.o-mail-AttachmentContainer.o_attachment_url_container {
2+
width: auto !important;
3+
height: 36px !important;
4+
min-width: 100px;
5+
max-width: 200px;
6+
7+
background: linear-gradient(135deg, #e8e9ed 0%, #dfe1e6 100%);
8+
border: 1.5px solid rgba(0, 0, 0, 0.1);
9+
border-radius: 8px;
10+
margin-right: 10px;
11+
margin-bottom: 10px;
12+
padding: 0 10px;
13+
overflow: hidden;
14+
position: relative;
15+
display: inline-flex !important;
16+
align-items: center;
17+
18+
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
19+
20+
transition: all 0.2s ease;
21+
22+
&:hover {
23+
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
24+
border-color: rgba(0, 0, 0, 0.15);
25+
}
26+
27+
.o_attachment_url_chip {
28+
padding: 0;
29+
gap: 8px;
30+
height: 100%;
31+
width: 100%;
32+
position: relative;
33+
z-index: 1;
34+
}
35+
}
36+
37+
.o_attachment_url_link_icon {
38+
display: inline-flex;
39+
align-items: center;
40+
padding: 0;
41+
margin: 0;
42+
text-decoration: none;
43+
cursor: pointer;
44+
pointer-events: auto;
45+
46+
&:hover {
47+
text-decoration: none;
48+
}
49+
}
50+
51+
.o_attachment_url_icon {
52+
font-size: 1.25em;
53+
color: #71639e;
54+
margin: 0;
55+
transition: all 0.2s ease;
56+
cursor: pointer;
57+
58+
.o_attachment_url_link_icon:hover & {
59+
color: #5a4d7a;
60+
transform: scale(1.15);
61+
}
62+
}
63+
64+
.o_attachment_url_chip span {
65+
font-size: 0.875rem;
66+
font-weight: 500;
67+
letter-spacing: -0.01em;
68+
color: #4a5568;
69+
cursor: default;
70+
pointer-events: none;
71+
user-select: text;
72+
}
73+
74+
.o_attachment_url_delete {
75+
padding: 4px 6px;
76+
font-size: 1.1em;
77+
opacity: 0.6;
78+
color: #64748b;
79+
border-left: 1px solid rgba(0, 0, 0, 0.1);
80+
margin-left: 8px;
81+
padding-left: 8px;
82+
transition: all 0.2s ease;
83+
flex-shrink: 0;
84+
cursor: pointer;
85+
86+
&:hover {
87+
opacity: 1;
88+
color: #ef4444;
89+
transform: scale(1.1);
90+
}
91+
92+
&:active {
93+
transform: scale(0.9);
94+
}
95+
}
96+
97+
.o_attachment_url_container.url-theme-blue {
98+
background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
99+
border-color: rgba(59, 130, 246, 0.2);
100+
101+
&:hover {
102+
border-color: rgba(59, 130, 246, 0.35);
103+
}
104+
105+
.o_attachment_url_icon {
106+
color: #3b82f6;
107+
}
108+
109+
.o_attachment_url_link_icon:hover .o_attachment_url_icon {
110+
color: #2563eb;
111+
}
112+
}
113+
114+
.o_attachment_url_container.url-theme-green {
115+
background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
116+
border-color: rgba(34, 197, 94, 0.2);
117+
118+
&:hover {
119+
border-color: rgba(34, 197, 94, 0.35);
120+
}
121+
122+
.o_attachment_url_icon {
123+
color: #22c55e;
124+
}
125+
126+
.o_attachment_url_link_icon:hover .o_attachment_url_icon {
127+
color: #16a34a;
128+
}
129+
}
130+
131+
.o-mail-AttachmentBox {
132+
.o-mail-AttachmentList {
133+
display: flex;
134+
flex-wrap: wrap;
135+
align-items: flex-start;
136+
gap: 0;
137+
}
138+
}
139+
140+
.o-mail-AttachmentContainer {
141+
vertical-align: top;
142+
143+
&.o_attachment_url_container {
144+
align-self: flex-start;
145+
}
146+
}
147+
148+
@media (prefers-color-scheme: dark) {
149+
.o_attachment_url_container {
150+
background: linear-gradient(
151+
135deg,
152+
rgba(30, 41, 59, 0.95),
153+
rgba(30, 41, 59, 0.85)
154+
);
155+
border-color: rgba(148, 163, 184, 0.2);
156+
157+
&:hover {
158+
border-color: rgba(148, 163, 184, 0.35);
159+
}
160+
}
161+
162+
.o_attachment_url_chip a {
163+
color: #e2e8f0;
164+
165+
&:hover {
166+
background: linear-gradient(
167+
135deg,
168+
rgba(113, 99, 158, 0.15),
169+
rgba(113, 99, 158, 0.1)
170+
);
171+
}
172+
}
173+
174+
.o_attachment_url_chip span {
175+
color: #e2e8f0;
176+
}
177+
178+
.o_attachment_url_delete {
179+
color: #94a3b8;
180+
border-left-color: rgba(255, 255, 255, 0.1);
181+
}
182+
}
183+
184+
@keyframes slideInScale {
185+
0% {
186+
opacity: 0;
187+
transform: translateY(10px) scale(0.95);
188+
}
189+
100% {
190+
opacity: 1;
191+
transform: translateY(0) scale(1);
192+
}
193+
}
194+
195+
.o_attachment_url_container {
196+
animation: slideInScale 0.3s cubic-bezier(0.4, 0, 0.2, 1);
197+
}
198+
199+
@media (max-width: 768px) {
200+
.o_attachment_url_container {
201+
max-width: 240px;
202+
min-width: 100px;
203+
}
204+
205+
.o_attachment_url_chip a,
206+
.o_attachment_url_delete {
207+
padding: 8px 10px;
208+
min-height: 40px;
209+
}
210+
211+
.o_attachment_url_icon {
212+
font-size: 1.1em;
7213
}
8214
}

0 commit comments

Comments
 (0)