Skip to content

Commit 664db68

Browse files
committed
docs(server_config_environment): regenerate README and update metadata
- Replace GPL-3 license badge with AGPL-3 - Add maturity status badge (Beta) - Include GitHub repository link badge - Restructure README content with table of contents - Add bug tracker and credits sections - Update static description HTML accordingly - Modify config environment key lookup to prioritize 'running_env' over 'environment' - Generate separate files for DESCRIPTION, CONTRIBUTORS and USAGE readme sections
1 parent d649f1a commit 664db68

File tree

7 files changed

+100
-37
lines changed

7 files changed

+100
-37
lines changed
Lines changed: 48 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,60 @@
1-
.. image:: https://img.shields.io/badge/licence-GPL--3-blue.svg
2-
:target: http://www.gnu.org/licenses/gpl-3.0-standalone.html
3-
:alt: License: GPL-3
4-
5-
61
==================
72
Config Environment
83
==================
94

5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:1b0e2a405cd6bb133ee19a198cb252f1efe3d3848420c6b843846e07cfc1c2cf
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-Mint--System%2FMint--System-lightgray.png?logo=github
20+
:target: https://github.com/Mint-System/Mint-System/tree/18.0/server_config_environment
21+
:alt: Mint-System/Mint-System
22+
23+
|badge1| |badge2| |badge3|
24+
1025
Define environments for server configurations.
1126

12-
For a detailed documentation have a look at https://www.odoo-wiki.org/server-config-environment.html
27+
**Table of contents**
28+
29+
.. contents::
30+
:local:
31+
32+
Bug Tracker
33+
===========
34+
35+
Bugs are tracked on `GitHub Issues <https://github.com/Mint-System/Mint-System/issues>`_.
36+
In case of trouble, please check there if your issue has already been reported.
37+
If you spotted it first, help us to smash it by providing a detailed and welcomed
38+
`feedback <https://github.com/Mint-System/Mint-System/issues/new?body=module:%20server_config_environment%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
39+
40+
Do not contact contributors directly about support or help with technical issues.
41+
42+
Credits
43+
=======
44+
45+
Authors
46+
~~~~~~~
1347

14-
Configuration
15-
~~~~~~~~~~~~~
48+
* Mint System GmbH
1649

17-
* No additional configurations needed
50+
Contributors
51+
~~~~~~~~~~~~
1852

19-
Maintainer
20-
~~~~~~~~~~
53+
* Janik von Rotz <login@janikvonrotz.ch>
2154

22-
.. image:: https://raw.githubusercontent.com/Mint-System/Wiki/main/attachments/mint-system-logo.png
23-
:target: https://www.mint-system.ch
55+
Maintainers
56+
~~~~~~~~~~~
2457

25-
This module is maintained by Mint System GmbH.
58+
This module is part of the `Mint-System/Mint-System <https://github.com/Mint-System/Mint-System/tree/18.0/server_config_environment>`_ project on GitHub.
2659

27-
For support and more information, please visit `our Website <https://www.mint-system.ch>`__.
60+
You are welcome to contribute.

server_config_environment/models/server_config_environment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class ServerConfigEnvironment(models.Model):
1919

2020
def _compute_is_active(self):
2121
for rec in self:
22-
config_environment = config.get("environment")
22+
config_environment = config.get("running_env", False) or config.get("environment", False)
2323
if config_environment and (rec.name == config_environment or rec.key == config_environment):
2424
rec.is_active = True
2525
else:
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* Janik von Rotz <login@janikvonrotz.ch>
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Define environments for server configurations.

server_config_environment/readme/USAGE.rst

Whitespace-only changes.

server_config_environment/static/description/index.html

Lines changed: 48 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<meta charset="utf-8" />
55
<meta name="generator" content="Docutils 0.22.2: https://docutils.sourceforge.io/" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
7-
<title>README.rst</title>
7+
<title>Config Environment</title>
88
<style type="text/css">
99

1010
/* Minimal style sheet for the HTML output of Docutils. */
@@ -618,30 +618,57 @@
618618

