Skip to content

Commit

Permalink
[MIG] base_partner_sequence: Migration to 18.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Kimkhoi3010 committed Oct 25, 2024
1 parent c741ee4 commit 3aad374
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 15 deletions.
9 changes: 9 additions & 0 deletions base_partner_sequence/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ Contributors
- Francesco Apruzzese <[email protected]>
- Daniel Reis <[email protected]>
- Nikul Chaudhary <[email protected]>
- Khoi (Kien Kim) <[email protected]>

Other credits
-------------

The migration of this module from 17.0 to 18.0 was financially supported
by:

- Camptocamp

Maintainers
-----------
Expand Down
2 changes: 1 addition & 1 deletion base_partner_sequence/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"Odoo Community Association (OCA)"
),
"name": "Add a sequence on customers' code",
"version": "17.0.1.0.0",
"version": "18.0.1.0.0",
"development_status": "Production/Stable",
"category": "Generic Modules/Base",
"website": "https://github.com/OCA/partner-contact",
Expand Down
1 change: 1 addition & 0 deletions base_partner_sequence/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@
- Francesco Apruzzese \<<[email protected]>\>
- Daniel Reis \<<[email protected]>\>
- Nikul Chaudhary \<<[email protected]>\>
- Khoi (Kien Kim) \<<[email protected]>\>
3 changes: 3 additions & 0 deletions base_partner_sequence/readme/CREDITS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
The migration of this module from 17.0 to 18.0 was financially supported by:

- Camptocamp
14 changes: 12 additions & 2 deletions base_partner_sequence/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,8 @@ <h1 class="title">Add a sequence on customers’ code</h1>
<li><a class="reference internal" href="#credits" id="toc-entry-2">Credits</a><ul>
<li><a class="reference internal" href="#authors" id="toc-entry-3">Authors</a></li>
<li><a class="reference internal" href="#contributors" id="toc-entry-4">Contributors</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-5">Maintainers</a></li>
<li><a class="reference internal" href="#other-credits" id="toc-entry-5">Other credits</a></li>
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
</ul>
</li>
</ul>
Expand Down Expand Up @@ -428,10 +429,19 @@ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<li>Francesco Apruzzese &lt;<a class="reference external" href="mailto:cescoap&#64;gmail.com">cescoap&#64;gmail.com</a>&gt;</li>
<li>Daniel Reis &lt;<a class="reference external" href="mailto:dreis&#64;opensourceintegrators.com">dreis&#64;opensourceintegrators.com</a>&gt;</li>
<li>Nikul Chaudhary &lt;<a class="reference external" href="mailto:nchaudhary&#64;opensourceintegrators.com">nchaudhary&#64;opensourceintegrators.com</a>&gt;</li>
<li>Khoi (Kien Kim) &lt;<a class="reference external" href="mailto:khoikk&#64;trobz.com">khoikk&#64;trobz.com</a>&gt;</li>
</ul>
</div>
<div class="section" id="other-credits">
<h2><a class="toc-backref" href="#toc-entry-5">Other credits</a></h2>
<p>The migration of this module from 17.0 to 18.0 was financially supported
by:</p>
<ul class="simple">
<li>Camptocamp</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
Expand Down
16 changes: 4 additions & 12 deletions base_partner_sequence/tests/test_base_partner_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,10 @@
# Copyright 2016 Tecnativa - Vicent Cubells
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).

import odoo.tests.common as common
from odoo.addons.base.tests.common import BaseCommon


class TestBasePartnerSequence(common.TransactionCase):
def setUp(self):
super().setUp()

self.res_partner = self.env["res.partner"]
self.partner = self.res_partner.create(
{"name": "test1", "email": "[email protected]"}
)

class TestBasePartnerSequence(BaseCommon):
def test_ref_sequence_on_partner(self):
# Test sequence on creating partner and copying it
self.assertTrue(self.partner.ref, "A partner has always a ref.")
Expand All @@ -25,7 +17,7 @@ def test_ref_sequence_on_partner(self):

def test_ref_sequence_on_contact(self):
# Test if sequence doesn't increase on creating a contact child
contact = self.res_partner.create(
contact = self.env["res.partner"].create(
{
"name": "contact1",
"email": "[email protected]",
Expand Down Expand Up @@ -54,7 +46,7 @@ def test_ref_change_convert_child_to_parent(self):
converted to a commercial partner."""
# Remove the ref from the parent so child does not have one initially
self.partner.write({"ref": False})
contact = self.res_partner.create(
contact = self.env["res.partner"].create(
{
"name": "contact1",
"email": "[email protected]",
Expand Down

0 comments on commit 3aad374

Please sign in to comment.