From 5f56e85a97b95e2ddd3d5af5ff4130ec81d7da38 Mon Sep 17 00:00:00 2001 From: Ivorra78 Date: Wed, 2 Aug 2023 11:35:23 +0000 Subject: [PATCH 01/20] Translated using Weblate (Spanish) Currently translated at 100.0% (4 of 4 strings) Translation: crm-16.0/crm-16.0-crm_lead_code Translate-URL: https://translation.odoo-community.org/projects/crm-16-0/crm-16-0-crm_lead_code/es/ --- crm_lead_code/i18n/es.po | 8 +-- crm_lead_vat/README.rst | 63 +++++++++++++++++++++++ crm_lead_vat/__init__.py | 5 ++ crm_lead_vat/__openerp__.py | 20 +++++++ crm_lead_vat/i18n/bg.po | 34 ++++++++++++ crm_lead_vat/i18n/crm_lead_vat.pot | 22 ++++++++ crm_lead_vat/i18n/de.po | 35 +++++++++++++ crm_lead_vat/i18n/es.po | 35 +++++++++++++ crm_lead_vat/i18n/fr.po | 34 ++++++++++++ crm_lead_vat/i18n/hr.po | 35 +++++++++++++ crm_lead_vat/i18n/it.po | 34 ++++++++++++ crm_lead_vat/i18n/pt_BR.po | 34 ++++++++++++ crm_lead_vat/i18n/sk.po | 34 ++++++++++++ crm_lead_vat/i18n/sl.po | 35 +++++++++++++ crm_lead_vat/i18n/zh_CN.po | 34 ++++++++++++ crm_lead_vat/models.py | 30 +++++++++++ crm_lead_vat/static/description/icon.png | Bin 0 -> 9455 bytes crm_lead_vat/tests/__init__.py | 5 ++ crm_lead_vat/tests/test_lead.py | 29 +++++++++++ crm_lead_vat/views/crm_lead.xml | 32 ++++++++++++ crm_phonecall/i18n/es.po | 7 ++- 21 files changed, 557 insertions(+), 8 deletions(-) create mode 100644 crm_lead_vat/README.rst create mode 100644 crm_lead_vat/__init__.py create mode 100644 crm_lead_vat/__openerp__.py create mode 100644 crm_lead_vat/i18n/bg.po create mode 100644 crm_lead_vat/i18n/crm_lead_vat.pot create mode 100644 crm_lead_vat/i18n/de.po create mode 100644 crm_lead_vat/i18n/es.po create mode 100644 crm_lead_vat/i18n/fr.po create mode 100644 crm_lead_vat/i18n/hr.po create mode 100644 crm_lead_vat/i18n/it.po create mode 100644 crm_lead_vat/i18n/pt_BR.po create mode 100644 crm_lead_vat/i18n/sk.po create mode 100644 crm_lead_vat/i18n/sl.po create mode 100644 crm_lead_vat/i18n/zh_CN.po create mode 100644 crm_lead_vat/models.py create mode 100644 crm_lead_vat/static/description/icon.png create mode 100644 crm_lead_vat/tests/__init__.py create mode 100644 crm_lead_vat/tests/test_lead.py create mode 100644 crm_lead_vat/views/crm_lead.xml diff --git a/crm_lead_code/i18n/es.po b/crm_lead_code/i18n/es.po index 6d9dc7399d5..1fc6d0cbc5d 100644 --- a/crm_lead_code/i18n/es.po +++ b/crm_lead_code/i18n/es.po @@ -9,20 +9,20 @@ 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: 2021-02-11 21:44+0000\n" -"Last-Translator: Mat-moran \n" +"PO-Revision-Date: 2023-08-02 14:10+0000\n" +"Last-Translator: Ivorra78 \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.3.2\n" +"X-Generator: Weblate 4.17\n" #. module: crm_lead_code #: model_terms:ir.ui.view,arch_db:crm_lead_code.crm_case_kanban_view_leads_inherit msgid "&nbsp;" -msgstr "" +msgstr "&nbsp;" #. module: crm_lead_code #: model:ir.model.fields,field_description:crm_lead_code.field_crm_lead__code diff --git a/crm_lead_vat/README.rst b/crm_lead_vat/README.rst new file mode 100644 index 00000000000..afe82035d00 --- /dev/null +++ b/crm_lead_vat/README.rst @@ -0,0 +1,63 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +============ +VAT in leads +============ + +This module was written to extend the functionality of CRM leads to support +setting the VAT. + +Usage +===== + +To use this module, you need to: + +* Go to *Sales > Leads*. +* Open a lead. +* You will see the new field. + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/111/8.0 + +Known issues / Roadmap +====================== + +* ... + +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 smashing it by providing a detailed and welcomed +feedback `here `_. + + +Credits +======= + +Contributors +------------ + +* Rafael Blasco +* Jairo Llopis + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +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. + +To contribute to this module, please visit http://odoo-community.org. diff --git a/crm_lead_vat/__init__.py b/crm_lead_vat/__init__.py new file mode 100644 index 00000000000..49bb330e0df --- /dev/null +++ b/crm_lead_vat/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# © 2015 Antiun Ingeniería, S.L. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import models diff --git a/crm_lead_vat/__openerp__.py b/crm_lead_vat/__openerp__.py new file mode 100644 index 00000000000..cf8b80eff16 --- /dev/null +++ b/crm_lead_vat/__openerp__.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# © 2015 Antiun Ingeniería, S.L. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +{ + "name": "VAT in leads", + "summary": "Add VAT field to leads", + "version": "8.0.1.1.0", + "category": "Customer Relationship Management", + "website": "http://www.antiun.com", + "author": "Antiun Ingeniería S.L., Odoo Community Association (OCA)", + "license": "AGPL-3", + "application": False, + "installable": True, + "depends": [ + "crm", + ], + "data": [ + "views/crm_lead.xml", + ], +} diff --git a/crm_lead_vat/i18n/bg.po b/crm_lead_vat/i18n/bg.po new file mode 100644 index 00000000000..5e42336e3a6 --- /dev/null +++ b/crm_lead_vat/i18n/bg.po @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_vat +# +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: bg\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: crm_lead_vat +#: model:ir.model,name:crm_lead_vat.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Следа/Възможност" + +#. module: crm_lead_vat +#: field:crm.lead,vat:0 +msgid "TIN" +msgstr "" + +#. module: crm_lead_vat +#: help:crm.lead,vat:0 +msgid "" +"Tax Identification Number. The first 2 characters are the country code." +msgstr "" diff --git a/crm_lead_vat/i18n/crm_lead_vat.pot b/crm_lead_vat/i18n/crm_lead_vat.pot new file mode 100644 index 00000000000..19ecf1a77c8 --- /dev/null +++ b/crm_lead_vat/i18n/crm_lead_vat.pot @@ -0,0 +1,22 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_vat +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-10-30 16:00+0000\n" +"PO-Revision-Date: 2015-10-30 16:00+0000\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_vat +#: model:ir.model,name:crm_lead_vat.model_crm_lead +msgid "Lead/Opportunity" +msgstr "" + diff --git a/crm_lead_vat/i18n/de.po b/crm_lead_vat/i18n/de.po new file mode 100644 index 00000000000..273ce089ec6 --- /dev/null +++ b/crm_lead_vat/i18n/de.po @@ -0,0 +1,35 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_vat +# +# 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:26+0000\n" +"PO-Revision-Date: 2017-04-11 14:58+0000\n" +"Last-Translator: Rudolf Schnapka \n" +"Language-Team: German (http://www.transifex.com/oca/OCA-crm-8-0/language/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: crm_lead_vat +#: model:ir.model,name:crm_lead_vat.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Lead/Chance" + +#. module: crm_lead_vat +#: field:crm.lead,vat:0 +msgid "TIN" +msgstr "USt-ID:" + +#. module: crm_lead_vat +#: help:crm.lead,vat:0 +msgid "" +"Tax Identification Number. The first 2 characters are the country code." +msgstr "Steueridentifikationsnummer. Die ersten zwei Zeichen stellen den Länderschlüssel dar." diff --git a/crm_lead_vat/i18n/es.po b/crm_lead_vat/i18n/es.po new file mode 100644 index 00000000000..a1d13597e6c --- /dev/null +++ b/crm_lead_vat/i18n/es.po @@ -0,0 +1,35 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_vat +# +# Translators: +# Carles Antoli , 2016 +msgid "" +msgstr "" +"Project-Id-Version: crm (8.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-04-14 03:55+0000\n" +"PO-Revision-Date: 2016-04-07 15:49+0000\n" +"Last-Translator: Carles Antoli \n" +"Language-Team: Spanish (http://www.transifex.com/oca/OCA-crm-8-0/language/es/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: crm_lead_vat +#: model:ir.model,name:crm_lead_vat.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Iniciativa / Oportunidad" + +#. module: crm_lead_vat +#: field:crm.lead,vat:0 +msgid "TIN" +msgstr "NIF" + +#. module: crm_lead_vat +#: help:crm.lead,vat:0 +msgid "" +"Tax Identification Number. The first 2 characters are the country code." +msgstr "Número de identificación fiscal. Los 2 primeros caracteres son el código del país." diff --git a/crm_lead_vat/i18n/fr.po b/crm_lead_vat/i18n/fr.po new file mode 100644 index 00000000000..b22e7791798 --- /dev/null +++ b/crm_lead_vat/i18n/fr.po @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_vat +# +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: fr\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: crm_lead_vat +#: model:ir.model,name:crm_lead_vat.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Piste/Opportunité" + +#. module: crm_lead_vat +#: field:crm.lead,vat:0 +msgid "TIN" +msgstr "" + +#. module: crm_lead_vat +#: help:crm.lead,vat:0 +msgid "" +"Tax Identification Number. The first 2 characters are the country code." +msgstr "" diff --git a/crm_lead_vat/i18n/hr.po b/crm_lead_vat/i18n/hr.po new file mode 100644 index 00000000000..c0ae9050f55 --- /dev/null +++ b/crm_lead_vat/i18n/hr.po @@ -0,0 +1,35 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_vat +# +# 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: 2016-08-19 13:47+0000\n" +"Last-Translator: Ana-Maria Olujić \n" +"Language-Team: Croatian (http://www.transifex.com/oca/OCA-crm-8-0/language/hr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: hr\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_lead_vat +#: model:ir.model,name:crm_lead_vat.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Potencijalni klijent" + +#. module: crm_lead_vat +#: field:crm.lead,vat:0 +msgid "TIN" +msgstr "OIB" + +#. module: crm_lead_vat +#: help:crm.lead,vat:0 +msgid "" +"Tax Identification Number. The first 2 characters are the country code." +msgstr "OIB. Prva 2 slova su oznaka države." diff --git a/crm_lead_vat/i18n/it.po b/crm_lead_vat/i18n/it.po new file mode 100644 index 00000000000..4a49787749e --- /dev/null +++ b/crm_lead_vat/i18n/it.po @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_vat +# +# Translators: +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: 2016-03-10 18:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: Italian (http://www.transifex.com/oca/OCA-crm-8-0/language/it/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: it\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: crm_lead_vat +#: model:ir.model,name:crm_lead_vat.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Lead/Opportunità" + +#. module: crm_lead_vat +#: field:crm.lead,vat:0 +msgid "TIN" +msgstr "" + +#. module: crm_lead_vat +#: help:crm.lead,vat:0 +msgid "" +"Tax Identification Number. The first 2 characters are the country code." +msgstr "" diff --git a/crm_lead_vat/i18n/pt_BR.po b/crm_lead_vat/i18n/pt_BR.po new file mode 100644 index 00000000000..85de785b3c1 --- /dev/null +++ b/crm_lead_vat/i18n/pt_BR.po @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_vat +# +# 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: 2016-03-10 18:53+0000\n" +"Last-Translator: <>\n" +"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-crm-8-0/language/pt_BR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: pt_BR\n" +"Plural-Forms: nplurals=2; plural=(n > 1);\n" + +#. module: crm_lead_vat +#: model:ir.model,name:crm_lead_vat.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Prospector/Oportunidade" + +#. module: crm_lead_vat +#: field:crm.lead,vat:0 +msgid "TIN" +msgstr "" + +#. module: crm_lead_vat +#: help:crm.lead,vat:0 +msgid "" +"Tax Identification Number. The first 2 characters are the country code." +msgstr "" diff --git a/crm_lead_vat/i18n/sk.po b/crm_lead_vat/i18n/sk.po new file mode 100644 index 00000000000..4fa95491a0f --- /dev/null +++ b/crm_lead_vat/i18n/sk.po @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_vat +# +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sk\n" +"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" + +#. module: crm_lead_vat +#: model:ir.model,name:crm_lead_vat.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Iniciatíva/Príležitosť" + +#. module: crm_lead_vat +#: field:crm.lead,vat:0 +msgid "TIN" +msgstr "" + +#. module: crm_lead_vat +#: help:crm.lead,vat:0 +msgid "" +"Tax Identification Number. The first 2 characters are the country code." +msgstr "" diff --git a/crm_lead_vat/i18n/sl.po b/crm_lead_vat/i18n/sl.po new file mode 100644 index 00000000000..24965b29816 --- /dev/null +++ b/crm_lead_vat/i18n/sl.po @@ -0,0 +1,35 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_vat +# +# 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:47+0000\n" +"Last-Translator: Matjaž Mozetič \n" +"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-crm-8-0/language/sl/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: sl\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_vat +#: model:ir.model,name:crm_lead_vat.model_crm_lead +msgid "Lead/Opportunity" +msgstr "Indic/priložnost" + +#. module: crm_lead_vat +#: field:crm.lead,vat:0 +msgid "TIN" +msgstr "ID za DDV" + +#. module: crm_lead_vat +#: help:crm.lead,vat:0 +msgid "" +"Tax Identification Number. The first 2 characters are the country code." +msgstr "Davčna identifikacijska številka. Prva 2 znaka sta črki kode države." diff --git a/crm_lead_vat/i18n/zh_CN.po b/crm_lead_vat/i18n/zh_CN.po new file mode 100644 index 00000000000..21397e7efeb --- /dev/null +++ b/crm_lead_vat/i18n/zh_CN.po @@ -0,0 +1,34 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * crm_lead_vat +# +# 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" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: zh_CN\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: crm_lead_vat +#: model:ir.model,name:crm_lead_vat.model_crm_lead +msgid "Lead/Opportunity" +msgstr "线索/商机" + +#. module: crm_lead_vat +#: field:crm.lead,vat:0 +msgid "TIN" +msgstr "" + +#. module: crm_lead_vat +#: help:crm.lead,vat:0 +msgid "" +"Tax Identification Number. The first 2 characters are the country code." +msgstr "" diff --git a/crm_lead_vat/models.py b/crm_lead_vat/models.py new file mode 100644 index 00000000000..4090d529a9f --- /dev/null +++ b/crm_lead_vat/models.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# © 2015 Antiun Ingeniería, S.L. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from openerp import api, fields, models + + +class Lead(models.Model): + _inherit = "crm.lead" + + vat = fields.Char( + "TIN", + help="Tax Identification Number. The first 2 characters are the " + "country code.") + + @api.model + def _lead_create_contact(self, lead, name, is_company, parent_id=False): + """Add VAT to partner.""" + return (super(Lead, self.with_context(default_vat=lead.vat)) + ._lead_create_contact(lead, name, is_company, parent_id)) + + def on_change_partner_id(self, partner_id): + """Recover VAT from partner if available.""" + result = super(Lead, self).on_change_partner_id(partner_id) + + if result.get("value"): + if self.partner_id and self.partner_id.vat: + result["value"]["vat"] = self.partner_id.vat + + return result diff --git a/crm_lead_vat/static/description/icon.png b/crm_lead_vat/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~! zVpnB`o+K7|Al`Q_U;eD$B zfJtP*jH`siUq~{KE)`jP2|#TUEFGRryE2`i0**z#*^6~AI|YzIWy$Cu#CSLW3q=GA z6`?GZymC;dCPk~rBS%eCb`5OLr;RUZ;D`}um=H)BfVIq%7VhiMr)_#G0N#zrNH|__ zc+blN2UAB0=617@>_u;MPHN;P;N#YoE=)R#i$k_`UAA>WWCcEVMh~L_ zj--gtp&|K1#58Yz*AHCTMziU1Jzt_jG0I@qAOHsk$2}yTmVkBp_eHuY$A9)>P6o~I z%aQ?!(GqeQ-Y+b0I(m9pwgi(IIZZzsbMv+9w{PFtd_<_(LA~0H(xz{=FhLB@(1&qHA5EJw1>>=%q2f&^X>IQ{!GJ4e9U z&KlB)z(84HmNgm2hg2C0>WM{E(DdPr+EeU_N@57;PC2&DmGFW_9kP&%?X4}+xWi)( z;)z%wI5>D4a*5XwD)P--sPkoY(a~WBw;E~AW`Yue4kFa^LM3X`8x|}ZUeMnqr}>kH zG%WWW>3ml$Yez?i%)2pbKPI7?5o?hydokgQyZsNEr{a|mLdt;X2TX(#B1j35xPnPW z*bMSSOau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z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 diff --git a/crm_lead_vat/tests/__init__.py b/crm_lead_vat/tests/__init__.py new file mode 100644 index 00000000000..a2e800a5ce1 --- /dev/null +++ b/crm_lead_vat/tests/__init__.py @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# © 2015 Antiun Ingeniería, S.L. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from . import test_lead diff --git a/crm_lead_vat/tests/test_lead.py b/crm_lead_vat/tests/test_lead.py new file mode 100644 index 00000000000..f569bff503f --- /dev/null +++ b/crm_lead_vat/tests/test_lead.py @@ -0,0 +1,29 @@ +# -*- coding: utf-8 -*- +# © 2015 Antiun Ingeniería, S.L. +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from openerp.tests.common import TransactionCase + + +class LeadCase(TransactionCase): + def setUp(self): + super(LeadCase, self).setUp() + self.lead = self.env["crm.lead"].create({ + "name": __file__, + "partner_name": u"HÎ" + }) + self.partner = self.env["res.partner"].create({"name": __file__}) + self.test_field = "ES98765432M" + + def test_transfered_values(self): + """Field gets transfered when creating partner.""" + self.lead.vat = self.test_field + self.lead.handle_partner_assignation() + self.assertEqual(self.lead.partner_id.vat, self.test_field) + + def test_onchange_partner_id(self): + """Lead gets VAT from partner when linked to it.""" + self.partner.vat = self.test_field + self.lead.partner_id = self.partner + result = self.lead.on_change_partner_id(self.partner.id) + self.assertEqual(result["value"]["vat"], self.test_field) diff --git a/crm_lead_vat/views/crm_lead.xml b/crm_lead_vat/views/crm_lead.xml new file mode 100644 index 00000000000..e4a27a3208f --- /dev/null +++ b/crm_lead_vat/views/crm_lead.xml @@ -0,0 +1,32 @@ + + + + + + Add VAT to lead + crm.lead + + + + + + + + + + + + Add VAT to opportunity + crm.lead + + + + + + + + + + + + diff --git a/crm_phonecall/i18n/es.po b/crm_phonecall/i18n/es.po index b5a9d7a02bb..38af16b5179 100644 --- a/crm_phonecall/i18n/es.po +++ b/crm_phonecall/i18n/es.po @@ -9,8 +9,8 @@ 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-06-06 14:10+0000\n" -"Last-Translator: luis-ron \n" +"PO-Revision-Date: 2023-08-02 14:10+0000\n" +"Last-Translator: Ivorra78 \n" "Language-Team: Spanish (https://www.transifex.com/oca/teams/23907/es/)\n" "Language: es\n" "MIME-Version: 1.0\n" @@ -604,7 +604,7 @@ msgstr "Fecha de apertura" #. module: crm_phonecall #: model:ir.model.fields.selection,name:crm_phonecall.selection__crm_phonecall__direction__out msgid "Out" -msgstr "" +msgstr "Fuera" #. module: crm_phonecall #: model_terms:ir.ui.view,arch_db:crm_phonecall.view_crm_case_phonecalls_filter @@ -818,7 +818,6 @@ msgstr "Origen" #. module: crm_phonecall #: model_terms:ir.ui.view,arch_db:crm_phonecall.view_crm_case_phonecalls_filter -#, fuzzy msgid "State" msgstr "Estado" From d225b904d1c0ea5b9bb8fdc8dd64d6b2868f622b Mon Sep 17 00:00:00 2001 From: oihane Date: Fri, 16 Jun 2017 11:49:35 +0200 Subject: [PATCH 02/20] [FIX] crm_lead_vat: fix onchange error --- crm_lead_vat/__openerp__.py | 2 +- crm_lead_vat/i18n/bg.po | 10 +++++----- crm_lead_vat/i18n/crm_lead_vat.pot | 12 ++++++++++-- crm_lead_vat/i18n/de.po | 14 ++++++++------ crm_lead_vat/i18n/es.po | 14 ++++++++------ crm_lead_vat/i18n/fr.po | 10 +++++----- crm_lead_vat/i18n/hr.po | 13 +++++++------ crm_lead_vat/i18n/it.po | 10 +++++----- crm_lead_vat/i18n/pt_BR.po | 10 +++++----- crm_lead_vat/i18n/sk.po | 10 +++++----- crm_lead_vat/i18n/sl.po | 13 +++++++------ crm_lead_vat/i18n/zh_CN.po | 10 +++++----- crm_lead_vat/models.py | 11 ++++++----- crm_lead_vat/tests/test_lead.py | 4 +++- 14 files changed, 80 insertions(+), 63 deletions(-) diff --git a/crm_lead_vat/__openerp__.py b/crm_lead_vat/__openerp__.py index cf8b80eff16..bd878d9ab50 100644 --- a/crm_lead_vat/__openerp__.py +++ b/crm_lead_vat/__openerp__.py @@ -4,7 +4,7 @@ { "name": "VAT in leads", "summary": "Add VAT field to leads", - "version": "8.0.1.1.0", + "version": "8.0.1.1.1", "category": "Customer Relationship Management", "website": "http://www.antiun.com", "author": "Antiun Ingeniería S.L., Odoo Community Association (OCA)", diff --git a/crm_lead_vat/i18n/bg.po b/crm_lead_vat/i18n/bg.po index 5e42336e3a6..686b737c92e 100644 --- a/crm_lead_vat/i18n/bg.po +++ b/crm_lead_vat/i18n/bg.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * crm_lead_vat -# +# # Translators: msgid "" msgstr "" @@ -10,11 +10,12 @@ msgstr "" "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-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" -"Language: bg\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: crm_lead_vat @@ -29,6 +30,5 @@ msgstr "" #. module: crm_lead_vat #: help:crm.lead,vat:0 -msgid "" -"Tax Identification Number. The first 2 characters are the country code." +msgid "Tax Identification Number. The first 2 characters are the country code." msgstr "" diff --git a/crm_lead_vat/i18n/crm_lead_vat.pot b/crm_lead_vat/i18n/crm_lead_vat.pot index 19ecf1a77c8..ac6b5d84d3f 100644 --- a/crm_lead_vat/i18n/crm_lead_vat.pot +++ b/crm_lead_vat/i18n/crm_lead_vat.pot @@ -6,8 +6,6 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 8.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-10-30 16:00+0000\n" -"PO-Revision-Date: 2015-10-30 16:00+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -20,3 +18,13 @@ msgstr "" msgid "Lead/Opportunity" msgstr "" +#. module: crm_lead_vat +#: field:crm.lead,vat:0 +msgid "TIN" +msgstr "" + +#. module: crm_lead_vat +#: help:crm.lead,vat:0 +msgid "Tax Identification Number. The first 2 characters are the country code." +msgstr "" + diff --git a/crm_lead_vat/i18n/de.po b/crm_lead_vat/i18n/de.po index 273ce089ec6..99a4bd90c5c 100644 --- a/crm_lead_vat/i18n/de.po +++ b/crm_lead_vat/i18n/de.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * crm_lead_vat -# +# # Translators: # Rudolf Schnapka , 2017 msgid "" @@ -11,11 +11,12 @@ msgstr "" "POT-Creation-Date: 2017-03-28 02:26+0000\n" "PO-Revision-Date: 2017-04-11 14:58+0000\n" "Last-Translator: Rudolf Schnapka \n" -"Language-Team: German (http://www.transifex.com/oca/OCA-crm-8-0/language/de/)\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" -"Language: de\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: crm_lead_vat @@ -30,6 +31,7 @@ msgstr "USt-ID:" #. module: crm_lead_vat #: help:crm.lead,vat:0 -msgid "" -"Tax Identification Number. The first 2 characters are the country code." -msgstr "Steueridentifikationsnummer. Die ersten zwei Zeichen stellen den Länderschlüssel dar." +msgid "Tax Identification Number. The first 2 characters are the country code." +msgstr "" +"Steueridentifikationsnummer. Die ersten zwei Zeichen stellen den " +"Länderschlüssel dar." diff --git a/crm_lead_vat/i18n/es.po b/crm_lead_vat/i18n/es.po index a1d13597e6c..53a664aa467 100644 --- a/crm_lead_vat/i18n/es.po +++ b/crm_lead_vat/i18n/es.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * crm_lead_vat -# +# # Translators: # Carles Antoli , 2016 msgid "" @@ -11,11 +11,12 @@ msgstr "" "POT-Creation-Date: 2016-04-14 03:55+0000\n" "PO-Revision-Date: 2016-04-07 15:49+0000\n" "Last-Translator: Carles Antoli \n" -"Language-Team: Spanish (http://www.transifex.com/oca/OCA-crm-8-0/language/es/)\n" +"Language-Team: Spanish (http://www.transifex.com/oca/OCA-crm-8-0/language/" +"es/)\n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Language: es\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: crm_lead_vat @@ -30,6 +31,7 @@ msgstr "NIF" #. module: crm_lead_vat #: help:crm.lead,vat:0 -msgid "" -"Tax Identification Number. The first 2 characters are the country code." -msgstr "Número de identificación fiscal. Los 2 primeros caracteres son el código del país." +msgid "Tax Identification Number. The first 2 characters are the country code." +msgstr "" +"Número de identificación fiscal. Los 2 primeros caracteres son el código del " +"país." diff --git a/crm_lead_vat/i18n/fr.po b/crm_lead_vat/i18n/fr.po index b22e7791798..4b598c7dffe 100644 --- a/crm_lead_vat/i18n/fr.po +++ b/crm_lead_vat/i18n/fr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * crm_lead_vat -# +# # Translators: msgid "" msgstr "" @@ -10,11 +10,12 @@ msgstr "" "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-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" -"Language: fr\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: crm_lead_vat @@ -29,6 +30,5 @@ msgstr "" #. module: crm_lead_vat #: help:crm.lead,vat:0 -msgid "" -"Tax Identification Number. The first 2 characters are the country code." +msgid "Tax Identification Number. The first 2 characters are the country code." msgstr "" diff --git a/crm_lead_vat/i18n/hr.po b/crm_lead_vat/i18n/hr.po index c0ae9050f55..839053541b1 100644 --- a/crm_lead_vat/i18n/hr.po +++ b/crm_lead_vat/i18n/hr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * crm_lead_vat -# +# # Translators: # Ana-Maria Olujić , 2016 msgid "" @@ -11,12 +11,14 @@ msgstr "" "POT-Creation-Date: 2016-08-15 00:49+0000\n" "PO-Revision-Date: 2016-08-19 13:47+0000\n" "Last-Translator: Ana-Maria Olujić \n" -"Language-Team: Croatian (http://www.transifex.com/oca/OCA-crm-8-0/language/hr/)\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" -"Language: hr\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" +"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_lead_vat #: model:ir.model,name:crm_lead_vat.model_crm_lead @@ -30,6 +32,5 @@ msgstr "OIB" #. module: crm_lead_vat #: help:crm.lead,vat:0 -msgid "" -"Tax Identification Number. The first 2 characters are the country code." +msgid "Tax Identification Number. The first 2 characters are the country code." msgstr "OIB. Prva 2 slova su oznaka države." diff --git a/crm_lead_vat/i18n/it.po b/crm_lead_vat/i18n/it.po index 4a49787749e..f83371ce66d 100644 --- a/crm_lead_vat/i18n/it.po +++ b/crm_lead_vat/i18n/it.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * crm_lead_vat -# +# # Translators: msgid "" msgstr "" @@ -10,11 +10,12 @@ msgstr "" "POT-Creation-Date: 2016-04-16 11:11+0000\n" "PO-Revision-Date: 2016-03-10 18:53+0000\n" "Last-Translator: <>\n" -"Language-Team: Italian (http://www.transifex.com/oca/OCA-crm-8-0/language/it/)\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" -"Language: it\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #. module: crm_lead_vat @@ -29,6 +30,5 @@ msgstr "" #. module: crm_lead_vat #: help:crm.lead,vat:0 -msgid "" -"Tax Identification Number. The first 2 characters are the country code." +msgid "Tax Identification Number. The first 2 characters are the country code." msgstr "" diff --git a/crm_lead_vat/i18n/pt_BR.po b/crm_lead_vat/i18n/pt_BR.po index 85de785b3c1..ca9f20ad607 100644 --- a/crm_lead_vat/i18n/pt_BR.po +++ b/crm_lead_vat/i18n/pt_BR.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * crm_lead_vat -# +# # Translators: msgid "" msgstr "" @@ -10,11 +10,12 @@ msgstr "" "POT-Creation-Date: 2016-03-26 09:38+0000\n" "PO-Revision-Date: 2016-03-10 18:53+0000\n" "Last-Translator: <>\n" -"Language-Team: Portuguese (Brazil) (http://www.transifex.com/oca/OCA-crm-8-0/language/pt_BR/)\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" -"Language: pt_BR\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #. module: crm_lead_vat @@ -29,6 +30,5 @@ msgstr "" #. module: crm_lead_vat #: help:crm.lead,vat:0 -msgid "" -"Tax Identification Number. The first 2 characters are the country code." +msgid "Tax Identification Number. The first 2 characters are the country code." msgstr "" diff --git a/crm_lead_vat/i18n/sk.po b/crm_lead_vat/i18n/sk.po index 4fa95491a0f..d56fdb9568e 100644 --- a/crm_lead_vat/i18n/sk.po +++ b/crm_lead_vat/i18n/sk.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * crm_lead_vat -# +# # Translators: msgid "" msgstr "" @@ -10,11 +10,12 @@ msgstr "" "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-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" -"Language: sk\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" #. module: crm_lead_vat @@ -29,6 +30,5 @@ msgstr "" #. module: crm_lead_vat #: help:crm.lead,vat:0 -msgid "" -"Tax Identification Number. The first 2 characters are the country code." +msgid "Tax Identification Number. The first 2 characters are the country code." msgstr "" diff --git a/crm_lead_vat/i18n/sl.po b/crm_lead_vat/i18n/sl.po index 24965b29816..63f31c56342 100644 --- a/crm_lead_vat/i18n/sl.po +++ b/crm_lead_vat/i18n/sl.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * crm_lead_vat -# +# # Translators: # Matjaž Mozetič , 2016 msgid "" @@ -11,12 +11,14 @@ msgstr "" "POT-Creation-Date: 2016-03-10 18:52+0000\n" "PO-Revision-Date: 2016-03-11 10:47+0000\n" "Last-Translator: Matjaž Mozetič \n" -"Language-Team: Slovenian (http://www.transifex.com/oca/OCA-crm-8-0/language/sl/)\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" -"Language: sl\n" -"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n%100==4 ? 2 : 3);\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_vat #: model:ir.model,name:crm_lead_vat.model_crm_lead @@ -30,6 +32,5 @@ msgstr "ID za DDV" #. module: crm_lead_vat #: help:crm.lead,vat:0 -msgid "" -"Tax Identification Number. The first 2 characters are the country code." +msgid "Tax Identification Number. The first 2 characters are the country code." msgstr "Davčna identifikacijska številka. Prva 2 znaka sta črki kode države." diff --git a/crm_lead_vat/i18n/zh_CN.po b/crm_lead_vat/i18n/zh_CN.po index 21397e7efeb..e602d123a2c 100644 --- a/crm_lead_vat/i18n/zh_CN.po +++ b/crm_lead_vat/i18n/zh_CN.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * crm_lead_vat -# +# # Translators: msgid "" msgstr "" @@ -10,11 +10,12 @@ msgstr "" "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-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" -"Language: zh_CN\n" "Plural-Forms: nplurals=1; plural=0;\n" #. module: crm_lead_vat @@ -29,6 +30,5 @@ msgstr "" #. module: crm_lead_vat #: help:crm.lead,vat:0 -msgid "" -"Tax Identification Number. The first 2 characters are the country code." +msgid "Tax Identification Number. The first 2 characters are the country code." msgstr "" diff --git a/crm_lead_vat/models.py b/crm_lead_vat/models.py index 4090d529a9f..2867b42d933 100644 --- a/crm_lead_vat/models.py +++ b/crm_lead_vat/models.py @@ -22,9 +22,10 @@ def _lead_create_contact(self, lead, name, is_company, parent_id=False): def on_change_partner_id(self, partner_id): """Recover VAT from partner if available.""" result = super(Lead, self).on_change_partner_id(partner_id) - - if result.get("value"): - if self.partner_id and self.partner_id.vat: - result["value"]["vat"] = self.partner_id.vat - + if not partner_id: + return result + partner = self.env['res.partner'].browse(partner_id) + if partner.vat: + value = result.setdefault('value', {}) + value['vat'] = partner.vat return result diff --git a/crm_lead_vat/tests/test_lead.py b/crm_lead_vat/tests/test_lead.py index f569bff503f..6b78c889cf4 100644 --- a/crm_lead_vat/tests/test_lead.py +++ b/crm_lead_vat/tests/test_lead.py @@ -24,6 +24,8 @@ def test_transfered_values(self): def test_onchange_partner_id(self): """Lead gets VAT from partner when linked to it.""" self.partner.vat = self.test_field + result = self.lead.on_change_partner_id(self.lead.partner_id.id) + self.assertNotIn("vat", result["value"]) self.lead.partner_id = self.partner - result = self.lead.on_change_partner_id(self.partner.id) + result = self.lead.on_change_partner_id(self.lead.partner_id.id) self.assertEqual(result["value"]["vat"], self.test_field) From 304e2fda8ea8ae5f4be7996e4f9bc7582c2246b5 Mon Sep 17 00:00:00 2001 From: Oihane Crucelaegui Date: Thu, 20 Jun 2019 11:31:19 +0200 Subject: [PATCH 03/20] [MIG] crm_lead_vat: Migration to 12.0 --- crm_lead_vat/README.rst | 71 ++- crm_lead_vat/__init__.py | 3 +- .../{__openerp__.py => __manifest__.py} | 7 +- crm_lead_vat/i18n/bg.po | 4 +- crm_lead_vat/i18n/crm_lead_vat.pot | 6 +- crm_lead_vat/i18n/de.po | 4 +- crm_lead_vat/i18n/es.po | 4 +- crm_lead_vat/i18n/fr.po | 4 +- crm_lead_vat/i18n/hr.po | 4 +- crm_lead_vat/i18n/it.po | 4 +- crm_lead_vat/i18n/pt_BR.po | 4 +- crm_lead_vat/i18n/sk.po | 4 +- crm_lead_vat/i18n/sl.po | 4 +- crm_lead_vat/i18n/zh_CN.po | 4 +- crm_lead_vat/models/__init__.py | 1 + .../{models.py => models/crm_lead.py} | 21 +- crm_lead_vat/readme/CONTRIBUTORS.rst | 2 + crm_lead_vat/readme/DESCRIPTION.rst | 2 + crm_lead_vat/readme/USAGE.rst | 5 + crm_lead_vat/static/description/index.html | 431 ++++++++++++++++++ crm_lead_vat/tests/__init__.py | 3 +- crm_lead_vat/tests/test_lead.py | 13 +- crm_lead_vat/views/crm_lead.xml | 26 +- 23 files changed, 539 insertions(+), 92 deletions(-) rename crm_lead_vat/{__openerp__.py => __manifest__.py} (77%) create mode 100644 crm_lead_vat/models/__init__.py rename crm_lead_vat/{models.py => models/crm_lead.py} (50%) create mode 100644 crm_lead_vat/readme/CONTRIBUTORS.rst create mode 100644 crm_lead_vat/readme/DESCRIPTION.rst create mode 100644 crm_lead_vat/readme/USAGE.rst create mode 100644 crm_lead_vat/static/description/index.html diff --git a/crm_lead_vat/README.rst b/crm_lead_vat/README.rst index afe82035d00..611cf90deb2 100644 --- a/crm_lead_vat/README.rst +++ b/crm_lead_vat/README.rst @@ -1,14 +1,38 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html - :alt: License: AGPL-3 - ============ VAT in leads ============ +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/12.0/crm_lead_vat + :alt: OCA/crm +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/crm-12-0/crm-12-0-crm_lead_vat + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/111/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + This module was written to extend the functionality of CRM leads to support setting the VAT. +**Table of contents** + +.. contents:: + :local: + Usage ===== @@ -18,46 +42,43 @@ To use this module, you need to: * Open a lead. * You will see the new field. -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: https://runbot.odoo-community.org/runbot/111/8.0 - -Known issues / Roadmap -====================== - -* ... - 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 smashing it by providing a detailed and welcomed -feedback `here `_. +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 smashing it by providing a detailed and welcomed +`feedback `_. +Do not contact contributors directly about support or help with technical issues. Credits ======= +Authors +~~~~~~~ + +* Antiun Ingeniería S.L. + Contributors ------------- +~~~~~~~~~~~~ * Rafael Blasco * Jairo Llopis -Maintainer ----------- +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. .. image:: https://odoo-community.org/logo.png :alt: Odoo Community Association :target: https://odoo-community.org -This module is maintained by the OCA. - 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. -To contribute to this module, please visit http://odoo-community.org. +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_vat/__init__.py b/crm_lead_vat/__init__.py index 49bb330e0df..1fdbc7e0428 100644 --- a/crm_lead_vat/__init__.py +++ b/crm_lead_vat/__init__.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2015 Antiun Ingeniería, S.L. +# Copyright 2015 Antiun Ingeniería, S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import models diff --git a/crm_lead_vat/__openerp__.py b/crm_lead_vat/__manifest__.py similarity index 77% rename from crm_lead_vat/__openerp__.py rename to crm_lead_vat/__manifest__.py index bd878d9ab50..215de98608b 100644 --- a/crm_lead_vat/__openerp__.py +++ b/crm_lead_vat/__manifest__.py @@ -1,12 +1,11 @@ -# -*- coding: utf-8 -*- -# © 2015 Antiun Ingeniería, S.L. +# Copyright 2015 Antiun Ingeniería, S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "VAT in leads", "summary": "Add VAT field to leads", - "version": "8.0.1.1.1", + "version": "12.0.1.0.0", "category": "Customer Relationship Management", - "website": "http://www.antiun.com", + "website": "https://github.com/OCA/crm", "author": "Antiun Ingeniería S.L., Odoo Community Association (OCA)", "license": "AGPL-3", "application": False, diff --git a/crm_lead_vat/i18n/bg.po b/crm_lead_vat/i18n/bg.po index 686b737c92e..f9beeab7035 100644 --- a/crm_lead_vat/i18n/bg.po +++ b/crm_lead_vat/i18n/bg.po @@ -24,11 +24,11 @@ msgid "Lead/Opportunity" msgstr "Следа/Възможност" #. module: crm_lead_vat -#: field:crm.lead,vat:0 +#: model:ir.model.fields,field_description:crm_lead_vat.field_crm_lead__vat msgid "TIN" msgstr "" #. module: crm_lead_vat -#: help:crm.lead,vat:0 +#: model:ir.model.fields,help:crm_lead_vat.field_crm_lead__vat msgid "Tax Identification Number. The first 2 characters are the country code." msgstr "" diff --git a/crm_lead_vat/i18n/crm_lead_vat.pot b/crm_lead_vat/i18n/crm_lead_vat.pot index ac6b5d84d3f..851ddede948 100644 --- a/crm_lead_vat/i18n/crm_lead_vat.pot +++ b/crm_lead_vat/i18n/crm_lead_vat.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 8.0\n" +"Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: <>\n" "Language-Team: \n" @@ -19,12 +19,12 @@ msgid "Lead/Opportunity" msgstr "" #. module: crm_lead_vat -#: field:crm.lead,vat:0 +#: model:ir.model.fields,field_description:crm_lead_vat.field_crm_lead__vat msgid "TIN" msgstr "" #. module: crm_lead_vat -#: help:crm.lead,vat:0 +#: model:ir.model.fields,help:crm_lead_vat.field_crm_lead__vat msgid "Tax Identification Number. The first 2 characters are the country code." msgstr "" diff --git a/crm_lead_vat/i18n/de.po b/crm_lead_vat/i18n/de.po index 99a4bd90c5c..50ffff100e9 100644 --- a/crm_lead_vat/i18n/de.po +++ b/crm_lead_vat/i18n/de.po @@ -25,12 +25,12 @@ msgid "Lead/Opportunity" msgstr "Lead/Chance" #. module: crm_lead_vat -#: field:crm.lead,vat:0 +#: model:ir.model.fields,field_description:crm_lead_vat.field_crm_lead__vat msgid "TIN" msgstr "USt-ID:" #. module: crm_lead_vat -#: help:crm.lead,vat:0 +#: model:ir.model.fields,help:crm_lead_vat.field_crm_lead__vat msgid "Tax Identification Number. The first 2 characters are the country code." msgstr "" "Steueridentifikationsnummer. Die ersten zwei Zeichen stellen den " diff --git a/crm_lead_vat/i18n/es.po b/crm_lead_vat/i18n/es.po index 53a664aa467..3bbf6efc552 100644 --- a/crm_lead_vat/i18n/es.po +++ b/crm_lead_vat/i18n/es.po @@ -25,12 +25,12 @@ msgid "Lead/Opportunity" msgstr "Iniciativa / Oportunidad" #. module: crm_lead_vat -#: field:crm.lead,vat:0 +#: model:ir.model.fields,field_description:crm_lead_vat.field_crm_lead__vat msgid "TIN" msgstr "NIF" #. module: crm_lead_vat -#: help:crm.lead,vat:0 +#: model:ir.model.fields,help:crm_lead_vat.field_crm_lead__vat msgid "Tax Identification Number. The first 2 characters are the country code." msgstr "" "Número de identificación fiscal. Los 2 primeros caracteres son el código del " diff --git a/crm_lead_vat/i18n/fr.po b/crm_lead_vat/i18n/fr.po index 4b598c7dffe..de70ec20a03 100644 --- a/crm_lead_vat/i18n/fr.po +++ b/crm_lead_vat/i18n/fr.po @@ -24,11 +24,11 @@ msgid "Lead/Opportunity" msgstr "Piste/Opportunité" #. module: crm_lead_vat -#: field:crm.lead,vat:0 +#: model:ir.model.fields,field_description:crm_lead_vat.field_crm_lead__vat msgid "TIN" msgstr "" #. module: crm_lead_vat -#: help:crm.lead,vat:0 +#: model:ir.model.fields,help:crm_lead_vat.field_crm_lead__vat msgid "Tax Identification Number. The first 2 characters are the country code." msgstr "" diff --git a/crm_lead_vat/i18n/hr.po b/crm_lead_vat/i18n/hr.po index 839053541b1..87d0854e7a0 100644 --- a/crm_lead_vat/i18n/hr.po +++ b/crm_lead_vat/i18n/hr.po @@ -26,11 +26,11 @@ msgid "Lead/Opportunity" msgstr "Potencijalni klijent" #. module: crm_lead_vat -#: field:crm.lead,vat:0 +#: model:ir.model.fields,field_description:crm_lead_vat.field_crm_lead__vat msgid "TIN" msgstr "OIB" #. module: crm_lead_vat -#: help:crm.lead,vat:0 +#: model:ir.model.fields,help:crm_lead_vat.field_crm_lead__vat msgid "Tax Identification Number. The first 2 characters are the country code." msgstr "OIB. Prva 2 slova su oznaka države." diff --git a/crm_lead_vat/i18n/it.po b/crm_lead_vat/i18n/it.po index f83371ce66d..b786267f3e1 100644 --- a/crm_lead_vat/i18n/it.po +++ b/crm_lead_vat/i18n/it.po @@ -24,11 +24,11 @@ msgid "Lead/Opportunity" msgstr "Lead/Opportunità" #. module: crm_lead_vat -#: field:crm.lead,vat:0 +#: model:ir.model.fields,field_description:crm_lead_vat.field_crm_lead__vat msgid "TIN" msgstr "" #. module: crm_lead_vat -#: help:crm.lead,vat:0 +#: model:ir.model.fields,help:crm_lead_vat.field_crm_lead__vat msgid "Tax Identification Number. The first 2 characters are the country code." msgstr "" diff --git a/crm_lead_vat/i18n/pt_BR.po b/crm_lead_vat/i18n/pt_BR.po index ca9f20ad607..befb61266d1 100644 --- a/crm_lead_vat/i18n/pt_BR.po +++ b/crm_lead_vat/i18n/pt_BR.po @@ -24,11 +24,11 @@ msgid "Lead/Opportunity" msgstr "Prospector/Oportunidade" #. module: crm_lead_vat -#: field:crm.lead,vat:0 +#: model:ir.model.fields,field_description:crm_lead_vat.field_crm_lead__vat msgid "TIN" msgstr "" #. module: crm_lead_vat -#: help:crm.lead,vat:0 +#: model:ir.model.fields,help:crm_lead_vat.field_crm_lead__vat msgid "Tax Identification Number. The first 2 characters are the country code." msgstr "" diff --git a/crm_lead_vat/i18n/sk.po b/crm_lead_vat/i18n/sk.po index d56fdb9568e..8038c136288 100644 --- a/crm_lead_vat/i18n/sk.po +++ b/crm_lead_vat/i18n/sk.po @@ -24,11 +24,11 @@ msgid "Lead/Opportunity" msgstr "Iniciatíva/Príležitosť" #. module: crm_lead_vat -#: field:crm.lead,vat:0 +#: model:ir.model.fields,field_description:crm_lead_vat.field_crm_lead__vat msgid "TIN" msgstr "" #. module: crm_lead_vat -#: help:crm.lead,vat:0 +#: model:ir.model.fields,help:crm_lead_vat.field_crm_lead__vat msgid "Tax Identification Number. The first 2 characters are the country code." msgstr "" diff --git a/crm_lead_vat/i18n/sl.po b/crm_lead_vat/i18n/sl.po index 63f31c56342..ec059d2b3f8 100644 --- a/crm_lead_vat/i18n/sl.po +++ b/crm_lead_vat/i18n/sl.po @@ -26,11 +26,11 @@ msgid "Lead/Opportunity" msgstr "Indic/priložnost" #. module: crm_lead_vat -#: field:crm.lead,vat:0 +#: model:ir.model.fields,field_description:crm_lead_vat.field_crm_lead__vat msgid "TIN" msgstr "ID za DDV" #. module: crm_lead_vat -#: help:crm.lead,vat:0 +#: model:ir.model.fields,help:crm_lead_vat.field_crm_lead__vat msgid "Tax Identification Number. The first 2 characters are the country code." msgstr "Davčna identifikacijska številka. Prva 2 znaka sta črki kode države." diff --git a/crm_lead_vat/i18n/zh_CN.po b/crm_lead_vat/i18n/zh_CN.po index e602d123a2c..2412334bb40 100644 --- a/crm_lead_vat/i18n/zh_CN.po +++ b/crm_lead_vat/i18n/zh_CN.po @@ -24,11 +24,11 @@ msgid "Lead/Opportunity" msgstr "线索/商机" #. module: crm_lead_vat -#: field:crm.lead,vat:0 +#: model:ir.model.fields,field_description:crm_lead_vat.field_crm_lead__vat msgid "TIN" msgstr "" #. module: crm_lead_vat -#: help:crm.lead,vat:0 +#: model:ir.model.fields,help:crm_lead_vat.field_crm_lead__vat msgid "Tax Identification Number. The first 2 characters are the country code." msgstr "" diff --git a/crm_lead_vat/models/__init__.py b/crm_lead_vat/models/__init__.py new file mode 100644 index 00000000000..e66f0d6cf4e --- /dev/null +++ b/crm_lead_vat/models/__init__.py @@ -0,0 +1 @@ +from . import crm_lead diff --git a/crm_lead_vat/models.py b/crm_lead_vat/models/crm_lead.py similarity index 50% rename from crm_lead_vat/models.py rename to crm_lead_vat/models/crm_lead.py index 2867b42d933..05f85ab2f58 100644 --- a/crm_lead_vat/models.py +++ b/crm_lead_vat/models/crm_lead.py @@ -1,31 +1,30 @@ # -*- coding: utf-8 -*- -# © 2015 Antiun Ingeniería, S.L. +# Copyright 2015 Antiun Ingeniería, S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp import api, fields, models +from odoo import api, fields, models class Lead(models.Model): _inherit = "crm.lead" vat = fields.Char( - "TIN", + string="TIN", help="Tax Identification Number. The first 2 characters are the " "country code.") - @api.model - def _lead_create_contact(self, lead, name, is_company, parent_id=False): + @api.multi + def _create_lead_partner(self): """Add VAT to partner.""" - return (super(Lead, self.with_context(default_vat=lead.vat)) - ._lead_create_contact(lead, name, is_company, parent_id)) + return (super(Lead, self.with_context(default_vat=self.vat)) + ._create_lead_partner()) - def on_change_partner_id(self, partner_id): + def _onchange_partner_id_values(self, partner_id): """Recover VAT from partner if available.""" - result = super(Lead, self).on_change_partner_id(partner_id) + result = super(Lead, self)._onchange_partner_id_values(partner_id) if not partner_id: return result partner = self.env['res.partner'].browse(partner_id) if partner.vat: - value = result.setdefault('value', {}) - value['vat'] = partner.vat + result['vat'] = partner.vat return result diff --git a/crm_lead_vat/readme/CONTRIBUTORS.rst b/crm_lead_vat/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000000..8961c54f7b8 --- /dev/null +++ b/crm_lead_vat/readme/CONTRIBUTORS.rst @@ -0,0 +1,2 @@ +* Rafael Blasco +* Jairo Llopis diff --git a/crm_lead_vat/readme/DESCRIPTION.rst b/crm_lead_vat/readme/DESCRIPTION.rst new file mode 100644 index 00000000000..56da22f710e --- /dev/null +++ b/crm_lead_vat/readme/DESCRIPTION.rst @@ -0,0 +1,2 @@ +This module was written to extend the functionality of CRM leads to support +setting the VAT. diff --git a/crm_lead_vat/readme/USAGE.rst b/crm_lead_vat/readme/USAGE.rst new file mode 100644 index 00000000000..77ddaf6d44a --- /dev/null +++ b/crm_lead_vat/readme/USAGE.rst @@ -0,0 +1,5 @@ +To use this module, you need to: + +* Go to *Sales > Leads*. +* Open a lead. +* You will see the new field. diff --git a/crm_lead_vat/static/description/index.html b/crm_lead_vat/static/description/index.html new file mode 100644 index 00000000000..e64c96c5b9b --- /dev/null +++ b/crm_lead_vat/static/description/index.html @@ -0,0 +1,431 @@ + + + + + + +VAT in leads + + + +
+

