Skip to content

Commit

Permalink
[IMP] agreement: pre-commit auto fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
chandni-serpentcs committed Feb 14, 2024
1 parent a87f7ab commit 42c4a75
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 61 deletions.
52 changes: 27 additions & 25 deletions agreement/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,28 @@ Agreement
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fagreement-lightgray.png?logo=github
:target: https://github.com/OCA/agreement/tree/16.0/agreement
:target: https://github.com/OCA/agreement/tree/17.0/agreement
:alt: OCA/agreement
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/agreement-16-0/agreement-16-0-agreement
:target: https://translation.odoo-community.org/projects/agreement-17-0/agreement-17-0-agreement
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/agreement&target_branch=16.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/agreement&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

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

* code,
* name,
* link to a partner,
* signature date.
* start date.
* end date.
- code,
- name,
- link to a partner,
- signature date.
- start date.
- end date.

Optionally, you can also enable using:
* agreement types
* a flag to set an agreement as a template agreement
Optionally, you can also enable using: \* agreement types \* a flag to
set an agreement as a template agreement

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

Expand All @@ -54,37 +53,40 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/agreement/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`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**>`_.
`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**>`_.

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

Credits
=======

Authors
~~~~~~~
-------

* Akretion
* Yves Goldberg (Ygol Internetwork)

Contributors
~~~~~~~~~~~~
------------

* Alexis de Lattre <[email protected]>
* Yves Goldberg <[email protected]>
* Alexandre Fayolle <[email protected]>
* `Tecnativa <https://www.tecnativa.com>`_:
- Alexis de Lattre <[email protected]>

* Sergio Teruel
- Yves Goldberg <[email protected]>

* Tharathip Chaweewongphan <[email protected]>
- Alexandre Fayolle <[email protected]>

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

* Maxime Franco
- Sergio Teruel

- Tharathip Chaweewongphan <[email protected]>

- `Acsone <https://www.acsone.eu/>`__:

- Maxime Franco

Maintainers
~~~~~~~~~~~
-----------

This module is maintained by the OCA.

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

|maintainer-ygol| |maintainer-alexis-via|

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
2 changes: 1 addition & 1 deletion agreement/models/agreement.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def name_get(self):
for agr in self:
name = agr.name
if agr.code:
name = "[{}] {}".format(agr.code, agr.name)
name = f"[{agr.code}] {agr.name}"
res.append((agr.id, name))
return res

Expand Down
3 changes: 3 additions & 0 deletions agreement/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
15 changes: 15 additions & 0 deletions agreement/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
- Alexis de Lattre \<<[email protected]>\>

- Yves Goldberg \<<[email protected]>\>

- Alexandre Fayolle \<<[email protected]>\>

- [Tecnativa](https://www.tecnativa.com):

> - Sergio Teruel
- Tharathip Chaweewongphan \<<[email protected]>\>

- [Acsone](https://www.acsone.eu/):

- Maxime Franco
12 changes: 0 additions & 12 deletions agreement/readme/CONTRIBUTORS.rst

This file was deleted.

13 changes: 13 additions & 0 deletions agreement/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
This module adds an *Agreement* object with the following properties:

- code,
- name,
- link to a partner,
- signature date.
- start date.
- end date.

Optionally, you can also enable using: \* agreement types \* a flag to
set an agreement as a template agreement

(Install agreement_sale to get the configuration settings for these).
14 changes: 0 additions & 14 deletions agreement/readme/DESCRIPTION.rst

This file was deleted.

11 changes: 5 additions & 6 deletions agreement/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ <h1 class="title">Agreement</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:3e5b927c6c72b14dee95f655c650563894d92b13a0b74690e658de259f8cde55
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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>
<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>
<p>This module adds an <em>Agreement</em> object with the following properties:</p>
<ul class="simple">
<li>code,</li>
Expand All @@ -379,9 +379,8 @@ <h1 class="title">Agreement</h1>
<li>start date.</li>
<li>end date.</li>
</ul>
<p>Optionally, you can also enable using:
* agreement types
* a flag to set an agreement as a template agreement</p>
<p>Optionally, you can also enable using: * agreement types * a flag to
set an agreement as a template agreement</p>
<p>(Install agreement_sale to get the configuration settings for these).</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
Expand All @@ -400,7 +399,7 @@ <h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/agreement/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<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>
<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>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand Down Expand Up @@ -446,7 +445,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
promote its widespread use.</p>
<p>Current <a class="reference external" href="https://odoo-community.org/page/maintainer-role">maintainers</a>:</p>
<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>
<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>
<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>
<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>
</div>
</div>
Expand Down
4 changes: 1 addition & 3 deletions agreement/tests/test_agreement.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ def test_agreement_type_change(self):
def test_name_get(self):
res = self.agreement.name_get()
self.assertEqual(res[0][0], self.agreement.id)
self.assertEqual(
res[0][1], "[{}] {}".format(self.agreement.code, self.agreement.name)
)
self.assertEqual(res[0][1], f"[{self.agreement.code}] {self.agreement.name}")

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

0 comments on commit 42c4a75

Please sign in to comment.