diff --git a/crm_industry/README.rst b/crm_industry/README.rst new file mode 100644 index 00000000000..acdfa263603 --- /dev/null +++ b/crm_industry/README.rst @@ -0,0 +1,85 @@ +============ +CRM Industry +============ + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:54c5b054dc20f938cbf441acc115a2363c357e6b8f1948a6e2c6850b46da24ff + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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_industry + :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_industry + :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 industries for leads and opportunities. + +**Table of contents** + +.. contents:: + :local: + +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 +- Antonio Espinosa +- Javier Iniesta +- Luis M. Ontalba +- Miquel Raïch +- Alexandre Díaz +- Manuel Marquez +- `Pesol `__: + + - Jonathan Oscategui Taza + +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_industry/__init__.py b/crm_industry/__init__.py new file mode 100644 index 00000000000..4b76c7b2d5c --- /dev/null +++ b/crm_industry/__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_industry/__manifest__.py b/crm_industry/__manifest__.py new file mode 100644 index 00000000000..aa98b14f794 --- /dev/null +++ b/crm_industry/__manifest__.py @@ -0,0 +1,15 @@ +# Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +{ + "name": "CRM Industry", + "summary": "Link leads/opportunities to industries", + "version": "18.0.1.0.0", + "category": "Customer Relationship Management", + "website": "https://github.com/OCA/crm", + "author": "Tecnativa, Odoo Community Association (OCA)", + "license": "AGPL-3", + "installable": True, + "depends": ["crm", "partner_industry_secondary"], + "data": ["views/crm_lead_view.xml"], +} diff --git a/crm_industry/i18n/bg.po b/crm_industry/i18n/bg.po new file mode 100644 index 00000000000..e1c15302563 --- /dev/null +++ b/crm_industry/i18n/bg.po @@ -0,0 +1,48 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_sector +# +# 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_industry +#: model_terms:ir.ui.view,arch_db:crm_industry.crm_lead_view_form +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_leads_filter +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_opportunities_filter +msgid "Industry" +msgstr "" + +#. module: crm_industry +#: model:ir.model,name:crm_industry.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Следа/Възможност" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__industry_id +msgid "Main Industry" +msgstr "" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__secondary_industry_ids +msgid "Secondary Industries" +msgstr "" + +#. module: crm_industry +#. odoo-python +#: code:addons/crm_industry/models/crm_lead.py:0 +#, python-format +msgid "The secondary industries must be different from the main industry." +msgstr "" diff --git a/crm_industry/i18n/ca.po b/crm_industry/i18n/ca.po new file mode 100644 index 00000000000..d70c7fda99d --- /dev/null +++ b/crm_industry/i18n/ca.po @@ -0,0 +1,47 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_industry +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-12-27 14:13+0000\n" +"Last-Translator: Carles Antoli \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 3.10\n" + +#. module: crm_industry +#: model_terms:ir.ui.view,arch_db:crm_industry.crm_lead_view_form +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_leads_filter +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_opportunities_filter +msgid "Industry" +msgstr "Indústria" + +#. module: crm_industry +#: model:ir.model,name:crm_industry.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Iniciativa/Oportunitat" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__industry_id +msgid "Main Industry" +msgstr "Indústria principal" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__secondary_industry_ids +msgid "Secondary Industries" +msgstr "Indústries secundàries" + +#. module: crm_industry +#. odoo-python +#: code:addons/crm_industry/models/crm_lead.py:0 +#, python-format +msgid "The secondary industries must be different from the main industry." +msgstr "" +"Les indústries secundàries han de ser diferents de la indústria principal." diff --git a/crm_industry/i18n/ca_ES.po b/crm_industry/i18n/ca_ES.po new file mode 100644 index 00000000000..e50ea36a91d --- /dev/null +++ b/crm_industry/i18n/ca_ES.po @@ -0,0 +1,44 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_industry +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"Last-Translator: Automatically generated\n" +"Language-Team: none\n" +"Language: ca_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" + +#. module: crm_industry +#: model_terms:ir.ui.view,arch_db:crm_industry.crm_lead_view_form +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_leads_filter +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_opportunities_filter +msgid "Industry" +msgstr "" + +#. module: crm_industry +#: model:ir.model,name:crm_industry.model_crm_lead +msgid "Lead/Opportunity" +msgstr "" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__industry_id +msgid "Main Industry" +msgstr "" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__secondary_industry_ids +msgid "Secondary Industries" +msgstr "" + +#. module: crm_industry +#. odoo-python +#: code:addons/crm_industry/models/crm_lead.py:0 +#, python-format +msgid "The secondary industries must be different from the main industry." +msgstr "" diff --git a/crm_industry/i18n/crm_industry.pot b/crm_industry/i18n/crm_industry.pot new file mode 100644 index 00000000000..466a7d039ee --- /dev/null +++ b/crm_industry/i18n/crm_industry.pot @@ -0,0 +1,43 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_industry +# +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_industry +#: model_terms:ir.ui.view,arch_db:crm_industry.crm_lead_view_form +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_leads_filter +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_opportunities_filter +msgid "Industry" +msgstr "" + +#. module: crm_industry +#: model:ir.model,name:crm_industry.model_crm_lead +msgid "Lead/Opportunity" +msgstr "" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__industry_id +msgid "Main Industry" +msgstr "" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__secondary_industry_ids +msgid "Secondary Industries" +msgstr "" + +#. module: crm_industry +#. odoo-python +#: code:addons/crm_industry/models/crm_lead.py:0 +#, python-format +msgid "The secondary industries must be different from the main industry." +msgstr "" diff --git a/crm_industry/i18n/crm_sector.pot b/crm_industry/i18n/crm_sector.pot new file mode 100644 index 00000000000..4bebf3ce9d5 --- /dev/null +++ b/crm_industry/i18n/crm_sector.pot @@ -0,0 +1,44 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_sector +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.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_sector +#: model:ir.model,name:crm_sector.model_crm_lead +msgid "Lead/Opportunity" +msgstr "" + +#. module: crm_sector +#: model:ir.model.fields,field_description:crm_sector.field_crm_lead_sector_id +msgid "Main Sector" +msgstr "" + +#. module: crm_sector +#: model:ir.model.fields,field_description:crm_sector.field_crm_lead_secondary_sector_ids +msgid "Secondary Sectors" +msgstr "" + +#. module: crm_sector +#: model:ir.ui.view,arch_db:crm_sector.crm_case_form_view_leads +#: model:ir.ui.view,arch_db:crm_sector.crm_case_form_view_oppor +#: model:ir.ui.view,arch_db:crm_sector.view_crm_case_leads_filter +#: model:ir.ui.view,arch_db:crm_sector.view_crm_case_opportunities_filter +msgid "Sector" +msgstr "" + +#. module: crm_sector +#: code:addons/crm_sector/models/crm_lead.py:22 +#, python-format +msgid "The secondary sectors must be different from the main sector." +msgstr "" + diff --git a/crm_industry/i18n/de.po b/crm_industry/i18n/de.po new file mode 100644 index 00000000000..b95334dc0ef --- /dev/null +++ b/crm_industry/i18n/de.po @@ -0,0 +1,55 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_sector +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-09 08:00+0000\n" +"PO-Revision-Date: 2018-12-15 16:58+0000\n" +"Last-Translator: Maria Sparenberg \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_industry +#: model_terms:ir.ui.view,arch_db:crm_industry.crm_lead_view_form +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_leads_filter +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_opportunities_filter +msgid "Industry" +msgstr "Branche" + +#. module: crm_industry +#: model:ir.model,name:crm_industry.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Lead/Chance" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__industry_id +msgid "Main Industry" +msgstr "Hauptbranche" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__secondary_industry_ids +msgid "Secondary Industries" +msgstr "Sekundäre Branchen" + +#. module: crm_industry +#. odoo-python +#: code:addons/crm_industry/models/crm_lead.py:0 +#, python-format +msgid "The secondary industries must be different from the main industry." +msgstr "Die Hauptbranche muss sich von den Sekundären unterscheiden." + +#~ msgid "Main Sector" +#~ msgstr "Hauptsektor" + +#~ msgid "Sector" +#~ msgstr "Sektor" diff --git a/crm_industry/i18n/es.po b/crm_industry/i18n/es.po new file mode 100644 index 00000000000..bbf603b8ba3 --- /dev/null +++ b/crm_industry/i18n/es.po @@ -0,0 +1,56 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_sector +# +# Translators: +# OCA Transbot , 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: 2019-02-04 10:50+0000\n" +"Last-Translator: Marta Vázquez Rodríguez \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 3.4\n" + +#. module: crm_industry +#: model_terms:ir.ui.view,arch_db:crm_industry.crm_lead_view_form +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_leads_filter +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_opportunities_filter +msgid "Industry" +msgstr "Industria" + +#. module: crm_industry +#: model:ir.model,name:crm_industry.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Iniciativa/Oportunidad" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__industry_id +msgid "Main Industry" +msgstr "Industria principal" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__secondary_industry_ids +msgid "Secondary Industries" +msgstr "Industrias secundarias" + +#. module: crm_industry +#. odoo-python +#: code:addons/crm_industry/models/crm_lead.py:0 +#, python-format +msgid "The secondary industries must be different from the main industry." +msgstr "" +"Las industrias secundarias deben ser distintas de la industria principal." + +#~ msgid "Main Sector" +#~ msgstr "Sector principal" + +#~ msgid "Sector" +#~ msgstr "Sector" diff --git a/crm_industry/i18n/fr.po b/crm_industry/i18n/fr.po new file mode 100644 index 00000000000..dfc62a69cf2 --- /dev/null +++ b/crm_industry/i18n/fr.po @@ -0,0 +1,57 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_sector +# +# Translators: +# OCA Transbot , 2017 +# Jes Anderson , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-10 03:36+0000\n" +"PO-Revision-Date: 2022-03-02 17:17+0000\n" +"Last-Translator: ajaniszewska-dev \n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/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" +"X-Generator: Weblate 4.3.2\n" + +#. module: crm_industry +#: model_terms:ir.ui.view,arch_db:crm_industry.crm_lead_view_form +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_leads_filter +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_opportunities_filter +msgid "Industry" +msgstr "Industrie" + +#. module: crm_industry +#: model:ir.model,name:crm_industry.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Piste/Opportunité" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__industry_id +msgid "Main Industry" +msgstr "Industrie Principale" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__secondary_industry_ids +#, fuzzy +msgid "Secondary Industries" +msgstr "Secteurs d'activité secondaires" + +#. module: crm_industry +#. odoo-python +#: code:addons/crm_industry/models/crm_lead.py:0 +#, python-format +msgid "The secondary industries must be different from the main industry." +msgstr "Les secteurs secondaires doivent être différent du secteur propre." + +#~ msgid "Main Sector" +#~ msgstr "Secteur d'activité principal" + +#~ msgid "Sector" +#~ msgstr "Secteur d'activité" diff --git a/crm_industry/i18n/hr.po b/crm_industry/i18n/hr.po new file mode 100644 index 00000000000..6280ad234c3 --- /dev/null +++ b/crm_industry/i18n/hr.po @@ -0,0 +1,56 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_sector +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-09 08:00+0000\n" +"PO-Revision-Date: 2017-06-09 08:00+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/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" + +#. module: crm_industry +#: model_terms:ir.ui.view,arch_db:crm_industry.crm_lead_view_form +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_leads_filter +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_opportunities_filter +msgid "Industry" +msgstr "" + +#. module: crm_industry +#: model:ir.model,name:crm_industry.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Potencijalni klijent" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__industry_id +msgid "Main Industry" +msgstr "" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__secondary_industry_ids +#, fuzzy +msgid "Secondary Industries" +msgstr "Sekundarni sektor" + +#. module: crm_industry +#. odoo-python +#: code:addons/crm_industry/models/crm_lead.py:0 +#, fuzzy, python-format +msgid "The secondary industries must be different from the main industry." +msgstr "Sekundarni sektor mora biti različiti od primarnog sektora." + +#~ msgid "Main Sector" +#~ msgstr "Glavni sektor" + +#~ msgid "Sector" +#~ msgstr "Sektor" diff --git a/crm_industry/i18n/it.po b/crm_industry/i18n/it.po new file mode 100644 index 00000000000..bccbcec143e --- /dev/null +++ b/crm_industry/i18n/it.po @@ -0,0 +1,55 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_sector +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-09 08:00+0000\n" +"PO-Revision-Date: 2023-06-12 16:10+0000\n" +"Last-Translator: mymage \n" +"Language-Team: Italian (https://www.transifex.com/oca/teams/23907/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 4.17\n" + +#. module: crm_industry +#: model_terms:ir.ui.view,arch_db:crm_industry.crm_lead_view_form +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_leads_filter +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_opportunities_filter +msgid "Industry" +msgstr "Settore" + +#. module: crm_industry +#: model:ir.model,name:crm_industry.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Contatto/Opportunità" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__industry_id +msgid "Main Industry" +msgstr "Settore principale" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__secondary_industry_ids +msgid "Secondary Industries" +msgstr "Settori secondari" + +#. module: crm_industry +#. odoo-python +#: code:addons/crm_industry/models/crm_lead.py:0 +#, python-format +msgid "The secondary industries must be different from the main industry." +msgstr "I settori secondari devono essere diversi da quello principale." + +#~ msgid "Main Sector" +#~ msgstr "Settore principale" + +#~ msgid "Sector" +#~ msgstr "Settore" diff --git a/crm_industry/i18n/nb.po b/crm_industry/i18n/nb.po new file mode 100644 index 00000000000..2b0dd28c598 --- /dev/null +++ b/crm_industry/i18n/nb.po @@ -0,0 +1,51 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_sector +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: crm (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-14 02:20+0000\n" +"PO-Revision-Date: 2016-03-10 18:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: Norwegian Bokmål (http://www.transifex.com/oca/OCA-crm-8-0/" +"language/nb/)\n" +"Language: nb\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_industry +#: model_terms:ir.ui.view,arch_db:crm_industry.crm_lead_view_form +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_leads_filter +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_opportunities_filter +msgid "Industry" +msgstr "" + +#. module: crm_industry +#: model:ir.model,name:crm_industry.model_crm_lead +msgid "Lead/Opportunity" +msgstr "" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__industry_id +msgid "Main Industry" +msgstr "" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__secondary_industry_ids +msgid "Secondary Industries" +msgstr "" + +#. module: crm_industry +#. odoo-python +#: code:addons/crm_industry/models/crm_lead.py:0 +#, python-format +msgid "The secondary industries must be different from the main industry." +msgstr "" + +#~ msgid "Sales Team" +#~ msgstr "Salgsteam" diff --git a/crm_industry/i18n/nl_NL.po b/crm_industry/i18n/nl_NL.po new file mode 100644 index 00000000000..5b5969b5559 --- /dev/null +++ b/crm_industry/i18n/nl_NL.po @@ -0,0 +1,56 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_sector +# +# Translators: +# Peter Hageman , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-09 08:00+0000\n" +"PO-Revision-Date: 2017-06-09 08:00+0000\n" +"Last-Translator: Peter Hageman , 2017\n" +"Language-Team: Dutch (Netherlands) (https://www.transifex.com/oca/" +"teams/23907/nl_NL/)\n" +"Language: nl_NL\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_industry +#: model_terms:ir.ui.view,arch_db:crm_industry.crm_lead_view_form +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_leads_filter +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_opportunities_filter +msgid "Industry" +msgstr "" + +#. module: crm_industry +#: model:ir.model,name:crm_industry.model_crm_lead +msgid "Lead/Opportunity" +msgstr "" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__industry_id +msgid "Main Industry" +msgstr "" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__secondary_industry_ids +#, fuzzy +msgid "Secondary Industries" +msgstr "Secundaire Sectoren" + +#. module: crm_industry +#. odoo-python +#: code:addons/crm_industry/models/crm_lead.py:0 +#, fuzzy, python-format +msgid "The secondary industries must be different from the main industry." +msgstr "De secondaire sectoren moeten verschillen van hoofd sector." + +#~ msgid "Main Sector" +#~ msgstr "Hoofd Sector" + +#~ msgid "Sector" +#~ msgstr "Sector" diff --git a/crm_industry/i18n/pt_BR.po b/crm_industry/i18n/pt_BR.po new file mode 100644 index 00000000000..33e3018a621 --- /dev/null +++ b/crm_industry/i18n/pt_BR.po @@ -0,0 +1,50 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_sector +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-09 08:00+0000\n" +"PO-Revision-Date: 2019-09-03 03:23+0000\n" +"Last-Translator: Rodrigo Macedo \n" +"Language-Team: Portuguese (Brazil) (https://www.transifex.com/oca/" +"teams/23907/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_industry +#: model_terms:ir.ui.view,arch_db:crm_industry.crm_lead_view_form +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_leads_filter +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_opportunities_filter +msgid "Industry" +msgstr "Indústria" + +#. module: crm_industry +#: model:ir.model,name:crm_industry.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Prospector/Oportunidade" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__industry_id +msgid "Main Industry" +msgstr "Indústria Principal" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__secondary_industry_ids +msgid "Secondary Industries" +msgstr "Indústrias Secundárias" + +#. module: crm_industry +#. odoo-python +#: code:addons/crm_industry/models/crm_lead.py:0 +#, python-format +msgid "The secondary industries must be different from the main industry." +msgstr "As indústrias secundárias devem ser diferentes da indústria principal." diff --git a/crm_industry/i18n/sk.po b/crm_industry/i18n/sk.po new file mode 100644 index 00000000000..ee2ec088a6f --- /dev/null +++ b/crm_industry/i18n/sk.po @@ -0,0 +1,48 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_sector +# +# 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_industry +#: model_terms:ir.ui.view,arch_db:crm_industry.crm_lead_view_form +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_leads_filter +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_opportunities_filter +msgid "Industry" +msgstr "" + +#. module: crm_industry +#: model:ir.model,name:crm_industry.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Iniciatíva/Príležitosť" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__industry_id +msgid "Main Industry" +msgstr "" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__secondary_industry_ids +msgid "Secondary Industries" +msgstr "" + +#. module: crm_industry +#. odoo-python +#: code:addons/crm_industry/models/crm_lead.py:0 +#, python-format +msgid "The secondary industries must be different from the main industry." +msgstr "" diff --git a/crm_industry/i18n/sl.po b/crm_industry/i18n/sl.po new file mode 100644 index 00000000000..3b616ee4f43 --- /dev/null +++ b/crm_industry/i18n/sl.po @@ -0,0 +1,56 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_sector +# +# Translators: +# OCA Transbot , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-09 08:00+0000\n" +"PO-Revision-Date: 2017-06-09 08:00+0000\n" +"Last-Translator: OCA Transbot , 2017\n" +"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/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_industry +#: model_terms:ir.ui.view,arch_db:crm_industry.crm_lead_view_form +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_leads_filter +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_opportunities_filter +msgid "Industry" +msgstr "" + +#. module: crm_industry +#: model:ir.model,name:crm_industry.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Indic/priložnost" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__industry_id +msgid "Main Industry" +msgstr "" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__secondary_industry_ids +#, fuzzy +msgid "Secondary Industries" +msgstr "Sekundarni sektorji" + +#. module: crm_industry +#. odoo-python +#: code:addons/crm_industry/models/crm_lead.py:0 +#, fuzzy, python-format +msgid "The secondary industries must be different from the main industry." +msgstr "Sekundarni sektorji morajo biti različni od glavnega." + +#~ msgid "Main Sector" +#~ msgstr "Glavni sektor" + +#~ msgid "Sector" +#~ msgstr "Sektor" diff --git a/crm_industry/i18n/sv.po b/crm_industry/i18n/sv.po new file mode 100644 index 00000000000..20ec09ac0d3 --- /dev/null +++ b/crm_industry/i18n/sv.po @@ -0,0 +1,52 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_sector +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: crm (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-01-14 02:20+0000\n" +"PO-Revision-Date: 2024-02-23 08:41+0000\n" +"Last-Translator: jakobkrabbe \n" +"Language-Team: Swedish (http://www.transifex.com/oca/OCA-crm-8-0/language/sv/" +")\n" +"Language: sv\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_industry +#: model_terms:ir.ui.view,arch_db:crm_industry.crm_lead_view_form +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_leads_filter +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_opportunities_filter +msgid "Industry" +msgstr "Industri" + +#. module: crm_industry +#: model:ir.model,name:crm_industry.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Ledning/Möjlighet" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__industry_id +msgid "Main Industry" +msgstr "Huvudindustri" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__secondary_industry_ids +msgid "Secondary Industries" +msgstr "Sekundära industrier" + +#. module: crm_industry +#. odoo-python +#: code:addons/crm_industry/models/crm_lead.py:0 +#, python-format +msgid "The secondary industries must be different from the main industry." +msgstr "De sekundära industrierna måste skilja sig från huvudindustrin." + +#~ msgid "Sales Team" +#~ msgstr "Försäljningsteam" diff --git a/crm_industry/i18n/tr.po b/crm_industry/i18n/tr.po new file mode 100644 index 00000000000..0e2eb98bff2 --- /dev/null +++ b/crm_industry/i18n/tr.po @@ -0,0 +1,56 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_sector +# +# Translators: +# OCA Transbot , 2017 +# Ediz Duman , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-06-10 03:36+0000\n" +"PO-Revision-Date: 2017-06-10 03:36+0000\n" +"Last-Translator: Ediz Duman , 2017\n" +"Language-Team: Turkish (https://www.transifex.com/oca/teams/23907/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_industry +#: model_terms:ir.ui.view,arch_db:crm_industry.crm_lead_view_form +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_leads_filter +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_opportunities_filter +msgid "Industry" +msgstr "" + +#. module: crm_industry +#: model:ir.model,name:crm_industry.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Aday/Fırsat" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__industry_id +msgid "Main Industry" +msgstr "" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__secondary_industry_ids +#, fuzzy +msgid "Secondary Industries" +msgstr "İkincil Sektörler" + +#. module: crm_industry +#. odoo-python +#: code:addons/crm_industry/models/crm_lead.py:0 +#, python-format +msgid "The secondary industries must be different from the main industry." +msgstr "" + +#~ msgid "Main Sector" +#~ msgstr "Ana Sektör" + +#~ msgid "Sector" +#~ msgstr "Sektör" diff --git a/crm_industry/i18n/tr_TR.po b/crm_industry/i18n/tr_TR.po new file mode 100644 index 00000000000..e5432d64d3c --- /dev/null +++ b/crm_industry/i18n/tr_TR.po @@ -0,0 +1,51 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_sector +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: crm (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-12-31 02:41+0000\n" +"PO-Revision-Date: 2016-03-10 18:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: Turkish (Turkey) (http://www.transifex.com/oca/OCA-crm-8-0/" +"language/tr_TR/)\n" +"Language: tr_TR\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_industry +#: model_terms:ir.ui.view,arch_db:crm_industry.crm_lead_view_form +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_leads_filter +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_opportunities_filter +msgid "Industry" +msgstr "" + +#. module: crm_industry +#: model:ir.model,name:crm_industry.model_crm_lead +msgid "Lead/Opportunity" +msgstr "" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__industry_id +msgid "Main Industry" +msgstr "" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__secondary_industry_ids +msgid "Secondary Industries" +msgstr "" + +#. module: crm_industry +#. odoo-python +#: code:addons/crm_industry/models/crm_lead.py:0 +#, python-format +msgid "The secondary industries must be different from the main industry." +msgstr "" + +#~ msgid "Sales Team" +#~ msgstr "Satış takımı" diff --git a/crm_industry/i18n/zh_CN.po b/crm_industry/i18n/zh_CN.po new file mode 100644 index 00000000000..019d439742c --- /dev/null +++ b/crm_industry/i18n/zh_CN.po @@ -0,0 +1,48 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_sector +# +# 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_industry +#: model_terms:ir.ui.view,arch_db:crm_industry.crm_lead_view_form +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_leads_filter +#: model_terms:ir.ui.view,arch_db:crm_industry.view_crm_case_opportunities_filter +msgid "Industry" +msgstr "" + +#. module: crm_industry +#: model:ir.model,name:crm_industry.model_crm_lead +msgid "Lead/Opportunity" +msgstr "线索/商机" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__industry_id +msgid "Main Industry" +msgstr "" + +#. module: crm_industry +#: model:ir.model.fields,field_description:crm_industry.field_crm_lead__secondary_industry_ids +msgid "Secondary Industries" +msgstr "" + +#. module: crm_industry +#. odoo-python +#: code:addons/crm_industry/models/crm_lead.py:0 +#, python-format +msgid "The secondary industries must be different from the main industry." +msgstr "" diff --git a/crm_industry/models/__init__.py b/crm_industry/models/__init__.py new file mode 100644 index 00000000000..f11a18fc4e9 --- /dev/null +++ b/crm_industry/models/__init__.py @@ -0,0 +1,3 @@ +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from . import crm_lead diff --git a/crm_industry/models/crm_lead.py b/crm_industry/models/crm_lead.py new file mode 100644 index 00000000000..9892c54a407 --- /dev/null +++ b/crm_industry/models/crm_lead.py @@ -0,0 +1,70 @@ +# Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta +# Copyright 2018 ForgeFlow, S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). +from odoo import _, api, exceptions, fields, models + + +class CrmLead(models.Model): + _inherit = "crm.lead" + + industry_id = fields.Many2one( + comodel_name="res.partner.industry", string="Main Industry" + ) + + secondary_industry_ids = fields.Many2many( + comodel_name="res.partner.industry", + string="Secondary Industries", + domain="[('id', '!=', industry_id)]", + ) + + @api.constrains("industry_id", "secondary_industry_ids") + def _check_industries(self): + for lead in self: + if lead.industry_id in lead.secondary_industry_ids: + raise exceptions.UserError( + _( + "The secondary industries must be different from the" + " main industry." + ) + ) + + def _prepare_customer_values(self, partner_name, is_company=False, parent_id=False): + """Propagate industries in the creation of partner.""" + values = super()._prepare_customer_values( + partner_name, is_company=is_company, parent_id=parent_id + ) + main, secondary = self.industry_id, self.secondary_industry_ids + values.update( + { + "industry_id": main.id, + "secondary_industry_ids": [(6, 0, secondary.ids)], + } + ) + return values + + @api.onchange("partner_id") + def _onchange_partner_id(self): + if self.partner_id: + if self.partner_id.industry_id: + self.industry_id = self.partner_id.industry_id + if self.partner_id.secondary_industry_ids: + self.secondary_industry_ids = self.partner_id.secondary_industry_ids + + @api.model_create_multi + def create(self, vals_list): + for vals in vals_list: + if vals.get("partner_id"): + customer = self.env["res.partner"].browse(vals["partner_id"]) + if customer.industry_id and not vals.get("industry_id"): + vals.update({"industry_id": customer.industry_id.id}) + if customer.secondary_industry_ids and not vals.get( + "secondary_industry_ids" + ): + vals.update( + { + "secondary_industry_ids": [ + (6, 0, customer.secondary_industry_ids.ids) + ] + } + ) + return super().create(vals_list) diff --git a/crm_industry/pyproject.toml b/crm_industry/pyproject.toml new file mode 100644 index 00000000000..4231d0cccb3 --- /dev/null +++ b/crm_industry/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["whool"] +build-backend = "whool.buildapi" diff --git a/crm_industry/readme/CONTRIBUTORS.md b/crm_industry/readme/CONTRIBUTORS.md new file mode 100644 index 00000000000..a62c65e0347 --- /dev/null +++ b/crm_industry/readme/CONTRIBUTORS.md @@ -0,0 +1,9 @@ +- Rafael Blasco \<\> +- Antonio Espinosa \<\> +- Javier Iniesta \<\> +- Luis M. Ontalba \<\> +- Miquel Raïch \<\> +- Alexandre Díaz \<\> +- Manuel Marquez \<\> +- [Pesol](https://www.pesol.es): + - Jonathan Oscategui Taza \<\> diff --git a/crm_industry/readme/DESCRIPTION.md b/crm_industry/readme/DESCRIPTION.md new file mode 100644 index 00000000000..9747843923e --- /dev/null +++ b/crm_industry/readme/DESCRIPTION.md @@ -0,0 +1 @@ +This module adds industries for leads and opportunities. diff --git a/crm_industry/static/description/icon.png b/crm_industry/static/description/icon.png new file mode 100644 index 00000000000..3a0328b516c Binary files /dev/null and b/crm_industry/static/description/icon.png differ diff --git a/crm_industry/static/description/index.html b/crm_industry/static/description/index.html new file mode 100644 index 00000000000..1765fbd5057 --- /dev/null +++ b/crm_industry/static/description/index.html @@ -0,0 +1,433 @@ + + + + + +CRM Industry + + + +
+