VAT in leads

+ + +

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

+

This module was written to extend the functionality of CRM leads to support +setting the VAT.

+

Table of contents

+ +
+

Usage

+

To use this module, you need to:

+
    +
  • Go to Sales > Leads.
  • +
  • Open a lead.
  • +
  • You will see the new field.
  • +
+
+
+

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 smashing it by providing a detailed and welcomed +feedback.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • Antiun Ingeniería S.L.
  • +
+
+
+

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_vat/tests/__init__.py b/crm_lead_vat/tests/__init__.py index a2e800a5ce1..b3a5e928552 100644 --- a/crm_lead_vat/tests/__init__.py +++ b/crm_lead_vat/tests/__init__.py @@ -1,5 +1,4 @@ -# -*- coding: utf-8 -*- -# © 2015 Antiun Ingeniería, S.L. +# Copyright 2015 Antiun Ingeniería, S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import test_lead diff --git a/crm_lead_vat/tests/test_lead.py b/crm_lead_vat/tests/test_lead.py index 6b78c889cf4..bee65743767 100644 --- a/crm_lead_vat/tests/test_lead.py +++ b/crm_lead_vat/tests/test_lead.py @@ -1,8 +1,7 @@ -# -*- coding: utf-8 -*- -# © 2015 Antiun Ingeniería, S.L. +# Copyright 2015 Antiun Ingeniería, S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from openerp.tests.common import TransactionCase +from odoo.tests.common import TransactionCase class LeadCase(TransactionCase): @@ -24,8 +23,8 @@ def test_transfered_values(self): def test_onchange_partner_id(self): """Lead gets VAT from partner when linked to it.""" self.partner.vat = self.test_field - result = self.lead.on_change_partner_id(self.lead.partner_id.id) - self.assertNotIn("vat", result["value"]) + result = self.lead._onchange_partner_id_values(self.lead.partner_id.id) + self.assertNotIn("vat", result) self.lead.partner_id = self.partner - result = self.lead.on_change_partner_id(self.lead.partner_id.id) - self.assertEqual(result["value"]["vat"], self.test_field) + result = self.lead._onchange_partner_id_values(self.lead.partner_id.id) + self.assertEqual(result["vat"], self.test_field) diff --git a/crm_lead_vat/views/crm_lead.xml b/crm_lead_vat/views/crm_lead.xml index e4a27a3208f..f645d03348d 100644 --- a/crm_lead_vat/views/crm_lead.xml +++ b/crm_lead_vat/views/crm_lead.xml @@ -1,32 +1,22 @@ - - - + - Add VAT to lead crm.lead - - - - - + + + - Add VAT to opportunity crm.lead - - - - - + + + - - - + From 1aa85cd9fb528845007eaf2de44b1b23c0fd9c25 Mon Sep 17 00:00:00 2001 From: Rodrigo Macedo Date: Tue, 3 Sep 2019 01:04:53 +0000 Subject: [PATCH 04/20] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (3 of 3 strings) Translation: crm-12.0/crm-12.0-crm_lead_vat Translate-URL: https://translation.odoo-community.org/projects/crm-12-0/crm-12-0-crm_lead_vat/pt_BR/ --- crm_lead_vat/i18n/pt_BR.po | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/crm_lead_vat/i18n/pt_BR.po b/crm_lead_vat/i18n/pt_BR.po index befb61266d1..40a9785f170 100644 --- a/crm_lead_vat/i18n/pt_BR.po +++ b/crm_lead_vat/i18n/pt_BR.po @@ -8,15 +8,16 @@ 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: 2016-03-10 18:53+0000\n" -"Last-Translator: <>\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" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.8\n" #. module: crm_lead_vat #: model:ir.model,name:crm_lead_vat.model_crm_lead @@ -26,9 +27,11 @@ msgstr "Prospector/Oportunidade" #. module: crm_lead_vat #: model:ir.model.fields,field_description:crm_lead_vat.field_crm_lead__vat msgid "TIN" -msgstr "" +msgstr "TIN" #. module: crm_lead_vat #: model:ir.model.fields,help:crm_lead_vat.field_crm_lead__vat msgid "Tax Identification Number. The first 2 characters are the country code." msgstr "" +"Número de identificação fiscal. Os 2 primeiros caracteres são o código do " +"país." From 6e212ba076facfeeaef5437487d6491deec801f8 Mon Sep 17 00:00:00 2001 From: Lorenzo Battistini Date: Thu, 26 Sep 2019 15:06:00 +0000 Subject: [PATCH 05/20] Translated using Weblate (Italian) Currently translated at 100.0% (3 of 3 strings) Translation: crm-12.0/crm-12.0-crm_lead_vat Translate-URL: https://translation.odoo-community.org/projects/crm-12-0/crm-12-0-crm_lead_vat/it/ --- crm_lead_vat/i18n/it.po | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/crm_lead_vat/i18n/it.po b/crm_lead_vat/i18n/it.po index b786267f3e1..737abf9a8af 100644 --- a/crm_lead_vat/i18n/it.po +++ b/crm_lead_vat/i18n/it.po @@ -8,15 +8,16 @@ 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: 2016-03-10 18:53+0000\n" -"Last-Translator: <>\n" -"Language-Team: Italian (http://www.transifex.com/oca/OCA-crm-8-0/language/" -"it/)\n" +"PO-Revision-Date: 2019-09-26 17:24+0000\n" +"Last-Translator: Lorenzo Battistini \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" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.8\n" #. module: crm_lead_vat #: model:ir.model,name:crm_lead_vat.model_crm_lead @@ -26,9 +27,9 @@ msgstr "Lead/Opportunità" #. module: crm_lead_vat #: model:ir.model.fields,field_description:crm_lead_vat.field_crm_lead__vat msgid "TIN" -msgstr "" +msgstr "P.IVA" #. module: crm_lead_vat #: model:ir.model.fields,help:crm_lead_vat.field_crm_lead__vat msgid "Tax Identification Number. The first 2 characters are the country code." -msgstr "" +msgstr "Partita IVA. I primi 2 caratteri sono il codice paese." From 5b0514f544cab4f99302b6bf14876228a371710b Mon Sep 17 00:00:00 2001 From: eLBati Date: Wed, 13 Nov 2019 10:43:34 +0100 Subject: [PATCH 06/20] FIX crm_lead_vat tests after https://github.com/odoo/odoo/commit/e1833936255839cd34eba5758ca4c3124fd2522c --- crm_lead_vat/tests/test_lead.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crm_lead_vat/tests/test_lead.py b/crm_lead_vat/tests/test_lead.py index bee65743767..91ff15f2e9d 100644 --- a/crm_lead_vat/tests/test_lead.py +++ b/crm_lead_vat/tests/test_lead.py @@ -17,7 +17,9 @@ def setUp(self): def test_transfered_values(self): """Field gets transfered when creating partner.""" self.lead.vat = self.test_field - self.lead.handle_partner_assignation() + partner_ids = self.lead.handle_partner_assignation() + for lead_id in partner_ids: + self.env["crm.lead"].browse(lead_id).partner_id = partner_ids[lead_id] self.assertEqual(self.lead.partner_id.vat, self.test_field) def test_onchange_partner_id(self): From e43d0150699bb09df2f3d48938196b0adfe60d94 Mon Sep 17 00:00:00 2001 From: Sergio Zanchetta Date: Wed, 8 Jan 2020 17:07:28 +0000 Subject: [PATCH 07/20] Translated using Weblate (Italian) Currently translated at 100.0% (3 of 3 strings) Translation: crm-12.0/crm-12.0-crm_lead_vat Translate-URL: https://translation.odoo-community.org/projects/crm-12-0/crm-12-0-crm_lead_vat/it/ --- crm_lead_vat/i18n/it.po | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/crm_lead_vat/i18n/it.po b/crm_lead_vat/i18n/it.po index 737abf9a8af..5b2f8f337db 100644 --- a/crm_lead_vat/i18n/it.po +++ b/crm_lead_vat/i18n/it.po @@ -8,8 +8,8 @@ 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: 2019-09-26 17:24+0000\n" -"Last-Translator: Lorenzo Battistini \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" @@ -17,19 +17,19 @@ msgstr "" "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" +"X-Generator: Weblate 3.10\n" #. module: crm_lead_vat #: model:ir.model,name:crm_lead_vat.model_crm_lead msgid "Lead/Opportunity" -msgstr "Lead/Opportunità" +msgstr "Contatto/Opportunità" #. module: crm_lead_vat #: model:ir.model.fields,field_description:crm_lead_vat.field_crm_lead__vat msgid "TIN" -msgstr "P.IVA" +msgstr "P. IVA" #. module: crm_lead_vat #: model:ir.model.fields,help:crm_lead_vat.field_crm_lead__vat msgid "Tax Identification Number. The first 2 characters are the country code." -msgstr "Partita IVA. I primi 2 caratteri sono il codice paese." +msgstr "Partita IVA. I primi 2 caratteri sono il codice nazione." From b08e0d7ca2e0f228e051402714e2fd070737af99 Mon Sep 17 00:00:00 2001 From: newtratip Date: Mon, 9 Mar 2020 18:52:54 +0700 Subject: [PATCH 08/20] [IMP] crm_lead_vat: black, isort --- crm_lead_vat/__manifest__.py | 10 +++------- crm_lead_vat/models/crm_lead.py | 13 +++++++------ crm_lead_vat/tests/test_lead.py | 7 +++---- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/crm_lead_vat/__manifest__.py b/crm_lead_vat/__manifest__.py index 215de98608b..3f6ceda344a 100644 --- a/crm_lead_vat/__manifest__.py +++ b/crm_lead_vat/__manifest__.py @@ -3,17 +3,13 @@ { "name": "VAT in leads", "summary": "Add VAT field to leads", - "version": "12.0.1.0.0", + "version": "13.0.1.0.0", "category": "Customer Relationship Management", "website": "https://github.com/OCA/crm", "author": "Antiun Ingeniería S.L., Odoo Community Association (OCA)", "license": "AGPL-3", "application": False, "installable": True, - "depends": [ - "crm", - ], - "data": [ - "views/crm_lead.xml", - ], + "depends": ["crm"], + "data": ["views/crm_lead.xml"], } diff --git a/crm_lead_vat/models/crm_lead.py b/crm_lead_vat/models/crm_lead.py index 05f85ab2f58..8e1f552b9a2 100644 --- a/crm_lead_vat/models/crm_lead.py +++ b/crm_lead_vat/models/crm_lead.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2015 Antiun Ingeniería, S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). @@ -11,20 +10,22 @@ class Lead(models.Model): vat = fields.Char( string="TIN", help="Tax Identification Number. The first 2 characters are the " - "country code.") + "country code.", + ) @api.multi def _create_lead_partner(self): """Add VAT to partner.""" - return (super(Lead, self.with_context(default_vat=self.vat)) - ._create_lead_partner()) + return super( + Lead, self.with_context(default_vat=self.vat) + )._create_lead_partner() def _onchange_partner_id_values(self, partner_id): """Recover VAT from partner if available.""" result = super(Lead, self)._onchange_partner_id_values(partner_id) if not partner_id: return result - partner = self.env['res.partner'].browse(partner_id) + partner = self.env["res.partner"].browse(partner_id) if partner.vat: - result['vat'] = partner.vat + result["vat"] = partner.vat return result diff --git a/crm_lead_vat/tests/test_lead.py b/crm_lead_vat/tests/test_lead.py index 91ff15f2e9d..1a154f9a088 100644 --- a/crm_lead_vat/tests/test_lead.py +++ b/crm_lead_vat/tests/test_lead.py @@ -7,10 +7,9 @@ class LeadCase(TransactionCase): def setUp(self): super(LeadCase, self).setUp() - self.lead = self.env["crm.lead"].create({ - "name": __file__, - "partner_name": u"HÎ" - }) + self.lead = self.env["crm.lead"].create( + {"name": __file__, "partner_name": u"HÎ"} + ) self.partner = self.env["res.partner"].create({"name": __file__}) self.test_field = "ES98765432M" From 69bc09938120c7c357cece30def267d2031f5e3c Mon Sep 17 00:00:00 2001 From: newtratip Date: Fri, 13 Mar 2020 15:32:50 +0700 Subject: [PATCH 09/20] [13.0][MIG] crm_lead_vat --- crm_lead_vat/README.rst | 13 +++++++------ crm_lead_vat/__init__.py | 1 - crm_lead_vat/__manifest__.py | 2 +- crm_lead_vat/i18n/crm_lead_vat.pot | 10 +++++----- crm_lead_vat/models/__init__.py | 2 ++ crm_lead_vat/models/crm_lead.py | 3 +-- crm_lead_vat/readme/CONTRIBUTORS.rst | 1 + crm_lead_vat/readme/USAGE.rst | 2 +- crm_lead_vat/static/description/index.html | 9 +++++---- crm_lead_vat/tests/__init__.py | 1 - crm_lead_vat/views/crm_lead.xml | 22 ---------------------- crm_lead_vat/views/crm_lead_views.xml | 15 +++++++++++++++ 12 files changed, 38 insertions(+), 43 deletions(-) delete mode 100644 crm_lead_vat/views/crm_lead.xml create mode 100644 crm_lead_vat/views/crm_lead_views.xml diff --git a/crm_lead_vat/README.rst b/crm_lead_vat/README.rst index 611cf90deb2..d206f212346 100644 --- a/crm_lead_vat/README.rst +++ b/crm_lead_vat/README.rst @@ -14,13 +14,13 @@ VAT in leads :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/12.0/crm_lead_vat + :target: https://github.com/OCA/crm/tree/13.0/crm_lead_vat :alt: OCA/crm .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/crm-12-0/crm-12-0-crm_lead_vat + :target: https://translation.odoo-community.org/projects/crm-13-0/crm-13-0-crm_lead_vat :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/111/12.0 + :target: https://runbot.odoo-community.org/runbot/111/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -38,7 +38,7 @@ Usage To use this module, you need to: -* Go to *Sales > Leads*. +* Go to *CRM > Leads*. * Open a lead. * You will see the new field. @@ -48,7 +48,7 @@ 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 smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -65,6 +65,7 @@ Contributors * Rafael Blasco * Jairo Llopis +* Tharathip Chaweewongphan Maintainers ~~~~~~~~~~~ @@ -79,6 +80,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/crm `_ project on GitHub. +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_vat/__init__.py b/crm_lead_vat/__init__.py index 1fdbc7e0428..83e553ac462 100644 --- a/crm_lead_vat/__init__.py +++ b/crm_lead_vat/__init__.py @@ -1,4 +1,3 @@ -# Copyright 2015 Antiun Ingeniería, S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import models diff --git a/crm_lead_vat/__manifest__.py b/crm_lead_vat/__manifest__.py index 3f6ceda344a..badbb1a5b59 100644 --- a/crm_lead_vat/__manifest__.py +++ b/crm_lead_vat/__manifest__.py @@ -11,5 +11,5 @@ "application": False, "installable": True, "depends": ["crm"], - "data": ["views/crm_lead.xml"], + "data": ["views/crm_lead_views.xml"], } diff --git a/crm_lead_vat/i18n/crm_lead_vat.pot b/crm_lead_vat/i18n/crm_lead_vat.pot index 851ddede948..11dac470505 100644 --- a/crm_lead_vat/i18n/crm_lead_vat.pot +++ b/crm_lead_vat/i18n/crm_lead_vat.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * crm_lead_vat +# * crm_lead_vat # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -25,6 +25,6 @@ msgstr "" #. module: crm_lead_vat #: model:ir.model.fields,help:crm_lead_vat.field_crm_lead__vat -msgid "Tax Identification Number. The first 2 characters are the country code." +msgid "" +"Tax Identification Number. The first 2 characters are the country code." msgstr "" - diff --git a/crm_lead_vat/models/__init__.py b/crm_lead_vat/models/__init__.py index e66f0d6cf4e..b8b7e10d5a6 100644 --- a/crm_lead_vat/models/__init__.py +++ b/crm_lead_vat/models/__init__.py @@ -1 +1,3 @@ +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + from . import crm_lead diff --git a/crm_lead_vat/models/crm_lead.py b/crm_lead_vat/models/crm_lead.py index 8e1f552b9a2..c22af3f3310 100644 --- a/crm_lead_vat/models/crm_lead.py +++ b/crm_lead_vat/models/crm_lead.py @@ -1,7 +1,7 @@ # Copyright 2015 Antiun Ingeniería, S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from odoo import api, fields, models +from odoo import fields, models class Lead(models.Model): @@ -13,7 +13,6 @@ class Lead(models.Model): "country code.", ) - @api.multi def _create_lead_partner(self): """Add VAT to partner.""" return super( diff --git a/crm_lead_vat/readme/CONTRIBUTORS.rst b/crm_lead_vat/readme/CONTRIBUTORS.rst index 8961c54f7b8..3ff891a39b5 100644 --- a/crm_lead_vat/readme/CONTRIBUTORS.rst +++ b/crm_lead_vat/readme/CONTRIBUTORS.rst @@ -1,2 +1,3 @@ * Rafael Blasco * Jairo Llopis +* Tharathip Chaweewongphan diff --git a/crm_lead_vat/readme/USAGE.rst b/crm_lead_vat/readme/USAGE.rst index 77ddaf6d44a..ad131e83519 100644 --- a/crm_lead_vat/readme/USAGE.rst +++ b/crm_lead_vat/readme/USAGE.rst @@ -1,5 +1,5 @@ To use this module, you need to: -* Go to *Sales > Leads*. +* Go to *CRM > Leads*. * Open a lead. * You will see the new field. diff --git a/crm_lead_vat/static/description/index.html b/crm_lead_vat/static/description/index.html index e64c96c5b9b..d683434fdee 100644 --- a/crm_lead_vat/static/description/index.html +++ b/crm_lead_vat/static/description/index.html @@ -367,7 +367,7 @@