619619
</style>
620620
</head>
621-
<body>
622-
<main>
623-
624-
625-
<a class="reference external image-reference" href="http://www.gnu.org/licenses/gpl-3.0-standalone.html">
626-
<img alt="License: GPL-3" src="https://img.shields.io/badge/licence-GPL--3-blue.svg" />
627-
</a>
628-
<section id="config-environment">
629-
<h2>Config Environment</h2>
621+
<body class="with-toc">
622+
<main id="config-environment">
623+
<h1 class="title">Config Environment</h1>
624+
625+
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
626+
!! This file is generated by oca-gen-addon-readme !!
627+
!! changes will be overwritten. !!
628+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
629+
!! source digest: sha256:1b0e2a405cd6bb133ee19a198cb252f1efe3d3848420c6b843846e07cfc1c2cf
630+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
631+
<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/Mint-System/Mint-System/tree/18.0/server_config_environment"><img alt="Mint-System/Mint-System" src="https://img.shields.io/badge/github-Mint--System%2FMint--System-lightgray.png?logo=github" /></a></p>
630632
<p>Define environments for server configurations.</p>
631-
<p>For a detailed documentation have a look at <a class="reference external" href="https://www.odoo-wiki.org/server-config-environment.html">https://www.odoo-wiki.org/server-config-environment.html</a></p>
632-
<section id="configuration">
633-
<h3>Configuration</h3>
633+
<p><strong>Table of contents</strong></p>
634+
<nav class="contents local" id="contents" role="doc-toc">
635+
<ul class="simple">
636+
<li><p><a class="reference internal" href="#bug-tracker" id="toc-entry-1">Bug Tracker</a></p></li>
637+
<li><p><a class="reference internal" href="#credits" id="toc-entry-2">Credits</a></p>
638+
<ul>
639+
<li><p><a class="reference internal" href="#authors" id="toc-entry-3">Authors</a></p></li>
640+
<li><p><a class="reference internal" href="#contributors" id="toc-entry-4">Contributors</a></p></li>
641+
<li><p><a class="reference internal" href="#maintainers" id="toc-entry-5">Maintainers</a></p></li>
642+
</ul>
643+
</li>
644+
</ul>
645+
</nav>
646+
<section id="bug-tracker">
647+
<h2><a class="toc-backref" href="#toc-entry-1" role="doc-backlink">Bug Tracker</a></h2>
648+
<p>Bugs are tracked on <a class="reference external" href="https://github.com/Mint-System/Mint-System/issues">GitHub Issues</a>.
649+
In case of trouble, please check there if your issue has already been reported.
650+
If you spotted it first, help us to smash it by providing a detailed and welcomed
651+
<a class="reference external" href="https://github.com/Mint-System/Mint-System/issues/new?body=module:%20server_config_environment%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
652+
<p>Do not contact contributors directly about support or help with technical issues.</p>
653+
</section>
654+
<section id="credits">
655+
<h2><a class="toc-backref" href="#toc-entry-2" role="doc-backlink">Credits</a></h2>
656+
<section id="authors">
657+
<h3><a class="toc-backref" href="#toc-entry-3" role="doc-backlink">Authors</a></h3>
658+
<ul class="simple">
659+
<li><p>Mint System GmbH</p></li>
660+
</ul>
661+
</section>
662+
<section id="contributors">
663+
<h3><a class="toc-backref" href="#toc-entry-4" role="doc-backlink">Contributors</a></h3>
634664
<ul class="simple">
635-
<li><p>No additional configurations needed</p></li>
665+
<li><p>Janik von Rotz &lt;<a class="reference external" href="mailto:login&#64;janikvonrotz.ch">login&#64;janikvonrotz.ch</a>&gt;</p></li>
636666
</ul>
637667
</section>
638-
<section id="maintainer">
639-
<h3>Maintainer</h3>
640-
<a class="reference external image-reference" href="https://www.mint-system.ch">
641-
<img alt="https://raw.githubusercontent.com/Mint-System/Wiki/main/attachments/mint-system-logo.png" src="https://raw.githubusercontent.com/Mint-System/Wiki/main/attachments/mint-system-logo.png" />
642-
</a>
643-
<p>This module is maintained by Mint System GmbH.</p>
644-
<p>For support and more information, please visit <a class="reference external" href="https://www.mint-system.ch">our Website</a>.</p>
668+
<section id="maintainers">
669+
<h3><a class="toc-backref" href="#toc-entry-5" role="doc-backlink">Maintainers</a></h3>
670+
<p>This module is part of the <a class="reference external" href="https://github.com/Mint-System/Mint-System/tree/18.0/server_config_environment">Mint-System/Mint-System</a> project on GitHub.</p>
671+
<p>You are welcome to contribute.</p>
645672
</section>
646673
</section>
647674
</main>

url_slug/models/url_slug_mixin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import logging
2+
23
import slugify
34

45
from odoo import api, fields, models

0 commit comments

Comments
 (0)