Skip to content

Commit

Permalink
Merge f48107f into a8abb9d
Browse files Browse the repository at this point in the history
  • Loading branch information
jarmokortetjarvi committed Dec 29, 2017
2 parents a8abb9d + f48107f commit f9582d6
Show file tree
Hide file tree
Showing 23 changed files with 556 additions and 164 deletions.
20 changes: 5 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,8 @@ Available addons
----------------
addon | version | summary
--- | --- | ---
[l10n_fi_banks](l10n_fi_banks/) | 10.0.1.0.0 | Finnish banks and their addresses
[l10n_fi_payment_terms](l10n_fi_payment_terms/) | 10.0.1.0.0 | Common Finnish invoice payment terms

[//]: # (end addons)

Translation Status
------------------
[![Transifex Status](https://www.transifex.com/projects/p/OCA-l10n-finland-10-0/chart/image_png)](https://www.transifex.com/projects/p/OCA-l10n-finland-10-0)


----

OCA, or the [Odoo Community Association](http://odoo-community.org/), is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.
[l10n_fi_banks](l10n_fi_banks/) | 10.0.1.0.0 | Finnish banks and their addresses
[l10n_fi_business_code](l10n_fi_business_code/) | 10.0.1.1.1 | Adds a business code (business id) for partners
[l10n_fi_business_code_validate](l10n_fi_business_code_validate/) | 10.0.1.2.0 | Adds validation for l10n_fi_business_code
[l10n_fi_edicode](l10n_fi_edicode/) | 10.0.0.3.6 | Finnish Electronic Data Interchange code
[l10n_fi_payment_terms](l10n_fi_payment_terms/) | 10.0.1.0.0 | Common Finnish invoice payment terms
69 changes: 69 additions & 0 deletions l10n_fi_business_code/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
.. 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

===================================
Partner business code (business id)
===================================

Adds a business code (business id) for partners

Does not add any validation or format checks

Installation
============

\-

Configuration
=============

\-


Usage
=====

\-

Known issues / Roadmap
======================

\-

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/partner-contact/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smash it by providing detailed and welcomed feedback.

Credits
=======

Images
------

* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.

Contributors
------------

* Jarmo Kortetjärvi <jarmo.kortetjarvi@tawasta.fi>


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 https://odoo-community.org.
5 changes: 5 additions & 0 deletions l10n_fi_business_code/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Oy Tawasta OS Technologies Ltd.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
45 changes: 45 additions & 0 deletions l10n_fi_business_code/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Oy Tawasta OS Technologies Ltd.
# Copyright 2017 Oy Tawasta OS Technologies Ltd. (http://www.tawasta.fi)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see http://www.gnu.org/licenses/agpl.html
#
{
"name": "Partner business code (business id)",
"summary": "Adds a business code (business id) for partners",
"version": "10.0.1.1.1",
"category": "CRM",
"website": "https://odoo-community.org/",
"author": "Oy Tawasta Technologies Ltd., Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"external_dependencies": {
"python": [],
"bin": [],
},
"depends": [
"partner_identification",
],
"data": [
'data/res_partner_id_category.xml',
'views/res_partner.xml',
],
"demo": [
],
"qweb": [
]
}
8 changes: 8 additions & 0 deletions l10n_fi_business_code/data/res_partner_id_category.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Business ID -->
<record id="res_partner_id_category_business_id" model="res.partner.id_category">
<field name="code">business_id</field>
<field name="name">Business ID</field>
</record>
</odoo>
35 changes: 35 additions & 0 deletions l10n_fi_business_code/i18n/fi.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_fi_business_code
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 10.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-09-29 11:18+0000\n"
"PO-Revision-Date: 2017-09-29 14:19+0300\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"Language: fi\n"
"X-Generator: Poedit 1.8.7.1\n"

#. module: l10n_fi_business_code
#: model:ir.model.fields,field_description:l10n_fi_business_code.field_res_partner_business_id
#: model:ir.model.fields,field_description:l10n_fi_business_code.field_res_users_business_id
#: model:res.partner.id_category,name:l10n_fi_business_code.res_partner_id_category_business_id
msgid "Business ID"
msgstr "Y-tunnus"

#. module: l10n_fi_business_code
#: model:ir.ui.view,arch_db:l10n_fi_business_code.view_partner_form
msgid "Business id"
msgstr "Y-tunnus"

#. module: l10n_fi_business_code
#: model:ir.model,name:l10n_fi_business_code.model_res_partner
msgid "Partner"
msgstr "Kumppani"
5 changes: 5 additions & 0 deletions l10n_fi_business_code/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Oy Tawasta OS Technologies Ltd.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import res_partner
22 changes: 22 additions & 0 deletions l10n_fi_business_code/models/res_partner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Oy Tawasta OS Technologies Ltd.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import models, fields


class ResPartner(models.Model):
_inherit = 'res.partner'

business_id = fields.Char(
string='Business ID',
compute=lambda s: s._compute_identification(
'business_id', 'business_id',
),
inverse=lambda s: s._inverse_identification(
'business_id', 'business_id',
),
search=lambda s, *a: s._search_identification(
'business_id', *a
),
)
Binary file added l10n_fi_business_code/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions l10n_fi_business_code/views/res_partner.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2017 Oy Tawasta OS Technologies Ltd.
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->

<odoo>
<record id="view_partner_form" model="ir.ui.view">
<field name="name">view.partner.form.business.id</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">

<xpath expr="//h1[1]" position="after">
<h2 attrs="{'invisible': [('is_company', '=', False)]}">
<field name="business_id" placeholder="Business ID"/>
</h2>
</xpath>

</field>
</record>
</odoo>
71 changes: 71 additions & 0 deletions l10n_fi_business_code_validate/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
.. 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

==============================
Partner business code validate
==============================

Adds a business code validation and format checks for business id

Supported countries:
- Finland


Installation
============

\-

Configuration
=============

\-


Usage
=====

\-

Known issues / Roadmap
======================

\-

Bug Tracker
===========

Bugs are tracked on `GitHub Issues
<https://github.com/OCA/partner-contact/issues>`_. In case of trouble, please
check there if your issue has already been reported. If you spotted it first,
help us smash it by providing detailed and welcomed feedback.

Credits
=======

Images
------

* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.

Contributors
------------

* Jarmo Kortetjärvi <jarmo.kortetjarvi@tawasta.fi>


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 https://odoo-community.org.
5 changes: 5 additions & 0 deletions l10n_fi_business_code_validate/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Oy Tawasta OS Technologies Ltd.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import models
44 changes: 44 additions & 0 deletions l10n_fi_business_code_validate/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Author: Oy Tawasta OS Technologies Ltd.
# Copyright 2017 Oy Tawasta OS Technologies Ltd. (http://www.tawasta.fi)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see http://www.gnu.org/licenses/agpl.html
#
{
"name": "Partner business code validate",
"summary": "Adds validation for partner_business_code",
"version": "10.0.1.2.3",
"category": "CRM",
"website": "https://odoo-community.org/",
"author": "Oy Tawasta Technologies Ltd., Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"external_dependencies": {
"python": [],
"bin": [],
},
"depends": [
"l10n_fi_business_code",
],
"data": [
'data/res_partner_id_category.xml',
],
"demo": [
],
"qweb": [
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<!-- Business ID -->
<record id="l10n_fi_business_code.res_partner_id_category_business_id" model="res.partner.id_category">
<field name="validation_code">self.validate_business_id(id_number)</field>
</record>
</odoo>
Loading

0 comments on commit f9582d6

Please sign in to comment.