Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIG] crm_lead_code: Migration to 18.0 #609

Open
wants to merge 31 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
baefdb9
[ADD] New module <crm_lead_code>
oihane Jul 27, 2015
307f78d
[IMP] <crm_lead_code> Code made visible in opportunities
oihane Jul 28, 2015
38c2cec
[MIG] Make modules uninstallable
pedrobaeza Oct 14, 2015
0a1df06
[MIG] Rename manifest files
pedrobaeza Oct 6, 2016
2135a81
[10.0][MIG] crm_lead_code (#156)
nicolasramos Sep 26, 2017
795ee45
remove obsolete .pot files [ci skip]
sbidoul Jun 15, 2018
b57c1da
Translated using Weblate (German)
marylla Dec 12, 2018
97ead0e
[MIG] crm_lead_code: Migration to 12.0
keshrath Jan 14, 2019
4b3042b
Translated using Weblate (Portuguese (Brazil))
Sep 3, 2019
df5ac3d
[WIP][13.0][MIG] crm_lead_code
murtuzasaleh Sep 30, 2019
dbfb348
[FIX] Travis
murtuzasaleh May 5, 2020
31217e1
[MIG] crm_lead_code: Migration to 14.0
newtratip Nov 6, 2020
1a8cfc1
Added translation using Weblate (Spanish (Argentina))
ibuioli Feb 6, 2021
6905591
Translated using Weblate (Spanish (Argentina))
ibuioli Feb 6, 2021
dfdc9ec
Translated using Weblate (Spanish)
Mat-moran Feb 11, 2021
2709ae6
[MIG] crm_lead_code: Migration to 15.0
santostelmo Oct 22, 2021
3cd54b3
Added translation using Weblate (Catalan)
Noel000 Feb 14, 2022
4a9f3bb
Translated using Weblate (French)
ajaniszewska-dev Mar 2, 2022
ec029cd
Translated using Weblate (Catalan)
Noel000 Apr 13, 2022
20593bc
Translated using Weblate (Italian)
francesco-ooops Feb 1, 2023
b244676
[MIG] crm_lead_code: Migration to 16.0
Feb 17, 2023
2eb47df
Translated using Weblate (Slovenian)
sysadminmatmoz Apr 11, 2023
15e60ba
Translated using Weblate (Italian)
mymage Jun 12, 2023
1f9522b
Translated using Weblate (Spanish)
Ivorra78 Aug 2, 2023
4cc0028
Translated using Weblate (Spanish (Argentina))
ibuioli Oct 29, 2023
3b2037e
[MIG] crm_lead_code: Migration to 17.0
peluko00 Nov 16, 2023
b100cde
Translated using Weblate (Portuguese (Brazil))
May 17, 2024
6c244ca
Translated using Weblate (Portuguese (Brazil))
SottomaiorMacedoTec Jul 6, 2024
246cd1c
[IMP] crm_lead_code: space get removed when other view changes name f…
CRogos Oct 11, 2024
bb5eac4
[IMP] crm_lead_code: pre-commit auto fixes
HeliconiaSolutions Nov 25, 2024
b9c09ab
[MIG] crm_lead_code: Migration to 18.0
HeliconiaSolutions Nov 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions crm_lead_code/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ Sequential Code for Leads / Opportunities
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fcrm-lightgray.png?logo=github
:target: https://github.com/OCA/crm/tree/17.0/crm_lead_code
:target: https://github.com/OCA/crm/tree/18.0/crm_lead_code
:alt: OCA/crm
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/crm-17-0/crm-17-0-crm_lead_code
:target: https://translation.odoo-community.org/projects/crm-18-0/crm-18-0-crm_lead_code
: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/crm&target_branch=17.0
:target: https://runboat.odoo-community.org/builds?repo=OCA/crm&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|
Expand All @@ -41,7 +41,7 @@ Bug Tracker
Bugs are tracked on `GitHub Issues <https://github.com/OCA/crm/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/crm/issues/new?body=module:%20crm_lead_code%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/OCA/crm/issues/new?body=module:%20crm_lead_code%0Aversion:%2018.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.

Expand All @@ -57,16 +57,18 @@ Authors
Contributors
------------

- Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
- Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
- Ana Juaristi <anajuarist@avanzosc.es>
- Nicol??s Ramos <contacto@difusionvisual.com>
- Mathias Markl <mathias.markl@mukit.at>
- Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
- Tharathip Chaweewongphan <tharathipc@ecosoft.co.th>
- `APSL <https://apsl.tech>`__:
- Oihane Crucelaegui <oihanecrucelaegi@avanzosc.es>
- Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
- Ana Juaristi <anajuarist@avanzosc.es>
- Nicol??s Ramos <contacto@difusionvisual.com>
- Mathias Markl <mathias.markl@mukit.at>
- Serpent Consulting Services Pvt. Ltd. <support@serpentcs.com>
- Tharathip Chaweewongphan <tharathipc@ecosoft.co.th>
- `APSL <https://apsl.tech>`__:

- Antoni Marroig
- Antoni Marroig

- ``Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>``\ \_

Maintainers
-----------
Expand All @@ -81,6 +83,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/crm <https://github.com/OCA/crm/tree/17.0/crm_lead_code>`_ project on GitHub.
This module is part of the `OCA/crm <https://github.com/OCA/crm/tree/18.0/crm_lead_code>`_ 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 crm_lead_code/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

{
"name": "Sequential Code for Leads / Opportunities",
"version": "17.0.1.1.0",
"version": "18.0.1.0.0",
"category": "Customer Relationship Management",
"author": "Tecnativa, AvanzOSC, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/crm",
Expand Down
4 changes: 2 additions & 2 deletions crm_lead_code/models/crm_lead.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# For copyright and license notices, see __manifest__.py file in root directory
##############################################################################

from odoo import _, api, fields, models
from odoo import api, fields, models


class CrmLead(models.Model):
Expand All @@ -13,7 +13,7 @@ class CrmLead(models.Model):
)

_sql_constraints = [
("crm_lead_unique_code", "UNIQUE (code)", _("The code must be unique!")),
("crm_lead_unique_code", "UNIQUE (code)", "The code must be unique!"),
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change is not correct.
You should replace _ by self.env._ or assign _ = self.env._

https://www.odoo.com/documentation/18.0/contributing/development/coding_guidelines.html#use-translation-method-correctly

Or was it intended to remove the translation?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@CRogos, Thank you for your feedback!

I tried assigning _ = self.env._ as per the guidelines, but it seems not to work in this case because the translation is used inside sql_constraints, where self is not accessible.

Would you suggest any alternative approach to apply translations in this context

Looking forward to your guidance!

]

@api.model_create_multi
Expand Down
1 change: 1 addition & 0 deletions crm_lead_code/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
- Tharathip Chaweewongphan \<<tharathipc@ecosoft.co.th>\>
- [APSL](https://apsl.tech):
- Antoni Marroig
- `Heliconia Solutions Pvt. Ltd. <https://www.heliconia.io>`_
7 changes: 4 additions & 3 deletions crm_lead_code/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ <h1 class="title">Sequential Code for Leads / Opportunities</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:463dc21da7004517ade8f6bb62dc50bb9477208671976eaf4a017179b6ad038d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<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/17.0/crm_lead_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-17-0/crm-17-0-crm_lead_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=17.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/crm/tree/18.0/crm_lead_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-18-0/crm-18-0-crm_lead_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=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
<p>This module adds a sequential code for leads / opportunities.</p>
<p><strong>Table of contents</strong></p>
<div class="contents local topic" id="contents">
Expand All @@ -388,7 +388,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/crm/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/crm/issues/new?body=module:%20crm_lead_code%0Aversion:%2017.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/crm/issues/new?body=module:%20crm_lead_code%0Aversion:%2018.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 All @@ -414,6 +414,7 @@ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
<li>Antoni Marroig</li>
</ul>
</li>
<li><tt class="docutils literal">Heliconia Solutions Pvt. Ltd. <span class="pre">&lt;https://www.heliconia.io&gt;</span></tt>_</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand All @@ -425,7 +426,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/crm/tree/17.0/crm_lead_code">OCA/crm</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/crm/tree/18.0/crm_lead_code">OCA/crm</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