Skip to content

Commit 35b62e4

Browse files
committed
[IMP] agreement: pre-commit auto fixes
1 parent e880368 commit 35b62e4

File tree

9 files changed

+65
-62
lines changed

9 files changed

+65
-62
lines changed

agreement/README.rst

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,28 @@ Agreement
1717
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1818
:alt: License: AGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fagreement-lightgray.png?logo=github
20-
:target: https://github.com/OCA/agreement/tree/16.0/agreement
20+
:target: https://github.com/OCA/agreement/tree/17.0/agreement
2121
:alt: OCA/agreement
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/agreement-16-0/agreement-16-0-agreement
23+
:target: https://translation.odoo-community.org/projects/agreement-17-0/agreement-17-0-agreement
2424
:alt: Translate me on Weblate
2525
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/agreement&target_branch=16.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/agreement&target_branch=17.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
3030

3131
This module adds an *Agreement* object with the following properties:
3232

33-
* code,
34-
* name,
35-
* link to a partner,
36-
* signature date.
37-
* start date.
38-
* end date.
33+
- code,
34+
- name,
35+
- link to a partner,
36+
- signature date.
37+
- start date.
38+
- end date.
3939

40-
Optionally, you can also enable using:
41-
* agreement types
42-
* a flag to set an agreement as a template agreement
40+
Optionally, you can also enable using: \* agreement types \* a flag to
41+
set an agreement as a template agreement
4342

4443
(Install agreement_sale to get the configuration settings for these).
4544

@@ -54,37 +53,40 @@ Bug Tracker
5453
Bugs are tracked on `GitHub Issues <https://github.com/OCA/agreement/issues>`_.
5554
In case of trouble, please check there if your issue has already been reported.
5655
If you spotted it first, help us to smash it by providing a detailed and welcomed
57-
`feedback <https://github.com/OCA/agreement/issues/new?body=module:%20agreement%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
56+
`feedback <https://github.com/OCA/agreement/issues/new?body=module:%20agreement%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
5857

5958
Do not contact contributors directly about support or help with technical issues.
6059

6160
Credits
6261
=======
6362

6463
Authors
65-
~~~~~~~
64+
-------
6665

6766
* Akretion
6867
* Yves Goldberg (Ygol Internetwork)
6968

7069
Contributors
71-
~~~~~~~~~~~~
70+
------------
7271

73-
* Alexis de Lattre <[email protected]>
74-
* Yves Goldberg <[email protected]>
75-
* Alexandre Fayolle <[email protected]>
76-
* `Tecnativa <https://www.tecnativa.com>`_:
72+
- Alexis de Lattre <[email protected]>
7773

78-
* Sergio Teruel
74+
- Yves Goldberg <[email protected]>
7975

80-
* Tharathip Chaweewongphan <[email protected]>
76+
- Alexandre Fayolle <[email protected]>
8177

82-
* `Acsone <https://www.acsone.eu/>`_:
78+
- `Tecnativa <https://www.tecnativa.com>`__:
8379

84-
* Maxime Franco
80+
- Sergio Teruel
81+
82+
- Tharathip Chaweewongphan <[email protected]>
83+
84+
- `Acsone <https://www.acsone.eu/>`__:
85+
86+
- Maxime Franco
8587

8688
Maintainers
87-
~~~~~~~~~~~
89+
-----------
8890

8991
This module is maintained by the OCA.
9092

@@ -107,6 +109,6 @@ Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
107109

108110
|maintainer-ygol| |maintainer-alexis-via|
109111

110-
This module is part of the `OCA/agreement <https://github.com/OCA/agreement/tree/16.0/agreement>`_ project on GitHub.
112+
This module is part of the `OCA/agreement <https://github.com/OCA/agreement/tree/17.0/agreement>`_ project on GitHub.
111113

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

agreement/models/agreement.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def name_get(self):
6868
for agr in self:
6969
name = agr.name
7070
if agr.code:
71-
name = "[{}] {}".format(agr.code, agr.name)
71+
name = f"[{agr.code}] {agr.name}"
7272
res.append((agr.id, name))
7373
return res
7474

agreement/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"