CRM Industry

+ + +

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

+

This module adds industries for leads and opportunities.

+

Table of contents

+ +
+

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_industry/tests/__init__.py b/crm_industry/tests/__init__.py new file mode 100644 index 00000000000..dc2e6c04d0c --- /dev/null +++ b/crm_industry/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_industry/tests/test_crm_lead.py b/crm_industry/tests/test_crm_lead.py new file mode 100644 index 00000000000..a4bce3f15d6 --- /dev/null +++ b/crm_industry/tests/test_crm_lead.py @@ -0,0 +1,68 @@ +# Copyright 2015 Antiun Ingenieria S.L. - Javier Iniesta +# Copyright 2018 ForgeFlow, S.L. +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + +from odoo.exceptions import UserError +from odoo.tests import Form +from odoo.tests.common import TransactionCase + + +class TestCrmLead(TransactionCase): + def test_check_industries(self): + industry = self.env["res.partner.industry"].create({"name": "Test"}) + with self.assertRaises(UserError): + self.env["crm.lead"].create( + { + "name": "Test", + "industry_id": industry.id, + "secondary_industry_ids": [(4, industry.id)], + } + ) + + def test_lead_create_contact(self): + industry_pool = self.env["res.partner.industry"] + industry_1 = industry_pool.create({"name": "Test 01"}) + industry_2 = industry_pool.create( + {"name": "Test 02", "parent_id": industry_1.id} + ) + industry_3 = industry_pool.create( + {"name": "Test 03", "parent_id": industry_1.id} + ) + lead_vals = { + "name": "test", + "partner_name": "test", + "industry_id": industry_1.id, + "secondary_industry_ids": [(4, industry_2.id, 0), (4, industry_3.id, 0)], + } + lead = self.env["crm.lead"].create(lead_vals) + partner = self.env["res.partner"].create( + lead._prepare_customer_values(lead.partner_name, is_company=True) + ) + self.assertEqual(partner.industry_id, lead.industry_id) + self.assertEqual(partner.secondary_industry_ids, lead.secondary_industry_ids) + + def test_propagate_industries_from_contact(self): + res_partner_industry = self.env["res.partner.industry"] + industry_1 = res_partner_industry.create({"name": "IT/Communications"}) + industry_2 = res_partner_industry.create( + {"name": "AI/Machine Learning", "parent_id": industry_1.id} + ) + industry_3 = res_partner_industry.create( + {"name": "ERP Systems", "parent_id": industry_1.id} + ) + customer = self.env["res.partner"].create( + { + "name": "Test Customer", + "industry_id": industry_1.id, + "secondary_industry_ids": [ + (4, industry_2.id, 0), + (4, industry_3.id, 0), + ], + } + ) + lead_form = Form(self.env["crm.lead"]) + lead_form.name = "Test Lead" + lead_form.partner_id = customer + lead = lead_form.save() + self.assertEqual(lead.industry_id, customer.industry_id) + self.assertEqual(lead.secondary_industry_ids, customer.secondary_industry_ids) diff --git a/crm_industry/views/crm_lead_view.xml b/crm_industry/views/crm_lead_view.xml new file mode 100644 index 00000000000..1659fbfbf7a --- /dev/null +++ b/crm_industry/views/crm_lead_view.xml @@ -0,0 +1,80 @@ + + + + + Add industry field + crm.lead + + + + + + + + + + + + Add industry field as tree column + crm.lead + + + + + + + + + Add industry field for searching and grouping + crm.lead + + + + + + + + + + + + Add industry field as tree column + crm.lead + + + + + + + + + Add industry field for searching and grouping + crm.lead + + + + + + + + + + + diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 00000000000..6d8969f53db --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1 @@ +odoo-addon-partner_industry_secondary @ git+https://github.com/OCA/partner-contact.git@refs/pull/1896/head#subdirectory=partner_industry_secondary