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 47 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
47 commits
Select commit Hold shift + click to select a range
47f1e29
[ADD] New module <crm_lead_code>
oihane Jul 27, 2015
4fe32e1
[IMP] <crm_lead_code> Code made visible in opportunities
oihane Jul 28, 2015
183b726
[MIG] Make modules uninstallable
pedrobaeza Oct 14, 2015
e3fd125
[MIG] Rename manifest files
pedrobaeza Oct 6, 2016
bc64ea9
[10.0][MIG] crm_lead_code (#156)
nicolasramos Sep 26, 2017
f655c1a
OCA Transbot updated translations from Transifex
oca-transbot Dec 9, 2017
9a6fb0e
remove obsolete .pot files [ci skip]
sbidoul Jun 15, 2018
1721a9a
[UPD] Update crm_lead_code.pot
oca-travis Jun 23, 2018
4474fec
Translated using Weblate (German)
marylla Dec 12, 2018
29934b3
[MIG] crm_lead_code: Migration to 12.0
keshrath Jan 14, 2019
f641d49
Update translation files
oca-transbot Mar 3, 2019
44c69f4
Translated using Weblate (Portuguese (Brazil))
Sep 3, 2019
77736f0
[WIP][13.0][MIG] crm_lead_code
murtuzasaleh Sep 30, 2019
b9bb101
[FIX] Travis
murtuzasaleh May 5, 2020
2a830a7
Update translation files
oca-transbot Jun 20, 2020
b8ed9c0
[MIG] crm_lead_code: Migration to 14.0
newtratip Nov 6, 2020
cf6fa76
Added translation using Weblate (Spanish (Argentina))
ibuioli Feb 6, 2021
9887ce8
Translated using Weblate (Spanish (Argentina))
ibuioli Feb 6, 2021
da2281e
Translated using Weblate (Spanish)
Mat-moran Feb 11, 2021
a632134
[MIG] crm_lead_code: Migration to 15.0
santostelmo Oct 22, 2021
607ce4d
[UPD] Update crm_lead_code.pot
Oct 31, 2021
758ba1a
[UPD] README.rst
OCA-git-bot Oct 31, 2021
5fc98a5
Added translation using Weblate (Catalan)
Noel000 Feb 14, 2022
a90b5b2
Translated using Weblate (French)
ajaniszewska-dev Mar 2, 2022
e126877
Translated using Weblate (Catalan)
Noel000 Apr 13, 2022
d0933bc
Translated using Weblate (Italian)
francesco-ooops Feb 1, 2023
489fb58
[MIG] crm_lead_code: Migration to 16.0
Feb 17, 2023
7c5f194
[UPD] Update crm_lead_code.pot
Mar 8, 2023
1288568
[UPD] README.rst
OCA-git-bot Mar 8, 2023
73fdbf0
crm_lead_code 16.0.1.0.1
OCA-git-bot Mar 8, 2023
af39ad7
Update translation files
weblate Mar 8, 2023
51ef1ce
Translated using Weblate (Slovenian)
sysadminmatmoz Apr 11, 2023
6bd99f8
Translated using Weblate (Italian)
mymage Jun 12, 2023
aae1e8c
Translated using Weblate (Spanish)
Ivorra78 Aug 2, 2023
57e059d
[UPD] README.rst
OCA-git-bot Sep 3, 2023
0d9a37e
Translated using Weblate (Spanish (Argentina))
ibuioli Oct 29, 2023
8accd9e
[MIG] crm_lead_code: Migration to 17.0
peluko00 Nov 16, 2023
fcea1ff
[UPD] Update crm_lead_code.pot
Nov 24, 2023
494f13e
[BOT] post-merge updates
OCA-git-bot Nov 24, 2023
84cd1bf
Translated using Weblate (Portuguese (Brazil))
May 17, 2024
a278810
Translated using Weblate (Portuguese (Brazil))
SottomaiorMacedoTec Jul 6, 2024
15c4e59
[IMP] crm_lead_code: space get removed when other view changes name f…
CRogos Oct 11, 2024
e3fd567
[UPD] Update crm_lead_code.pot
Oct 25, 2024
c8ccb32
[BOT] post-merge updates
OCA-git-bot Oct 25, 2024
82c5b1c
Update translation files
weblate Oct 25, 2024
b560b57
[IMP] crm_lead_code: pre-commit auto fixes
HeliconiaSolutions Nov 25, 2024
427245d
[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 <[email protected]>
- Pedro M. Baeza <[email protected]>
- Ana Juaristi <[email protected]>
- Nicol??s Ramos <[email protected]>
- Mathias Markl <[email protected]>
- Serpent Consulting Services Pvt. Ltd. <[email protected]>
- Tharathip Chaweewongphan <[email protected]>
- `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 <[email protected]>, 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 <[email protected]>, 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 <[email protected]>\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 <[email protected]>, 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 <[email protected]>\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 <[email protected]>, 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 <[email protected]>\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 <[email protected]>\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