Browse Source

[MIG] partner_identification_gln: Migration to 12.0

12.0
BT-aestebanez 5 years ago
parent
commit
7bb312b89f
  1. 1
      partner_identification_gln/README.rst
  2. 3
      partner_identification_gln/__init__.py
  3. 20
      partner_identification_gln/__manifest__.py
  4. 6
      partner_identification_gln/data/partner_identification_gln.xml
  5. 18
      partner_identification_gln/i18n/sl.po
  6. 5
      partner_identification_gln/models/__init__.py
  7. 5
      partner_identification_gln/models/res_partner_id_category.py
  8. 3
      partner_identification_gln/tests/__init__.py
  9. 1
      partner_identification_gln/tests/test_gln.py

1
partner_identification_gln/README.rst

@ -39,6 +39,7 @@ Images
Contributors Contributors
------------ ------------
* Alvaro Estebanez <alvaro.estebanez@braintec-group.com>
* Denis Roussel <denis.roussel@acsone.eu> * Denis Roussel <denis.roussel@acsone.eu>
* Meyomesse Gilles <meyomesse.gilles@gmail.com> * Meyomesse Gilles <meyomesse.gilles@gmail.com>

3
partner_identification_gln/__init__.py

@ -1,5 +1,2 @@
# -*- coding: utf-8 -*-
# Copyright 2016-2017 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models from . import models

20
partner_identification_gln/__manifest__.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2016-2017 ACSONE SA/NV (<http://acsone.eu>) # Copyright 2016-2017 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
@ -7,17 +6,20 @@
'summary': """ 'summary': """
This addon extends "Partner Identification Numbers" This addon extends "Partner Identification Numbers"
to provide a number category for GLN registration""", to provide a number category for GLN registration""",
'version': '10.0.1.0.0',
'version': '12.0.1.0.0',
'license': 'AGPL-3', 'license': 'AGPL-3',
'author': 'Acsone S.A.,Odoo Community Association (OCA)', 'author': 'Acsone S.A.,Odoo Community Association (OCA)',
'website': 'https://www.acsone.eu',
'website': 'https://github.com/OCA/partner-contact',
'external_dependencies': { 'external_dependencies': {
'python': ['stdnum'
],
'python': [
'stdnum',
],
}, },
'depends': ['partner_identification'
],
'data': ['data/partner_identification_gln.xml'
],
'depends': [
'partner_identification',
],
'data': [
'data/partner_identification_gln.xml',
],
'installable': True, 'installable': True,
} }

6
partner_identification_gln/data/partner_identification_gln.xml

@ -2,14 +2,14 @@
<!-- Copyright 2016-2017 ACSONE SA/NV (<http://acsone.eu>) <!-- Copyright 2016-2017 ACSONE SA/NV (<http://acsone.eu>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). --> License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
<odoo> <odoo>
<record model="res.partner.id_category" id="partner_identification_gln_number_category">
<record id="partner_identification_gln_number_category" model="res.partner.id_category">
<field name="name">GLN Identification Number</field> <field name="name">GLN Identification Number</field>
<field name="code">gln_id_number</field> <field name="code">gln_id_number</field>
<field name="validation_code"><![CDATA[failed = self.validate_res_partner_gln(id_number)]]></field> <field name="validation_code"><![CDATA[failed = self.validate_res_partner_gln(id_number)]]></field>
</record> </record>
<record model="res.partner.id_category" id="partner_identification_gcp_number_category">
<record id="partner_identification_gcp_number_category" model="res.partner.id_category">
<field name="name">GCP Identification Number</field> <field name="name">GCP Identification Number</field>
<field name="code">gcp_id_number</field> <field name="code">gcp_id_number</field>
<field name="validation_code"><![CDATA[failed = self.validate_res_partner_gcp(id_number)]]></field> <field name="validation_code"><![CDATA[failed = self.validate_res_partner_gcp(id_number)]]></field>
</record> </record>
</odoo>
</odoo>

18
partner_identification_gln/i18n/sl.po

@ -1,21 +1,18 @@
# Translation of Odoo Server. # Translation of Odoo Server.
# This file contains the translation of the following modules: # This file contains the translation of the following modules:
# * partner_identification_gln
#
# Translators:
# Matjaž Mozetič <m.mozetic@matmoz.si>, 2017
# * partner_identification_gln
#
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-06-01 03:23+0000\n"
"PO-Revision-Date: 2017-06-01 03:23+0000\n"
"POT-Creation-Date: 2019-09-11 11:05+0000\n"
"PO-Revision-Date: 2019-09-11 11:05+0000\n"
"Last-Translator: Matjaž Mozetič <m.mozetic@matmoz.si>, 2017\n" "Last-Translator: Matjaž Mozetič <m.mozetic@matmoz.si>, 2017\n"
"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n" "Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/sl/)\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \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: partner_identification_gln #. module: partner_identification_gln
@ -27,3 +24,8 @@ msgstr "GCP identifikacijska številka"
#: model:res.partner.id_category,name:partner_identification_gln.partner_identification_gln_number_category #: model:res.partner.id_category,name:partner_identification_gln.partner_identification_gln_number_category
msgid "GLN Identification Number" msgid "GLN Identification Number"
msgstr "GLN identifikacijska številka" msgstr "GLN identifikacijska številka"
#. module: partner_identification_gln
#: model:ir.model,name:partner_identification_gln.model_res_partner_id_category
msgid "Partner ID Category"
msgstr "Partnerjeve ID kategorije"

5
partner_identification_gln/models/__init__.py

@ -1,5 +1,2 @@
# -*- coding: utf-8 -*-
# Copyright 2016-2017 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import partner
from . import res_partner_id_category

5
partner_identification_gln/models/partner.py → partner_identification_gln/models/res_partner_id_category.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2016-2017 ACSONE SA/NV (<http://acsone.eu>) # Copyright 2016-2017 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
@ -18,6 +17,7 @@ except ImportError:
class ResPartnerIdCategory(models.Model): class ResPartnerIdCategory(models.Model):
_inherit = 'res.partner.id_category' _inherit = 'res.partner.id_category'
@api.model
def _search_duplicate(self, category_id, id_number, force_active=False): def _search_duplicate(self, category_id, id_number, force_active=False):
domain = [('category_id', '=', category_id), domain = [('category_id', '=', category_id),
('name', '=', id_number.name), ('name', '=', id_number.name),
@ -26,8 +26,7 @@ class ResPartnerIdCategory(models.Model):
if force_active: if force_active:
domain.append(('partner_id.active', '=', True)) domain.append(('partner_id.active', '=', True))
num_obj = self.env['res.partner.id_number']
return num_obj.search(domain)
return self.env['res.partner.id_number'].search(domain)
@api.multi @api.multi
def validate_res_partner_gln(self, id_number): def validate_res_partner_gln(self, id_number):

3
partner_identification_gln/tests/__init__.py

@ -1,5 +1,2 @@
# -*- coding: utf-8 -*-
# Copyright 2016-2017 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import test_gln from . import test_gln

1
partner_identification_gln/tests/test_gln.py

@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
# Copyright 2016 Acsone S.A. # Copyright 2016 Acsone S.A.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

Loading…
Cancel
Save