Skip to content

Commit 45c2bb4

Browse files
committed
[MIG] crm_claim_code: Migration to 15.0
1 parent 2e887b2 commit 45c2bb4

File tree

6 files changed

+29
-20
lines changed

6 files changed

+29
-20
lines changed

crm_claim_code/README.rst

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Sequential Code for Claims
77
!! This file is generated by oca-gen-addon-readme !!
88
!! changes will be overwritten. !!
99
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10-
!! source digest: sha256:9afa3e7e4d192a290459cd6986e91e9ba7053feef16422119113f03c374c7882
10+
!! source digest: sha256:69c955590a5299ba39c50023a03614707e14b9b7494e2ad602215f9257381cbb
1111
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1212
1313
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -17,13 +17,13 @@ Sequential Code for Claims
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%2Fcrm-lightgray.png?logo=github
20-
:target: https://github.com/OCA/crm/tree/14.0/crm_claim_code
20+
:target: https://github.com/OCA/crm/tree/15.0/crm_claim_code
2121
:alt: OCA/crm
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/crm-14-0/crm-14-0-crm_claim_code
23+
:target: https://translation.odoo-community.org/projects/crm-15-0/crm-15-0-crm_claim_code
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/crm&target_branch=14.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/crm&target_branch=15.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -49,7 +49,7 @@ Bug Tracker
4949
Bugs are tracked on `GitHub Issues <https://github.com/OCA/crm/issues>`_.
5050
In case of trouble, please check there if your issue has already been reported.
5151
If you spotted it first, help us to smash it by providing a detailed and welcomed
52-
`feedback <https://github.com/OCA/crm/issues/new?body=module:%20crm_claim_code%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
52+
`feedback <https://github.com/OCA/crm/issues/new?body=module:%20crm_claim_code%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
5353

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

@@ -76,6 +76,10 @@ Contributors
7676
* Pedro M. Baeza
7777
* Vicent Cubells
7878

79+
* `Trey Kilobytes de Soluciones SL <https://www.trey.es>`_:
80+
81+
* Vicent Cubells
82+
7983
Maintainers
8084
~~~~~~~~~~~
8185

@@ -89,6 +93,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
8993
mission is to support the collaborative development of Odoo features and
9094
promote its widespread use.
9195

92-
This module is part of the `OCA/crm <https://github.com/OCA/crm/tree/14.0/crm_claim_code>`_ project on GitHub.
96+
This module is part of the `OCA/crm <https://github.com/OCA/crm/tree/15.0/crm_claim_code>`_ project on GitHub.
9397

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

crm_claim_code/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
{
77
"name": "Sequential Code for Claims",
8-
"version": "14.0.1.0.0",
8+
"version": "15.0.1.0.0",
99
"category": "Customer Relationship Management",
1010
"author": "AvanzOSC, Tecnativa, Odoo Community Association (OCA)",
1111
"website": "https://github.com/OCA/crm",

crm_claim_code/hooks.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,8 @@ def assign_old_sequences(cr, registry):
2222
if not new_field_code_added:
2323
# the field was already existing before the installation of the addon
2424
return
25-
with Environment.manage():
26-
env = Environment(cr, SUPERUSER_ID, {})
27-
28-
sequence_model = env["ir.sequence"]
29-
30-
claims = env["crm.claim"].search([], order="id")
31-
for claim in claims:
32-
claim.code = sequence_model.next_by_code("crm.claim")
25+
env = Environment(cr, SUPERUSER_ID, {})
26+
sequence_model = env["ir.sequence"]
27+
claims = env["crm.claim"].search([], order="id")
28+
for claim in claims:
29+
claim.code = sequence_model.next_by_code("crm.claim")

crm_claim_code/readme/CONTRIBUTORS.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,7 @@
88
* Ernesto Tejeda
99
* Pedro M. Baeza
1010
* Vicent Cubells
11+
12+
* `Trey Kilobytes de Soluciones SL <https://www.trey.es>`_:
13+
14+
* Vicent Cubells

crm_claim_code/static/description/index.html

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -367,9 +367,9 @@ <h1 class="title">Sequential Code for Claims</h1>
367367
!! This file is generated by oca-gen-addon-readme !!
368368
!! changes will be overwritten. !!
369369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
370-
!! source digest: sha256:9afa3e7e4d192a290459cd6986e91e9ba7053feef16422119113f03c374c7882
370+
!! source digest: sha256:69c955590a5299ba39c50023a03614707e14b9b7494e2ad602215f9257381cbb
371371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
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/crm/tree/14.0/crm_claim_code"><img alt="OCA/crm" src="https://img.shields.io/badge/github-OCA%2Fcrm-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/crm-14-0/crm-14-0-crm_claim_code"><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/crm&amp;target_branch=14.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
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/crm/tree/15.0/crm_claim_code"><img alt="OCA/crm" src="https://img.shields.io/badge/github-OCA%2Fcrm-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/crm-15-0/crm-15-0-crm_claim_code"><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/crm&amp;target_branch=15.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
373373
<ul class="simple">
374374
<li>This module adds a sequential code for claims.</li>
375375
</ul>
@@ -399,7 +399,7 @@ <h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
399399
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/crm/issues">GitHub Issues</a>.
400400
In case of trouble, please check there if your issue has already been reported.
401401
If you spotted it first, help us to smash it by providing a detailed and welcomed
402-
<a class="reference external" href="https://github.com/OCA/crm/issues/new?body=module:%20crm_claim_code%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
402+
<a class="reference external" href="https://github.com/OCA/crm/issues/new?body=module:%20crm_claim_code%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
403403
<p>Do not contact contributors directly about support or help with technical issues.</p>
404404
</div>
405405
<div class="section" id="credits">
@@ -425,6 +425,10 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
425425
<li>Vicent Cubells</li>
426426
</ul>
427427
</li>
428+
<li><a class="reference external" href="https://www.trey.es">Trey Kilobytes de Soluciones SL</a>:<ul>
429+
<li>Vicent Cubells</li>
430+
</ul>
431+
</li>
428432
</ul>
429433
</div>
430434
<div class="section" id="maintainers">
@@ -434,7 +438,7 @@ <h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
434438
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
435439
mission is to support the collaborative development of Odoo features and
436440
promote its widespread use.</p>
437-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/crm/tree/14.0/crm_claim_code">OCA/crm</a> project on GitHub.</p>
441+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/crm/tree/15.0/crm_claim_code">OCA/crm</a> project on GitHub.</p>
438442
<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>
439443
</div>
440444
</div>

crm_claim_code/tests/test_crm_claim_code.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from odoo.tests import common
77

88

9-
class TestCrmClaimCode(common.SavepointCase):
9+
class TestCrmClaimCode(common.TransactionCase):
1010
@classmethod
1111
def setUpClass(cls):
1212
super(TestCrmClaimCode, cls).setUpClass()

0 commit comments

Comments
 (0)