diff --git a/crm_lead_firstname/README.rst b/crm_lead_firstname/README.rst new file mode 100644 index 00000000000..530cde72d40 --- /dev/null +++ b/crm_lead_firstname/README.rst @@ -0,0 +1,109 @@ +=============================== +Firstname and Lastname in Leads +=============================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:d89299b802331ab36ebfb460f5956c82da92a8f9dc525a3a1e864dc20be898bb + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/17.0/crm_lead_firstname + :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_firstname + :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 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +This module extends the functionality of CRM leads to support split +first and last name fields for contacts and allow you to port that +information to and from partners. Since leads are expected to create +partners only when needed and after information is correctly set up, in +leads there is no inverse logic to transform the old single name in the +new split names automatically. The old single name will simply be the +firstname now. + +**Table of contents** + +.. contents:: + :local: + +Installation +============ + +To install this module, you need to: + +- Install + `OCA/partner-contact `__ + repo. + +Usage +===== + +To use this module, you need to: + +- Go to *CRM > Leads > Leads > Create*. +- You have the new split fields *Firstname* and *Lastname*. Fill them. +- Press *Convert to Opportunity*. +- In *Related Customer* choose *Create a new customer*. +- Press *Create Opportunity*. +- In the new opportunity, go to *Followup* tab. There are the new + fields too. +- If you go to the partner you just created, you will see that its + first and last names match those in the lead. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Tecnativa + +Contributors +------------ + +- Rafael Blasco +- Jairo Llopis +- Raf Ven +- Nikos Tsirintanis + +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 `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/crm_lead_firstname/__init__.py b/crm_lead_firstname/__init__.py new file mode 100644 index 00000000000..4b76c7b2d5c --- /dev/null +++ b/crm_lead_firstname/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from . import models diff --git a/crm_lead_firstname/__manifest__.py b/crm_lead_firstname/__manifest__.py new file mode 100644 index 00000000000..5b19b824711 --- /dev/null +++ b/crm_lead_firstname/__manifest__.py @@ -0,0 +1,16 @@ +# Copyright 2016 Antiun Ingeniería S.L. - Jairo Llopis +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +{ + "name": "Firstname and Lastname in Leads", + "summary": "Specify split names for contacts in leads", + "version": "17.0.1.0.0", + "category": "Customer Relationship Management", + "website": "https://github.com/OCA/crm", + "author": "Tecnativa, Odoo Community Association (OCA)", + "license": "AGPL-3", + "application": False, + "installable": True, + "depends": ["crm", "partner_firstname"], + "data": ["views/crm_lead_view.xml"], +} diff --git a/crm_lead_firstname/i18n/bg.po b/crm_lead_firstname/i18n/bg.po new file mode 100644 index 00000000000..4df40756074 --- /dev/null +++ b/crm_lead_firstname/i18n/bg.po @@ -0,0 +1,49 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_firstname +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: crm (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-02 14:15+0000\n" +"PO-Revision-Date: 2016-03-10 18:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: Bulgarian (http://www.transifex.com/oca/OCA-crm-8-0/language/" +"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_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Contact Name" +msgstr "" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_name +msgid "First name" +msgstr "" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Firstname" +msgstr "" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_lastname +msgid "Last name" +msgstr "" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Lastname" +msgstr "" + +#. module: crm_lead_firstname +#: model:ir.model,name:crm_lead_firstname.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Следа/Възможност" diff --git a/crm_lead_firstname/i18n/crm_lead_firstname.pot b/crm_lead_firstname/i18n/crm_lead_firstname.pot new file mode 100644 index 00000000000..7d79ee4ff60 --- /dev/null +++ b/crm_lead_firstname/i18n/crm_lead_firstname.pot @@ -0,0 +1,44 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_firstname +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 16.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_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Contact Name" +msgstr "" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_name +msgid "First name" +msgstr "" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Firstname" +msgstr "" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_lastname +msgid "Last name" +msgstr "" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Lastname" +msgstr "" + +#. module: crm_lead_firstname +#: model:ir.model,name:crm_lead_firstname.model_crm_lead +msgid "Lead/Opportunity" +msgstr "" diff --git a/crm_lead_firstname/i18n/de.po b/crm_lead_firstname/i18n/de.po new file mode 100644 index 00000000000..718932224a9 --- /dev/null +++ b/crm_lead_firstname/i18n/de.po @@ -0,0 +1,51 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_firstname +# +# Translators: +# Rudolf Schnapka , 2017 +msgid "" +msgstr "" +"Project-Id-Version: crm (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-03-28 02:25+0000\n" +"PO-Revision-Date: 2019-06-28 13:42+0000\n" +"Last-Translator: Maria Sparenberg \n" +"Language-Team: German (http://www.transifex.com/oca/OCA-crm-8-0/language/" +"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.6.1\n" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Contact Name" +msgstr "Ansprechpartner" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_name +msgid "First name" +msgstr "Vorname" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Firstname" +msgstr "Vorname" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_lastname +msgid "Last name" +msgstr "Nachname" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Lastname" +msgstr "Nachname" + +#. module: crm_lead_firstname +#: model:ir.model,name:crm_lead_firstname.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Lead/Chance" diff --git a/crm_lead_firstname/i18n/es.po b/crm_lead_firstname/i18n/es.po new file mode 100644 index 00000000000..e2ae4923668 --- /dev/null +++ b/crm_lead_firstname/i18n/es.po @@ -0,0 +1,48 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_firstname +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-02-15 17:25+0000\n" +"PO-Revision-Date: 2023-06-06 14:10+0000\n" +"Last-Translator: luis-ron \n" +"Language-Team: \n" +"Language: es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.17\n" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Contact Name" +msgstr "Nombre del contacto" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_name +msgid "First name" +msgstr "Nombre" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Firstname" +msgstr "Nombre de pila" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_lastname +msgid "Last name" +msgstr "Apellido" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Lastname" +msgstr "Apellido" + +#. module: crm_lead_firstname +#: model:ir.model,name:crm_lead_firstname.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Iniciativa/Oportunidad" diff --git a/crm_lead_firstname/i18n/es_AR.po b/crm_lead_firstname/i18n/es_AR.po new file mode 100644 index 00000000000..03af6dbb394 --- /dev/null +++ b/crm_lead_firstname/i18n/es_AR.po @@ -0,0 +1,56 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_firstname +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2021-02-06 20:44+0000\n" +"Last-Translator: Ignacio Buioli \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.3.2\n" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Contact Name" +msgstr "Nombre del Contacto" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_name +msgid "First name" +msgstr "Primer nombre" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Firstname" +msgstr "Primer nombre" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_lastname +msgid "Last name" +msgstr "Apellido" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Lastname" +msgstr "Apellido" + +#. module: crm_lead_firstname +#: model:ir.model,name:crm_lead_firstname.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Iniciativa/Oportunidad" + +#~ msgid "Display Name" +#~ msgstr "Mostrar Nombre" + +#~ msgid "ID" +#~ msgstr "ID" + +#~ msgid "Last Modified on" +#~ msgstr "Última Modificación el" diff --git a/crm_lead_firstname/i18n/fr.po b/crm_lead_firstname/i18n/fr.po new file mode 100644 index 00000000000..b14a507c467 --- /dev/null +++ b/crm_lead_firstname/i18n/fr.po @@ -0,0 +1,49 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_firstname +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: crm (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-03-10 18:52+0000\n" +"PO-Revision-Date: 2016-03-10 18:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: French (http://www.transifex.com/oca/OCA-crm-8-0/language/" +"fr/)\n" +"Language: fr\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_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Contact Name" +msgstr "" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_name +msgid "First name" +msgstr "" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Firstname" +msgstr "" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_lastname +msgid "Last name" +msgstr "" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Lastname" +msgstr "" + +#. module: crm_lead_firstname +#: model:ir.model,name:crm_lead_firstname.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Piste/Opportunité" diff --git a/crm_lead_firstname/i18n/fr_CH.po b/crm_lead_firstname/i18n/fr_CH.po new file mode 100644 index 00000000000..9fa5021d6af --- /dev/null +++ b/crm_lead_firstname/i18n/fr_CH.po @@ -0,0 +1,50 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_firstname +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: crm (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-11-26 06:47+0000\n" +"PO-Revision-Date: 2016-03-10 18:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: French (Switzerland) (http://www.transifex.com/oca/OCA-" +"crm-8-0/language/fr_CH/)\n" +"Language: fr_CH\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_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Contact Name" +msgstr "" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_name +#, fuzzy +msgid "First name" +msgstr "Nom de famille" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Firstname" +msgstr "" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_lastname +msgid "Last name" +msgstr "Nom de famille" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Lastname" +msgstr "" + +#. module: crm_lead_firstname +#: model:ir.model,name:crm_lead_firstname.model_crm_lead +msgid "Lead/Opportunity" +msgstr "" diff --git a/crm_lead_firstname/i18n/hr.po b/crm_lead_firstname/i18n/hr.po new file mode 100644 index 00000000000..ec15d1197a0 --- /dev/null +++ b/crm_lead_firstname/i18n/hr.po @@ -0,0 +1,52 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_firstname +# +# Translators: +# Ana-Maria Olujić , 2016 +msgid "" +msgstr "" +"Project-Id-Version: crm (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-08-15 00:49+0000\n" +"PO-Revision-Date: 2019-11-13 15:34+0000\n" +"Last-Translator: Bole \n" +"Language-Team: Croatian (http://www.transifex.com/oca/OCA-crm-8-0/language/" +"hr/)\n" +"Language: hr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" +"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" +"X-Generator: Weblate 3.8\n" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Contact Name" +msgstr "Ime kontakta" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_name +msgid "First name" +msgstr "Ime" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Firstname" +msgstr "Ime" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_lastname +msgid "Last name" +msgstr "Prezime" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Lastname" +msgstr "Prezime" + +#. module: crm_lead_firstname +#: model:ir.model,name:crm_lead_firstname.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Potencijalni klijent" diff --git a/crm_lead_firstname/i18n/it.po b/crm_lead_firstname/i18n/it.po new file mode 100644 index 00000000000..8ac9690be28 --- /dev/null +++ b/crm_lead_firstname/i18n/it.po @@ -0,0 +1,52 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_firstname +# +# Translators: +# Paolo Valier, 2016 +# Paolo Valier, 2016 +msgid "" +msgstr "" +"Project-Id-Version: crm (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-04-16 11:11+0000\n" +"PO-Revision-Date: 2020-01-08 19:13+0000\n" +"Last-Translator: Sergio Zanchetta \n" +"Language-Team: Italian (http://www.transifex.com/oca/OCA-crm-8-0/language/" +"it/)\n" +"Language: it\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.10\n" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Contact Name" +msgstr "Nome contatto" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_name +msgid "First name" +msgstr "Nome" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Firstname" +msgstr "Nome" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_lastname +msgid "Last name" +msgstr "Cognome" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Lastname" +msgstr "Cognome" + +#. module: crm_lead_firstname +#: model:ir.model,name:crm_lead_firstname.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Contatto/Opportunità" diff --git a/crm_lead_firstname/i18n/pt_BR.po b/crm_lead_firstname/i18n/pt_BR.po new file mode 100644 index 00000000000..50a5a98cd74 --- /dev/null +++ b/crm_lead_firstname/i18n/pt_BR.po @@ -0,0 +1,50 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_firstname +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: crm (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-03-26 09:38+0000\n" +"PO-Revision-Date: 2019-09-03 03:23+0000\n" +"Last-Translator: Rodrigo Macedo \n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-crm-8-0/" +"language/pt_BR/)\n" +"Language: pt_BR\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.8\n" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Contact Name" +msgstr "Nome de Contato" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_name +msgid "First name" +msgstr "Primeiro Nome" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Firstname" +msgstr "Primeironome" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_lastname +msgid "Last name" +msgstr "Último Nome" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Lastname" +msgstr "Sobrenome" + +#. module: crm_lead_firstname +#: model:ir.model,name:crm_lead_firstname.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Prospector/Oportunidade" diff --git a/crm_lead_firstname/i18n/sk.po b/crm_lead_firstname/i18n/sk.po new file mode 100644 index 00000000000..3491cab5348 --- /dev/null +++ b/crm_lead_firstname/i18n/sk.po @@ -0,0 +1,49 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_firstname +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: crm (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-17 01:26+0000\n" +"PO-Revision-Date: 2016-03-10 18:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: Slovak (http://www.transifex.com/oca/OCA-crm-8-0/language/" +"sk/)\n" +"Language: sk\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Contact Name" +msgstr "" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_name +msgid "First name" +msgstr "" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Firstname" +msgstr "" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_lastname +msgid "Last name" +msgstr "" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Lastname" +msgstr "" + +#. module: crm_lead_firstname +#: model:ir.model,name:crm_lead_firstname.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Iniciatíva/Príležitosť" diff --git a/crm_lead_firstname/i18n/sl.po b/crm_lead_firstname/i18n/sl.po new file mode 100644 index 00000000000..190f5bf2780 --- /dev/null +++ b/crm_lead_firstname/i18n/sl.po @@ -0,0 +1,52 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_firstname +# +# Translators: +# Matjaž Mozetič , 2016 +msgid "" +msgstr "" +"Project-Id-Version: crm (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-03-10 18:52+0000\n" +"PO-Revision-Date: 2016-03-11 10:40+0000\n" +"Last-Translator: Matjaž Mozetič \n" +"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-crm-8-0/language/" +"sl/)\n" +"Language: sl\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n" +"%100==4 ? 2 : 3);\n" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Contact Name" +msgstr "Naziv stika" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_name +#, fuzzy +msgid "First name" +msgstr "Ime" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Firstname" +msgstr "Ime" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_lastname +msgid "Last name" +msgstr "Priimek" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Lastname" +msgstr "Priimek" + +#. module: crm_lead_firstname +#: model:ir.model,name:crm_lead_firstname.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Indic/priložnost" diff --git a/crm_lead_firstname/i18n/tr.po b/crm_lead_firstname/i18n/tr.po new file mode 100644 index 00000000000..0e56641d982 --- /dev/null +++ b/crm_lead_firstname/i18n/tr.po @@ -0,0 +1,50 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_firstname +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: crm (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-24 01:15+0000\n" +"PO-Revision-Date: 2016-03-10 18:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: Turkish (http://www.transifex.com/oca/OCA-crm-8-0/language/" +"tr/)\n" +"Language: tr\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_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Contact Name" +msgstr "" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_name +#, fuzzy +msgid "First name" +msgstr "Soyadı" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Firstname" +msgstr "" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_lastname +msgid "Last name" +msgstr "Soyadı" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Lastname" +msgstr "" + +#. module: crm_lead_firstname +#: model:ir.model,name:crm_lead_firstname.model_crm_lead +msgid "Lead/Opportunity" +msgstr "" diff --git a/crm_lead_firstname/i18n/zh_CN.po b/crm_lead_firstname/i18n/zh_CN.po new file mode 100644 index 00000000000..45a03aa6fb3 --- /dev/null +++ b/crm_lead_firstname/i18n/zh_CN.po @@ -0,0 +1,49 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_firstname +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: crm (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-25 01:51+0000\n" +"PO-Revision-Date: 2016-03-10 18:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: Chinese (China) (http://www.transifex.com/oca/OCA-crm-8-0/" +"language/zh_CN/)\n" +"Language: zh_CN\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Contact Name" +msgstr "" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_name +msgid "First name" +msgstr "" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Firstname" +msgstr "" + +#. module: crm_lead_firstname +#: model:ir.model.fields,field_description:crm_lead_firstname.field_crm_lead__contact_lastname +msgid "Last name" +msgstr "" + +#. module: crm_lead_firstname +#: model_terms:ir.ui.view,arch_db:crm_lead_firstname.crm_lead_view_form +msgid "Lastname" +msgstr "" + +#. module: crm_lead_firstname +#: model:ir.model,name:crm_lead_firstname.model_crm_lead +msgid "Lead/Opportunity" +msgstr "线索/商机" diff --git a/crm_lead_firstname/models/__init__.py b/crm_lead_firstname/models/__init__.py new file mode 100644 index 00000000000..195bee42544 --- /dev/null +++ b/crm_lead_firstname/models/__init__.py @@ -0,0 +1,2 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from . import crm_lead diff --git a/crm_lead_firstname/models/crm_lead.py b/crm_lead_firstname/models/crm_lead.py new file mode 100644 index 00000000000..8cf7862c53d --- /dev/null +++ b/crm_lead_firstname/models/crm_lead.py @@ -0,0 +1,54 @@ +# Copyright 2016 Antiun Ingeniería S.L. - Jairo Llopis +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class CrmLead(models.Model): + _inherit = "crm.lead" + + contact_name = fields.Char("First name") + contact_lastname = fields.Char("Last name") + + def _prepare_customer_values(self, partner_name, is_company, parent_id=False): + """Ensure first and last names of contact match those in lead.""" + lead_partner_data = super()._prepare_customer_values( + partner_name, is_company, parent_id + ) + if not is_company: + if self.contact_name: + lead_partner_data.update({"firstname": self.contact_name}) + if "name" in lead_partner_data: + del lead_partner_data["name"] + if self.contact_lastname: + lead_partner_data.update({"lastname": self.contact_lastname}) + if "name" in lead_partner_data: + del lead_partner_data["name"] + return lead_partner_data + + def _prepare_values_from_partner(self, partner): + """Recover first and last names from partner if available.""" + result = super()._prepare_values_from_partner(partner) + + if partner: + if not partner.is_company: + result.update( + { + "contact_name": partner.firstname, + "contact_lastname": partner.lastname, + } + ) + + return self._convert_to_write(result) + + def _prepare_contact_name_from_partner(self, partner): + result = super()._prepare_contact_name_from_partner(partner) + contact_name = False if partner.is_company else partner.firstname + contact_lastname = False if partner.is_company else partner.lastname + result.update( + { + "contact_name": contact_name or self.contact_name, + "contact_lastname": contact_lastname or self.contact_lastname, + } + ) + return result diff --git a/crm_lead_firstname/pyproject.toml b/crm_lead_firstname/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/crm_lead_firstname/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/crm_lead_firstname/readme/CONTRIBUTORS.md b/crm_lead_firstname/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..d5d6d2c16f0 --- /dev/null +++ b/crm_lead_firstname/readme/CONTRIBUTORS.md @@ -0,0 +1,4 @@ +- Rafael Blasco +- Jairo Llopis +- Raf Ven \<\> +- Nikos Tsirintanis \<\> diff --git a/crm_lead_firstname/readme/DESCRIPTION.md b/crm_lead_firstname/readme/DESCRIPTION.md new file mode 100644 index 00000000000..639f371cb1b --- /dev/null +++ b/crm_lead_firstname/readme/DESCRIPTION.md @@ -0,0 +1,7 @@ +This module extends the functionality of CRM leads to support split +first and last name fields for contacts and allow you to port that +information to and from partners. Since leads are expected to create +partners only when needed and after information is correctly set up, in +leads there is no inverse logic to transform the old single name in the +new split names automatically. The old single name will simply be the +firstname now. diff --git a/crm_lead_firstname/readme/INSTALL.md b/crm_lead_firstname/readme/INSTALL.md new file mode 100644 index 00000000000..582af6c75be --- /dev/null +++ b/crm_lead_firstname/readme/INSTALL.md @@ -0,0 +1,4 @@ +To install this module, you need to: + +- Install [OCA/partner-contact](https://github.com/OCA/partner-contact) + repo. diff --git a/crm_lead_firstname/readme/USAGE.md b/crm_lead_firstname/readme/USAGE.md new file mode 100644 index 00000000000..4353a839298 --- /dev/null +++ b/crm_lead_firstname/readme/USAGE.md @@ -0,0 +1,11 @@ +To use this module, you need to: + +- Go to *CRM \> Leads \> Leads \> Create*. +- You have the new split fields *Firstname* and *Lastname*. Fill them. +- Press *Convert to Opportunity*. +- In *Related Customer* choose *Create a new customer*. +- Press *Create Opportunity*. +- In the new opportunity, go to *Followup* tab. There are the new fields + too. +- If you go to the partner you just created, you will see that its first + and last names match those in the lead. diff --git a/crm_lead_firstname/static/description/icon.png b/crm_lead_firstname/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/crm_lead_firstname/static/description/icon.png differ diff --git a/crm_lead_firstname/static/description/index.html b/crm_lead_firstname/static/description/index.html new file mode 100644 index 00000000000..8db2afa1cf0 --- /dev/null +++ b/crm_lead_firstname/static/description/index.html @@ -0,0 +1,456 @@ + + + + + + +Firstname and Lastname in Leads + + + +
+

Firstname and Lastname in Leads

+ + +

Beta License: AGPL-3 OCA/crm Translate me on Weblate Try me on Runboat

+

This module extends the functionality of CRM leads to support split +first and last name fields for contacts and allow you to port that +information to and from partners. Since leads are expected to create +partners only when needed and after information is correctly set up, in +leads there is no inverse logic to transform the old single name in the +new split names automatically. The old single name will simply be the +firstname now.

+

Table of contents

+ +
+

Installation

+

To install this module, you need to:

+ +
+
+

Usage

+

To use this module, you need to:

+
    +
  • Go to CRM > Leads > Leads > Create.
  • +
  • You have the new split fields Firstname and Lastname. Fill them.
  • +
  • Press Convert to Opportunity.
  • +
  • In Related Customer choose Create a new customer.
  • +
  • Press Create Opportunity.
  • +
  • In the new opportunity, go to Followup tab. There are the new +fields too.
  • +
  • If you go to the partner you just created, you will see that its +first and last names match those in the lead.
  • +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub 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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Tecnativa
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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 project on GitHub.

+

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

+
+
+
+ + diff --git a/crm_lead_firstname/tests/__init__.py b/crm_lead_firstname/tests/__init__.py new file mode 100644 index 00000000000..dc2e6c04d0c --- /dev/null +++ b/crm_lead_firstname/tests/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from . import test_crm_lead diff --git a/crm_lead_firstname/tests/test_crm_lead.py b/crm_lead_firstname/tests/test_crm_lead.py new file mode 100644 index 00000000000..b1b4026c585 --- /dev/null +++ b/crm_lead_firstname/tests/test_crm_lead.py @@ -0,0 +1,45 @@ +# Copyright 2016 Antiun Ingeniería S.L. - Jairo Llopis +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo.tests.common import Form, TransactionCase + + +class FirstNameCase(TransactionCase): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.env = cls.env(context=dict(cls.env.context, tracking_disable=True)) + cls.lead_model = cls.env["crm.lead"] + cls.partner_model = cls.env["res.partner"] + cls.lead = cls.lead_model.create( + { + "name": "Léad", + "partner_name": "Pärtner", + "contact_name": "Firçt name", + "contact_lastname": "Laçt name", + } + ) + cls.partner = cls.partner_model.create( + {"firstname": "Firçt name", "lastname": "Laçt name"} + ) + + def test_create_contact(self): + """Contact correctly created.""" + self.lead._handle_partner_assignment() + partner = self.partner_model.browse(self.lead.partner_id.id) + self.assertEqual(self.lead.contact_name, partner.firstname) + self.assertEqual(self.lead.contact_lastname, partner.lastname) + + def test_create_contact_empty(self): + """No problems creating a contact without names.""" + self.lead.write({"contact_name": False, "contact_lastname": False}) + self.lead._handle_partner_assignment() + + def test_onchange_partner(self): + """When changing partner, fields get correctly updated.""" + with Form(self.env["crm.lead"], view="crm.crm_lead_view_form") as lead_form: + lead_form.partner_id = self.partner + lead_form.name = self.partner.name + lead_form.save() + self.assertEqual(self.partner.firstname, lead_form.contact_name) + self.assertEqual(self.partner.lastname, lead_form.contact_lastname) diff --git a/crm_lead_firstname/views/crm_lead_view.xml b/crm_lead_firstname/views/crm_lead_view.xml new file mode 100644 index 00000000000..b7a5ebe95ef --- /dev/null +++ b/crm_lead_firstname/views/crm_lead_view.xml @@ -0,0 +1,48 @@ + + + + + Add firstname and lastname + crm.lead + + + + Contact Name + + + Firstname + + + + + + Contact Name + + + Firstname + + + + + + + + + crm.lead + + + + + + +