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 all commits
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
88 changes: 88 additions & 0 deletions crm_lead_code/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
=========================================
Sequential Code for Leads / Opportunities
=========================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:463dc21da7004517ade8f6bb62dc50bb9477208671976eaf4a017179b6ad038d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
: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/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-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=18.0
:alt: Try me on Runboat

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

This module adds a sequential code for leads / opportunities.

**Table of contents**

.. contents::
:local:

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:%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.

Credits
=======

Authors
-------

* Tecnativa
* AvanzOSC

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>`__:

- Antoni Marroig

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

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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/18.0/crm_lead_code>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
25 changes: 25 additions & 0 deletions crm_lead_code/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
##############################################################################
# For copyright and license notices, see __manifest__.py file in root directory
##############################################################################

from . import models
from odoo import api, SUPERUSER_ID


def create_code_equal_to_id(env):
env.cr.execute("ALTER TABLE crm_lead ADD COLUMN code character varying;")
env.cr.execute("UPDATE crm_lead SET code = id;")


def assign_old_sequences(env):
lead_obj = env["crm.lead"]
sequence_obj = env["ir.sequence"]
leads = lead_obj.search([], order="id")
for lead_id in leads.ids:
env.cr.execute(
"UPDATE crm_lead SET code = %s WHERE id = %s;",
(
sequence_obj.next_by_code("crm.lead"),
lead_id,
),
)
34 changes: 34 additions & 0 deletions crm_lead_code/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
##############################################################################
#
# Copyright (c)
# 2015 Serv. Tec. Avanzados - Pedro M. Baeza (http://www.serviciosbaeza.com)
# 2015 AvanzOsc (http://www.avanzosc.es)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################

{
"name": "Sequential Code for Leads / Opportunities",
"version": "18.0.1.0.0",
"category": "Customer Relationship Management",
"author": "Tecnativa, AvanzOSC, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/crm",
"license": "AGPL-3",
"depends": ["crm"],
"data": ["data/lead_sequence.xml", "views/crm_lead_view.xml"],
"installable": True,
"pre_init_hook": "create_code_equal_to_id",
"post_init_hook": "assign_old_sequences",
}
8 changes: 8 additions & 0 deletions crm_lead_code/data/lead_sequence.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<odoo noupdate="1">
<record id="sequence_lead" model="ir.sequence">
<field name="name">Lead Code</field>
<field name="code">crm.lead</field>
<field eval="4" name="padding" />
<field name="prefix">LD</field>
</record>
</odoo>
37 changes: 37 additions & 0 deletions crm_lead_code/i18n/bg.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_lead_code
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-04 15:47+0000\n"
"PO-Revision-Date: 2017-12-04 15:47+0000\n"
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2017\n"
"Language-Team: Bulgarian (https://www.transifex.com/oca/teams/23907/bg/)\n"
"Language: bg\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"

#. module: crm_lead_code
#: model:ir.model.fields,field_description:crm_lead_code.field_crm_lead__code
msgid "Lead Number"
msgstr ""

#. module: crm_lead_code
#: model:ir.model,name:crm_lead_code.model_crm_lead
msgid "Lead/Opportunity"
msgstr "??????????/????????????????????"

#. module: crm_lead_code
#. odoo-python
#: code:addons/crm_lead_code/models/crm_lead.py:0
#: model:ir.model.constraint,message:crm_lead_code.constraint_crm_lead_crm_lead_unique_code
#, python-format
msgid "The code must be unique!"
msgstr ""
35 changes: 35 additions & 0 deletions crm_lead_code/i18n/ca.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_lead_code
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2022-04-13 11:05+0000\n"
"Last-Translator: Noel estudillo <noelestudilloviera@gmail.com>\n"
"Language-Team: none\n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.3.2\n"

#. module: crm_lead_code
#: model:ir.model.fields,field_description:crm_lead_code.field_crm_lead__code
msgid "Lead Number"
msgstr "Número de plom"

#. module: crm_lead_code
#: model:ir.model,name:crm_lead_code.model_crm_lead
msgid "Lead/Opportunity"
msgstr "Plom/Oportunitat"

#. module: crm_lead_code
#. odoo-python
#: code:addons/crm_lead_code/models/crm_lead.py:0
#: model:ir.model.constraint,message:crm_lead_code.constraint_crm_lead_crm_lead_unique_code
#, python-format
msgid "The code must be unique!"
msgstr "El codi ha de ser únic!"
32 changes: 32 additions & 0 deletions crm_lead_code/i18n/crm_lead_code.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_lead_code
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: crm_lead_code
#: model:ir.model.fields,field_description:crm_lead_code.field_crm_lead__code
msgid "Lead Number"
msgstr ""

#. module: crm_lead_code
#: model:ir.model,name:crm_lead_code.model_crm_lead
msgid "Lead/Opportunity"
msgstr ""

#. module: crm_lead_code
#. odoo-python
#: code:addons/crm_lead_code/models/crm_lead.py:0
#: model:ir.model.constraint,message:crm_lead_code.constraint_crm_lead_crm_lead_unique_code
#, python-format
msgid "The code must be unique!"
msgstr ""
38 changes: 38 additions & 0 deletions crm_lead_code/i18n/de.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_lead_code
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-04 15:47+0000\n"
"PO-Revision-Date: 2018-12-13 12:58+0000\n"
"Last-Translator: Maria Sparenberg <maria.sparenberg@gmx.net>\n"
"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n"
"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 3.3\n"

#. module: crm_lead_code
#: model:ir.model.fields,field_description:crm_lead_code.field_crm_lead__code
msgid "Lead Number"
msgstr "Lead-Nummer"

#. module: crm_lead_code
#: model:ir.model,name:crm_lead_code.model_crm_lead
msgid "Lead/Opportunity"
msgstr "Lead/Chance"

#. module: crm_lead_code
#. odoo-python
#: code:addons/crm_lead_code/models/crm_lead.py:0
#: model:ir.model.constraint,message:crm_lead_code.constraint_crm_lead_crm_lead_unique_code
#, python-format
msgid "The code must be unique!"
msgstr "Der Schl??ssel muss eindeutig sein!"
41 changes: 41 additions & 0 deletions crm_lead_code/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_lead_code
#
# Translators:
# OCA Transbot <transbot@odoo-community.org>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-12-04 15:47+0000\n"
"PO-Revision-Date: 2023-08-02 14:10+0000\n"
"Last-Translator: Ivorra78 <informatica@totmaterial.es>\n"
"Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: crm_lead_code
#: model:ir.model.fields,field_description:crm_lead_code.field_crm_lead__code
msgid "Lead Number"
msgstr "Número de oportunidad"

#. module: crm_lead_code
#: model:ir.model,name:crm_lead_code.model_crm_lead
msgid "Lead/Opportunity"
msgstr "Iniciativa/Oportunidad"

#. module: crm_lead_code
#. odoo-python
#: code:addons/crm_lead_code/models/crm_lead.py:0
#: model:ir.model.constraint,message:crm_lead_code.constraint_crm_lead_crm_lead_unique_code
#, python-format
msgid "The code must be unique!"
msgstr "El código debe ser único!"

#~ msgid "&amp;nbsp;"
#~ msgstr "&amp;nbsp;"
47 changes: 47 additions & 0 deletions crm_lead_code/i18n/es_AR.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_lead_code
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2023-10-29 23:38+0000\n"
"Last-Translator: Ignacio Buioli <ibuioli@gmail.com>\n"
"Language-Team: none\n"
"Language: es_AR\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 4.17\n"

#. module: crm_lead_code
#: model:ir.model.fields,field_description:crm_lead_code.field_crm_lead__code
msgid "Lead Number"
msgstr "Número de Iniciativa"

#. module: crm_lead_code
#: model:ir.model,name:crm_lead_code.model_crm_lead
msgid "Lead/Opportunity"
msgstr "Iniciativa/Oportunidad"

#. module: crm_lead_code
#. odoo-python
#: code:addons/crm_lead_code/models/crm_lead.py:0
#: model:ir.model.constraint,message:crm_lead_code.constraint_crm_lead_crm_lead_unique_code
#, python-format
msgid "The code must be unique!"
msgstr "¡El código debe ser único!"

#~ msgid "&amp;nbsp;"
#~ msgstr "&amp;nbsp;"

#~ msgid "Display Name"
#~ msgstr "Mostrar Nombre"

#~ msgid "ID"
#~ msgstr "ID"

#~ msgid "Last Modified on"
#~ msgstr "Última Modificación el"
Loading