diff --git a/agreement/README.rst b/agreement/README.rst index 952e2bab..8997c37a 100644 --- a/agreement/README.rst +++ b/agreement/README.rst @@ -85,6 +85,16 @@ Contributors - Maxime Franco +- `Trobz `__: + + - Nhan Tran + +Other credits +------------- + +The migration of this module from 17.0 to 18.0 was financially supported +by Camptocamp. + Maintainers ----------- diff --git a/agreement/__manifest__.py b/agreement/__manifest__.py index 95a53d12..1da5a063 100644 --- a/agreement/__manifest__.py +++ b/agreement/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Agreement", "summary": "Adds an agreement object", - "version": "17.0.1.0.0", + "version": "18.0.1.0.0", "category": "Contract", "author": "Akretion, " "Yves Goldberg (Ygol Internetwork), " diff --git a/agreement/models/agreement.py b/agreement/models/agreement.py index c69532ce..5f54b12b 100644 --- a/agreement/models/agreement.py +++ b/agreement/models/agreement.py @@ -26,7 +26,6 @@ class Agreement(models.Model): ) is_template = fields.Boolean( string="Is a Template?", - default=False, copy=False, help="Set if the agreement is a template. " "Template agreements don't require a partner.", @@ -63,14 +62,9 @@ def _compute_domain(self): else: rec.domain = "sale" - def name_get(self): - res = [] - for agr in self: - name = agr.name - if agr.code: - name = f"[{agr.code}] {agr.name}" - res.append((agr.id, name)) - return res + def _compute_display_name(self): + for rec in self: + rec.display_name = f"[{rec.code}] {rec.name}" _sql_constraints = [ ( diff --git a/agreement/readme/CONTRIBUTORS.md b/agreement/readme/CONTRIBUTORS.md index f4c5e31d..2fc3936d 100644 --- a/agreement/readme/CONTRIBUTORS.md +++ b/agreement/readme/CONTRIBUTORS.md @@ -13,3 +13,7 @@ - [Acsone](https://www.acsone.eu/): - Maxime Franco + +- [Trobz](https://www.trobz.com/): + + - Nhan Tran \<\> diff --git a/agreement/readme/CREDITS.md b/agreement/readme/CREDITS.md new file mode 100644 index 00000000..8edec949 --- /dev/null +++ b/agreement/readme/CREDITS.md @@ -0,0 +1,2 @@ +The migration of this module from 17.0 to 18.0 was financially supported +by Camptocamp. diff --git a/agreement/static/description/index.html b/agreement/static/description/index.html index 6e3329f1..ba3a8e00 100644 --- a/agreement/static/description/index.html +++ b/agreement/static/description/index.html @@ -389,7 +389,8 @@

Agreement

  • Credits
  • @@ -434,10 +435,20 @@

    Contributors

  • Maxime Franco
  • +
  • Trobz:

    + +
  • +
    +

    Other credits

    +

    The migration of this module from 17.0 to 18.0 was financially supported +by Camptocamp.

    +
    -

    Maintainers

    +

    Maintainers

    This module is maintained by the OCA.

    Odoo Community Association diff --git a/agreement/tests/test_agreement.py b/agreement/tests/test_agreement.py index 89eb91cd..59e4b8b9 100644 --- a/agreement/tests/test_agreement.py +++ b/agreement/tests/test_agreement.py @@ -27,10 +27,9 @@ def test_agreement_type_change(self): self.agreement.write({"agreement_type_id": self.agreement_type.id}) self.assertEqual(self.agreement.domain, self.agreement_type.domain) - def test_name_get(self): - res = self.agreement.name_get() - self.assertEqual(res[0][0], self.agreement.id) - self.assertEqual(res[0][1], f"[{self.agreement.code}] {self.agreement.name}") + def test_compute_display_name(self): + display_name = self.agreement.display_name + self.assertEqual(display_name, f"[{self.agreement.code}] {self.agreement.name}") def test_copy(self): agreement1 = self.agreement.copy(default={"code": "Test Code"}) diff --git a/agreement/views/agreement.xml.orig b/agreement/views/agreement.xml.orig deleted file mode 100644 index 592bd565..00000000 --- a/agreement/views/agreement.xml.orig +++ /dev/null @@ -1,135 +0,0 @@ - - - - - agreement.form - agreement - -
    - -
    - -
    -
    - - - - - - - - - - - - - - - - - - - -<<<<<<< HEAD -
    - - - -
    -======= - ->>>>>>> 00d357b ([IMP] agreement: pre-commit execution) - - - - - agreement.tree - agreement - - - - - - - - - - - - - - - agreement.search - agreement - - - - - - - - - - - - - - - - - - - Agreements - agreement - tree,form - - diff --git a/agreement/views/agreement_type.xml b/agreement/views/agreement_type.xml index 234a265a..068b95e0 100644 --- a/agreement/views/agreement_type.xml +++ b/agreement/views/agreement_type.xml @@ -5,10 +5,10 @@ Agreement Type List agreement.type - + - + @@ -71,6 +71,6 @@ Agreement Types agreement.type - tree,form + list,form