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. 14
      partner_identification_gln/__manifest__.py
  4. 4
      partner_identification_gln/data/partner_identification_gln.xml
  5. 14
      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
------------
* Alvaro Estebanez <alvaro.estebanez@braintec-group.com>
* Denis Roussel <denis.roussel@acsone.eu>
* 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

14
partner_identification_gln/__manifest__.py

@ -1,4 +1,3 @@
# -*- 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).
@ -7,17 +6,20 @@
'summary': """
This addon extends "Partner Identification Numbers"
to provide a number category for GLN registration""",
'version': '10.0.1.0.0',
'version': '12.0.1.0.0',
'license': 'AGPL-3',
'author': 'Acsone S.A.,Odoo Community Association (OCA)',
'website': 'https://www.acsone.eu',
'website': 'https://github.com/OCA/partner-contact',
'external_dependencies': {
'python': ['stdnum'
'python': [
'stdnum',
],
},
'depends': ['partner_identification'
'depends': [
'partner_identification',
],
'data': ['data/partner_identification_gln.xml'
'data': [
'data/partner_identification_gln.xml',
],
'installable': True,
}

4
partner_identification_gln/data/partner_identification_gln.xml

@ -2,12 +2,12 @@
<!-- Copyright 2016-2017 ACSONE SA/NV (<http://acsone.eu>)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
<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="code">gln_id_number</field>
<field name="validation_code"><![CDATA[failed = self.validate_res_partner_gln(id_number)]]></field>
</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="code">gcp_id_number</field>
<field name="validation_code"><![CDATA[failed = self.validate_res_partner_gcp(id_number)]]></field>

14
partner_identification_gln/i18n/sl.po

@ -2,20 +2,17 @@
# This file contains the translation of the following modules:
# * partner_identification_gln
#
# Translators:
# Matjaž Mozetič <m.mozetic@matmoz.si>, 2017
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Project-Id-Version: Odoo Server 12.0\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"
"Language-Team: Slovenian (https://www.transifex.com/oca/teams/23907/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: 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
msgid "GLN Identification Number"
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>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
@ -18,6 +17,7 @@ except ImportError:
class ResPartnerIdCategory(models.Model):
_inherit = 'res.partner.id_category'
@api.model
def _search_duplicate(self, category_id, id_number, force_active=False):
domain = [('category_id', '=', category_id),
('name', '=', id_number.name),
@ -26,8 +26,7 @@ class ResPartnerIdCategory(models.Model):
if force_active:
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
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

1
partner_identification_gln/tests/test_gln.py

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

Loading…
Cancel
Save