VAT in leads

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

+

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

This module was written to extend the functionality of CRM leads to support setting the VAT.

Table of contents

@@ -387,7 +387,7 @@

VAT in leads

Usage

To use this module, you need to:

    -
  • Go to Sales > Leads.
  • +
  • Go to CRM > Leads.
  • Open a lead.
  • You will see the new field.
@@ -397,7 +397,7 @@

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 smashing it by providing a detailed and welcomed -feedback.

+feedback.

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

@@ -413,6 +413,7 @@

Contributors

@@ -422,7 +423,7 @@

Maintainers

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.

+

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_vat/tests/__init__.py b/crm_lead_vat/tests/__init__.py index b3a5e928552..9519f24cada 100644 --- a/crm_lead_vat/tests/__init__.py +++ b/crm_lead_vat/tests/__init__.py @@ -1,4 +1,3 @@ -# Copyright 2015 Antiun Ingeniería, S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import test_lead diff --git a/crm_lead_vat/views/crm_lead.xml b/crm_lead_vat/views/crm_lead.xml deleted file mode 100644 index f645d03348d..00000000000 --- a/crm_lead_vat/views/crm_lead.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - crm.lead - - - - - - - - - - crm.lead - - - - - - - - diff --git a/crm_lead_vat/views/crm_lead_views.xml b/crm_lead_vat/views/crm_lead_views.xml new file mode 100644 index 00000000000..43b5a9f83a7 --- /dev/null +++ b/crm_lead_vat/views/crm_lead_views.xml @@ -0,0 +1,15 @@ + + + + crm.lead + + + + + + + + + + + From fcd50c55bb87ac5b0ad90dd9475abee4f11b13dc Mon Sep 17 00:00:00 2001 From: Stephan Keller Date: Wed, 13 May 2020 12:21:01 +0200 Subject: [PATCH 10/20] [FIX] Clean up license links --- crm_lead_vat/__init__.py | 2 +- crm_lead_vat/__manifest__.py | 3 ++- crm_lead_vat/models/__init__.py | 2 +- crm_lead_vat/models/crm_lead.py | 2 +- crm_lead_vat/tests/__init__.py | 2 +- crm_lead_vat/tests/test_lead.py | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/crm_lead_vat/__init__.py b/crm_lead_vat/__init__.py index 83e553ac462..4b76c7b2d5c 100644 --- a/crm_lead_vat/__init__.py +++ b/crm_lead_vat/__init__.py @@ -1,3 +1,3 @@ -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from . import models diff --git a/crm_lead_vat/__manifest__.py b/crm_lead_vat/__manifest__.py index badbb1a5b59..a5d43356332 100644 --- a/crm_lead_vat/__manifest__.py +++ b/crm_lead_vat/__manifest__.py @@ -1,5 +1,6 @@ # Copyright 2015 Antiun Ingeniería, S.L. -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). + { "name": "VAT in leads", "summary": "Add VAT field to leads", diff --git a/crm_lead_vat/models/__init__.py b/crm_lead_vat/models/__init__.py index b8b7e10d5a6..f11a18fc4e9 100644 --- a/crm_lead_vat/models/__init__.py +++ b/crm_lead_vat/models/__init__.py @@ -1,3 +1,3 @@ -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from . import crm_lead diff --git a/crm_lead_vat/models/crm_lead.py b/crm_lead_vat/models/crm_lead.py index c22af3f3310..8d452817f85 100644 --- a/crm_lead_vat/models/crm_lead.py +++ b/crm_lead_vat/models/crm_lead.py @@ -1,5 +1,5 @@ # Copyright 2015 Antiun Ingeniería, S.L. -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo import fields, models diff --git a/crm_lead_vat/tests/__init__.py b/crm_lead_vat/tests/__init__.py index 9519f24cada..c6e811f5206 100644 --- a/crm_lead_vat/tests/__init__.py +++ b/crm_lead_vat/tests/__init__.py @@ -1,3 +1,3 @@ -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from . import test_lead diff --git a/crm_lead_vat/tests/test_lead.py b/crm_lead_vat/tests/test_lead.py index 1a154f9a088..94ce4cb4fce 100644 --- a/crm_lead_vat/tests/test_lead.py +++ b/crm_lead_vat/tests/test_lead.py @@ -1,5 +1,5 @@ # Copyright 2015 Antiun Ingeniería, S.L. -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). from odoo.tests.common import TransactionCase From 5ab24a73be61947082267d9709a06dd8e7342d75 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Mon, 31 Aug 2020 17:45:14 +0200 Subject: [PATCH 11/20] [IMP] crm_lead_vat: Improve description Closes #354 --- crm_lead_vat/README.rst | 2 +- crm_lead_vat/readme/DESCRIPTION.rst | 2 +- crm_lead_vat/static/description/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crm_lead_vat/README.rst b/crm_lead_vat/README.rst index d206f212346..a4da8c332f2 100644 --- a/crm_lead_vat/README.rst +++ b/crm_lead_vat/README.rst @@ -26,7 +26,7 @@ VAT in leads |badge1| |badge2| |badge3| |badge4| |badge5| This module was written to extend the functionality of CRM leads to support -setting the VAT. +setting the VAT identification number (https://en.wikipedia.org/wiki/VAT_identification_number). **Table of contents** diff --git a/crm_lead_vat/readme/DESCRIPTION.rst b/crm_lead_vat/readme/DESCRIPTION.rst index 56da22f710e..ac79a5e9bc0 100644 --- a/crm_lead_vat/readme/DESCRIPTION.rst +++ b/crm_lead_vat/readme/DESCRIPTION.rst @@ -1,2 +1,2 @@ This module was written to extend the functionality of CRM leads to support -setting the VAT. +setting the VAT identification number (https://en.wikipedia.org/wiki/VAT_identification_number). diff --git a/crm_lead_vat/static/description/index.html b/crm_lead_vat/static/description/index.html index d683434fdee..4f3017ee220 100644 --- a/crm_lead_vat/static/description/index.html +++ b/crm_lead_vat/static/description/index.html @@ -369,7 +369,7 @@

