Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[18.0][MIG] crm_lead_vat: Migration to 18.0 #614

Open
wants to merge 34 commits into
base: 18.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
64b818b
Translated using Weblate (Spanish)
Ivorra78 Aug 2, 2023
60f5def
[FIX] crm_lead_vat: fix onchange error
oihane Jun 16, 2017
52d5bae
[MIG] crm_lead_vat: Migration to 12.0
oihane Jun 20, 2019
77c961f
Translated using Weblate (Portuguese (Brazil))
Sep 3, 2019
8d4f730
Translated using Weblate (Italian)
eLBati Sep 26, 2019
f316338
FIX crm_lead_vat tests after https://github.com/odoo/odoo/commit/e183…
eLBati Nov 13, 2019
a4f5206
Translated using Weblate (Italian)
primes2h Jan 8, 2020
b8cfdf7
[IMP] crm_lead_vat: black, isort
newtratip Mar 9, 2020
68cb21d
[13.0][MIG] crm_lead_vat
newtratip Mar 13, 2020
e08dc24
[FIX] Clean up license links
skeller1 May 13, 2020
8b6ea57
[IMP] crm_lead_vat: Improve description
pedrobaeza Aug 31, 2020
4fa3a33
[MIG] crm_lead_vat: Migration to 14.0
redapureskill Nov 11, 2020
ec2e812
Translated using Weblate (French)
klodr Sep 15, 2022
6bed385
[MIG] crm_lead_vat: Migration to 15.0
stefan-tecnativa Mar 20, 2023
3b6bfa8
[UPD] Update crm_lead_vat.pot
Mar 23, 2023
7f7eb23
[15.0][IMP] Sync vat between partner and lead
EmilioPascual Jul 28, 2023
15d977f
crm_lead_vat 15.0.1.1.0
OCA-git-bot Aug 2, 2023
bd078ee
Update translation files
weblate Aug 2, 2023
95a171d
[MIG] crm_lead_vat: Migration to 16.0
EmilioPascual Aug 3, 2023
82331cd
[UPD] Update crm_lead_vat.pot
Aug 9, 2023
4ba4030
[UPD] README.rst
OCA-git-bot Aug 9, 2023
e025a08
crm_lead_vat 16.0.1.0.1
OCA-git-bot Aug 9, 2023
7fe54df
Translated using Weblate (Italian)
mymage Aug 14, 2023
d10a1ed
[UPD] README.rst
OCA-git-bot Sep 3, 2023
0ecd88d
Translated using Weblate (Spanish)
Ivorra78 Aug 21, 2023
02edddc
Update translation files
weblate Oct 9, 2023
03a4a4f
[MIG] crm_lead_vat: Migration to 17.0
peluko00 Nov 16, 2023
00d49e2
[UPD] Update crm_lead_vat.pot
Nov 24, 2023
c6036b3
[BOT] post-merge updates
OCA-git-bot Nov 24, 2023
0a95ae1
Update translation files
weblate Feb 3, 2024
6c7a8c6
Translated using Weblate (Italian)
mymage Feb 4, 2024
fb0a5c4
Translated using Weblate (Spanish)
Ivorra78 Feb 8, 2024
3b0c27f
Translated using Weblate (Portuguese (Brazil))
SottomaiorMacedoTec Jul 6, 2024
c4d9294
[MIG] crm_lead_vat: Migration to 18.0
HeliconiaSolutions Nov 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[FIX] crm_lead_vat: fix onchange error
  • Loading branch information
oihane authored and HeliconiaSolutions committed Nov 28, 2024
commit 60f5def3c11da5b1c1d73dcbf39802dfff37b1b0
2 changes: 1 addition & 1 deletion crm_lead_vat/__openerp__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)",
Expand Down
10 changes: 5 additions & 5 deletions crm_lead_vat/i18n/bg.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_lead_vat
#
#
# Translators:
msgid ""
msgstr ""
Expand All @@ -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
Expand All @@ -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 ""
12 changes: 10 additions & 2 deletions crm_lead_vat/i18n/crm_lead_vat.pot
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 ""

14 changes: 8 additions & 6 deletions crm_lead_vat/i18n/de.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_lead_vat
#
#
# Translators:
# Rudolf Schnapka <[email protected]>, 2017
msgid ""
Expand All @@ -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 <[email protected]>\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
Expand All @@ -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."
14 changes: 8 additions & 6 deletions crm_lead_vat/i18n/es.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_lead_vat
#
#
# Translators:
# Carles Antoli <[email protected]>, 2016
msgid ""
Expand All @@ -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 <[email protected]>\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
Expand All @@ -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."
10 changes: 5 additions & 5 deletions crm_lead_vat/i18n/fr.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_lead_vat
#
#
# Translators:
msgid ""
msgstr ""
Expand All @@ -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
Expand All @@ -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 ""
13 changes: 7 additions & 6 deletions crm_lead_vat/i18n/hr.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_lead_vat
#
#
# Translators:
# Ana-Maria Olujić <[email protected]>, 2016
msgid ""
Expand All @@ -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ć <[email protected]>\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
Expand All @@ -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."
10 changes: 5 additions & 5 deletions crm_lead_vat/i18n/it.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_lead_vat
#
#
# Translators:
msgid ""
msgstr ""
Expand All @@ -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
Expand All @@ -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 ""
10 changes: 5 additions & 5 deletions crm_lead_vat/i18n/pt_BR.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_lead_vat
#
#
# Translators:
msgid ""
msgstr ""
Expand All @@ -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
Expand All @@ -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 ""
10 changes: 5 additions & 5 deletions crm_lead_vat/i18n/sk.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_lead_vat
#
#
# Translators:
msgid ""
msgstr ""
Expand All @@ -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
Expand All @@ -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 ""
13 changes: 7 additions & 6 deletions crm_lead_vat/i18n/sl.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_lead_vat
#
#
# Translators:
# Matjaž Mozetič <[email protected]>, 2016
msgid ""
Expand All @@ -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č <[email protected]>\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
Expand All @@ -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."
10 changes: 5 additions & 5 deletions crm_lead_vat/i18n/zh_CN.po
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * crm_lead_vat
#
#
# Translators:
msgid ""
msgstr ""
Expand All @@ -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
Expand All @@ -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 ""
11 changes: 6 additions & 5 deletions crm_lead_vat/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 3 additions & 1 deletion crm_lead_vat/tests/test_lead.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)