agreement/readme/CONTRIBUTORS.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
- Alexis de Lattre \<<[email protected]>\>
2+
3+
- Yves Goldberg \<<[email protected]>\>
4+
5+
- Alexandre Fayolle \<<[email protected]>\>
6+
7+
- [Tecnativa](https://www.tecnativa.com):
8+
9+
> - Sergio Teruel
10+
11+
- Tharathip Chaweewongphan \<<[email protected]>\>
12+
13+
- [Acsone](https://www.acsone.eu/):
14+
15+
- Maxime Franco

agreement/readme/CONTRIBUTORS.rst

Lines changed: 0 additions & 12 deletions
This file was deleted.

agreement/readme/DESCRIPTION.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
This module adds an *Agreement* object with the following properties:
2+
3+
- code,
4+
- name,
5+
- link to a partner,
6+
- signature date.
7+
- start date.
8+
- end date.
9+
10+
Optionally, you can also enable using: \* agreement types \* a flag to
11+
set an agreement as a template agreement
12+
13+
(Install agreement_sale to get the configuration settings for these).

agreement/readme/DESCRIPTION.rst

Lines changed: 0 additions & 14 deletions
This file was deleted.

agreement/static/description/index.html

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<?xml version="1.0" encoding="utf-8"?>
21
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
32
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
43
<head>
@@ -369,7 +368,7 @@ <h1 class="title">Agreement</h1>
369368
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370369
!! source digest: sha256:3e5b927c6c72b14dee95f655c650563894d92b13a0b74690e658de259f8cde55
371370
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
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/agreement/tree/16.0/agreement"><img alt="OCA/agreement" src="https://img.shields.io/badge/github-OCA%2Fagreement-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/agreement-16-0/agreement-16-0-agreement"><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/agreement&amp;target_branch=16.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
371+
<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/agreement/tree/17.0/agreement"><img alt="OCA/agreement" src="https://img.shields.io/badge/github-OCA%2Fagreement-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/agreement-17-0/agreement-17-0-agreement"><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/agreement&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373372
<p>This module adds an <em>Agreement</em> object with the following properties:</p>
374373
<ul class="simple">
375374
<li>code,</li>
@@ -379,9 +378,8 @@ <h1 class="title">Agreement</h1>
379378
<li>start date.</li>
380379
<li>end date.</li>
381380
</ul>
382-
<p>Optionally, you can also enable using:
383-
* agreement types
384-
* a flag to set an agreement as a template agreement</p>
381+
<p>Optionally, you can also enable using: * agreement types * a flag to
382+
set an agreement as a template agreement</p>
385383
<p>(Install agreement_sale to get the configuration settings for these).</p>
386384
<p><strong>Table of contents</strong></p>
387385
<div class="contents local topic" id="contents">
@@ -400,7 +398,7 @@ <h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
400398
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/agreement/issues">GitHub Issues</a>.
401399
In case of trouble, please check there if your issue has already been reported.
402400
If you spotted it first, help us to smash it by providing a detailed and welcomed
403-
<a class="reference external" href="https://github.com/OCA/agreement/issues/new?body=module:%20agreement%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
401+
<a class="reference external" href="https://github.com/OCA/agreement/issues/new?body=module:%20agreement%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
404402
<p>Do not contact contributors directly about support or help with technical issues.</p>
405403
</div>
406404
<div class="section" id="credits">
@@ -446,7 +444,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
446444
promote its widespread use.</p>
447445
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
448446
<p><a class="reference external image-reference" href="https://github.com/ygol"><img alt="ygol" src="https://github.com/ygol.png?size=40px" /></a> <a class="reference external image-reference" href="https://github.com/alexis-via"><img alt="alexis-via" src="https://github.com/alexis-via.png?size=40px" /></a></p>
449-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/agreement/tree/16.0/agreement">OCA/agreement</a> project on GitHub.</p>
447+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/agreement/tree/17.0/agreement">OCA/agreement</a> project on GitHub.</p>
450448
<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>
451449
</div>
452450
</div>

agreement/tests/test_agreement.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ def test_agreement_type_change(self):
3030
def test_name_get(self):
3131
res = self.agreement.name_get()
3232
self.assertEqual(res[0][0], self.agreement.id)
33-
self.assertEqual(
34-
res[0][1], "[{}] {}".format(self.agreement.code, self.agreement.name)
35-
)
33+
self.assertEqual(res[0][1], f"[{self.agreement.code}] {self.agreement.name}")
3634

3735
def test_copy(self):
3836
agreement1 = self.agreement.copy(default={"code": "Test Code"})

0 commit comments

Comments
 (0)