VAT in leads

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

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

This module was written to extend the functionality of CRM leads to support -setting the VAT.

+setting the VAT identification number (https://en.wikipedia.org/wiki/VAT_identification_number).

Table of contents

    From 26d1e2fce671e46705eb929b76707c03ce235d16 Mon Sep 17 00:00:00 2001 From: RIDA YAHLA Date: Wed, 11 Nov 2020 20:21:50 +0100 Subject: [PATCH 12/20] [MIG] crm_lead_vat: Migration to 14.0 --- crm_lead_vat/README.rst | 10 +++++----- crm_lead_vat/__manifest__.py | 2 +- crm_lead_vat/i18n/bg.po | 15 +++++++++++++++ crm_lead_vat/i18n/crm_lead_vat.pot | 17 ++++++++++++++++- crm_lead_vat/models/crm_lead.py | 13 +++++-------- crm_lead_vat/static/description/index.html | 6 +++--- crm_lead_vat/tests/test_lead.py | 10 ++++------ 7 files changed, 49 insertions(+), 24 deletions(-) diff --git a/crm_lead_vat/README.rst b/crm_lead_vat/README.rst index a4da8c332f2..bf2fd7c7066 100644 --- a/crm_lead_vat/README.rst +++ b/crm_lead_vat/README.rst @@ -14,13 +14,13 @@ VAT in leads :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/13.0/crm_lead_vat + :target: https://github.com/OCA/crm/tree/14.0/crm_lead_vat :alt: OCA/crm .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/crm-13-0/crm-13-0-crm_lead_vat + :target: https://translation.odoo-community.org/projects/crm-14-0/crm-14-0-crm_lead_vat :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/111/13.0 + :target: https://runbot.odoo-community.org/runbot/111/14.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -48,7 +48,7 @@ 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 smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -80,6 +80,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/crm `_ project on GitHub. +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_vat/__manifest__.py b/crm_lead_vat/__manifest__.py index a5d43356332..ce8c6fbe401 100644 --- a/crm_lead_vat/__manifest__.py +++ b/crm_lead_vat/__manifest__.py @@ -4,7 +4,7 @@ { "name": "VAT in leads", "summary": "Add VAT field to leads", - "version": "13.0.1.0.0", + "version": "14.0.1.1.0", "category": "Customer Relationship Management", "website": "https://github.com/OCA/crm", "author": "Antiun Ingeniería S.L., Odoo Community Association (OCA)", diff --git a/crm_lead_vat/i18n/bg.po b/crm_lead_vat/i18n/bg.po index f9beeab7035..1f13c773bc2 100644 --- a/crm_lead_vat/i18n/bg.po +++ b/crm_lead_vat/i18n/bg.po @@ -18,6 +18,21 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" +#. module: crm_lead_vat +#: model:ir.model.fields,field_description:crm_lead_vat.field_crm_lead__display_name +msgid "Display Name" +msgstr "" + +#. module: crm_lead_vat +#: model:ir.model.fields,field_description:crm_lead_vat.field_crm_lead__id +msgid "ID" +msgstr "" + +#. module: crm_lead_vat +#: model:ir.model.fields,field_description:crm_lead_vat.field_crm_lead____last_update +msgid "Last Modified on" +msgstr "" + #. module: crm_lead_vat #: model:ir.model,name:crm_lead_vat.model_crm_lead msgid "Lead/Opportunity" diff --git a/crm_lead_vat/i18n/crm_lead_vat.pot b/crm_lead_vat/i18n/crm_lead_vat.pot index 11dac470505..fdfff90f2a3 100644 --- a/crm_lead_vat/i18n/crm_lead_vat.pot +++ b/crm_lead_vat/i18n/crm_lead_vat.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 13.0\n" +"Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -13,6 +13,21 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: crm_lead_vat +#: model:ir.model.fields,field_description:crm_lead_vat.field_crm_lead__display_name +msgid "Display Name" +msgstr "" + +#. module: crm_lead_vat +#: model:ir.model.fields,field_description:crm_lead_vat.field_crm_lead__id +msgid "ID" +msgstr "" + +#. module: crm_lead_vat +#: model:ir.model.fields,field_description:crm_lead_vat.field_crm_lead____last_update +msgid "Last Modified on" +msgstr "" + #. module: crm_lead_vat #: model:ir.model,name:crm_lead_vat.model_crm_lead msgid "Lead/Opportunity" diff --git a/crm_lead_vat/models/crm_lead.py b/crm_lead_vat/models/crm_lead.py index 8d452817f85..d117a688622 100644 --- a/crm_lead_vat/models/crm_lead.py +++ b/crm_lead_vat/models/crm_lead.py @@ -13,18 +13,15 @@ class Lead(models.Model): "country code.", ) - def _create_lead_partner(self): + def _create_customer(self): """Add VAT to partner.""" - return super( - Lead, self.with_context(default_vat=self.vat) - )._create_lead_partner() + return super(Lead, self.with_context(default_vat=self.vat))._create_customer() - def _onchange_partner_id_values(self, partner_id): + def _prepare_values_from_partner(self, partner): """Recover VAT from partner if available.""" - result = super(Lead, self)._onchange_partner_id_values(partner_id) - if not partner_id: + result = super(Lead, self)._prepare_values_from_partner(partner) + if not partner: return result - partner = self.env["res.partner"].browse(partner_id) if partner.vat: result["vat"] = partner.vat return result diff --git a/crm_lead_vat/static/description/index.html b/crm_lead_vat/static/description/index.html index 4f3017ee220..4d17b984f00 100644 --- a/crm_lead_vat/static/description/index.html +++ b/crm_lead_vat/static/description/index.html @@ -367,7 +367,7 @@

    VAT in leads

    !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

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

    +

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

    This module was written to extend the functionality of CRM leads to support setting the VAT identification number (https://en.wikipedia.org/wiki/VAT_identification_number).

    Table of contents

    @@ -397,7 +397,7 @@

    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 smashing it by providing a detailed and welcomed -feedback.

    +feedback.

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

@@ -423,7 +423,7 @@

Maintainers

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.

+

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_vat/tests/test_lead.py b/crm_lead_vat/tests/test_lead.py index 94ce4cb4fce..495c7667d59 100644 --- a/crm_lead_vat/tests/test_lead.py +++ b/crm_lead_vat/tests/test_lead.py @@ -8,7 +8,7 @@ class LeadCase(TransactionCase): def setUp(self): super(LeadCase, self).setUp() self.lead = self.env["crm.lead"].create( - {"name": __file__, "partner_name": u"HÎ"} + {"name": __file__, "partner_name": "HÎ"} ) self.partner = self.env["res.partner"].create({"name": __file__}) self.test_field = "ES98765432M" @@ -16,16 +16,14 @@ def setUp(self): def test_transfered_values(self): """Field gets transfered when creating partner.""" self.lead.vat = self.test_field - partner_ids = self.lead.handle_partner_assignation() - for lead_id in partner_ids: - self.env["crm.lead"].browse(lead_id).partner_id = partner_ids[lead_id] + self.lead.handle_partner_assignment() self.assertEqual(self.lead.partner_id.vat, self.test_field) def test_onchange_partner_id(self): """Lead gets VAT from partner when linked to it.""" self.partner.vat = self.test_field - result = self.lead._onchange_partner_id_values(self.lead.partner_id.id) + result = self.lead._prepare_values_from_partner(self.lead.partner_id) self.assertNotIn("vat", result) self.lead.partner_id = self.partner - result = self.lead._onchange_partner_id_values(self.lead.partner_id.id) + result = self.lead._prepare_values_from_partner(self.lead.partner_id) self.assertEqual(result["vat"], self.test_field) From 8fb83885adce2066c3897a4ed1d1d0d160bc7d7b Mon Sep 17 00:00:00 2001 From: Claude R Perrin Date: Thu, 15 Sep 2022 20:03:57 +0000 Subject: [PATCH 13/20] Translated using Weblate (French) Currently translated at 100.0% (3 of 3 strings) Translation: crm-14.0/crm-14.0-crm_lead_vat Translate-URL: https://translation.odoo-community.org/projects/crm-14-0/crm-14-0-crm_lead_vat/fr/ --- crm_lead_vat/i18n/fr.po | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/crm_lead_vat/i18n/fr.po b/crm_lead_vat/i18n/fr.po index de70ec20a03..21617a0157d 100644 --- a/crm_lead_vat/i18n/fr.po +++ b/crm_lead_vat/i18n/fr.po @@ -8,15 +8,16 @@ 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" +"PO-Revision-Date: 2022-09-15 22:07+0000\n" +"Last-Translator: Claude R Perrin \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" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 4.3.2\n" #. module: crm_lead_vat #: model:ir.model,name:crm_lead_vat.model_crm_lead @@ -26,9 +27,11 @@ msgstr "Piste/Opportunité" #. module: crm_lead_vat #: model:ir.model.fields,field_description:crm_lead_vat.field_crm_lead__vat msgid "TIN" -msgstr "" +msgstr "Num TVA" #. module: crm_lead_vat #: model:ir.model.fields,help:crm_lead_vat.field_crm_lead__vat msgid "Tax Identification Number. The first 2 characters are the country code." msgstr "" +"Numéro d'identification fiscale ou de TVA. Les 2 premiers caractères sont le " +"code du pays." From a5b4db1e2d5c20dd83cd9ec1bf69aa713a6cf3de Mon Sep 17 00:00:00 2001 From: Stefan Date: Mon, 20 Mar 2023 09:11:19 +0100 Subject: [PATCH 14/20] [MIG] crm_lead_vat: Migration to 15.0 --- crm_lead_vat/README.rst | 20 ++++++++++++-------- crm_lead_vat/__manifest__.py | 2 +- crm_lead_vat/readme/CONTRIBUTORS.rst | 4 ++++ crm_lead_vat/static/description/index.html | 12 ++++++++---- crm_lead_vat/tests/test_lead.py | 2 +- 5 files changed, 26 insertions(+), 14 deletions(-) diff --git a/crm_lead_vat/README.rst b/crm_lead_vat/README.rst index bf2fd7c7066..e50dee8ec3a 100644 --- a/crm_lead_vat/README.rst +++ b/crm_lead_vat/README.rst @@ -14,16 +14,16 @@ VAT in leads :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/14.0/crm_lead_vat + :target: https://github.com/OCA/crm/tree/15.0/crm_lead_vat :alt: OCA/crm .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/crm-14-0/crm-14-0-crm_lead_vat + :target: https://translation.odoo-community.org/projects/crm-15-0/crm-15-0-crm_lead_vat :alt: Translate me on Weblate -.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/111/14.0 - :alt: Try me on Runbot +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/webui/builds.html?repo=OCA/crm&target_branch=15.0 + :alt: Try me on Runboat -|badge1| |badge2| |badge3| |badge4| |badge5| +|badge1| |badge2| |badge3| |badge4| |badge5| This module was written to extend the functionality of CRM leads to support setting the VAT identification number (https://en.wikipedia.org/wiki/VAT_identification_number). @@ -48,7 +48,7 @@ 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 smashing it by providing a detailed and welcomed -`feedback `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -67,6 +67,10 @@ Contributors * Jairo Llopis * Tharathip Chaweewongphan +* `Tecnativa `_: + + * Stefan Ungureanu + Maintainers ~~~~~~~~~~~ @@ -80,6 +84,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose mission is to support the collaborative development of Odoo features and promote its widespread use. -This module is part of the `OCA/crm `_ project on GitHub. +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_vat/__manifest__.py b/crm_lead_vat/__manifest__.py index ce8c6fbe401..b19ffaceff0 100644 --- a/crm_lead_vat/__manifest__.py +++ b/crm_lead_vat/__manifest__.py @@ -4,7 +4,7 @@ { "name": "VAT in leads", "summary": "Add VAT field to leads", - "version": "14.0.1.1.0", + "version": "15.0.1.0.0", "category": "Customer Relationship Management", "website": "https://github.com/OCA/crm", "author": "Antiun Ingeniería S.L., Odoo Community Association (OCA)", diff --git a/crm_lead_vat/readme/CONTRIBUTORS.rst b/crm_lead_vat/readme/CONTRIBUTORS.rst index 3ff891a39b5..2f3bb28bc81 100644 --- a/crm_lead_vat/readme/CONTRIBUTORS.rst +++ b/crm_lead_vat/readme/CONTRIBUTORS.rst @@ -1,3 +1,7 @@ * Rafael Blasco * Jairo Llopis * Tharathip Chaweewongphan + +* `Tecnativa `_: + + * Stefan Ungureanu diff --git a/crm_lead_vat/static/description/index.html b/crm_lead_vat/static/description/index.html index 4d17b984f00..7478030e835 100644 --- a/crm_lead_vat/static/description/index.html +++ b/crm_lead_vat/static/description/index.html @@ -3,7 +3,7 @@ - + VAT in leads