Skip to content

Commit

Permalink
Merge bedc844 into ab97adc
Browse files Browse the repository at this point in the history
  • Loading branch information
Menestrels committed Jan 2, 2019
2 parents ab97adc + bedc844 commit 93ff2be
Show file tree
Hide file tree
Showing 11 changed files with 243 additions and 0 deletions.
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/l10n-finland/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.
4 changes: 4 additions & 0 deletions l10n_fi_business_code/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# 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/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
##############################################################################
#
# 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": "12.0.1.0.0",
"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>
31 changes: 31 additions & 0 deletions l10n_fi_business_code/i18n/fi.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 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: 2018-03-16 20:07+0000\n"
"PO-Revision-Date: 2018-03-16 22:07+0200\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"Language: fi\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \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:ir.ui.view,arch_db:l10n_fi_business_code.view_partner_form
#: 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.model,name:l10n_fi_business_code.model_res_partner
msgid "Partner"
msgstr "Kumppani"
28 changes: 28 additions & 0 deletions l10n_fi_business_code/i18n/l10n_fi_business_code.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * l10n_fi_business_code
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 11.0\n"
"Report-Msgid-Bugs-To: \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: 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:ir.ui.view,arch_db:l10n_fi_business_code.view_partner_form
#: model:res.partner.id_category,name:l10n_fi_business_code.res_partner_id_category_business_id
msgid "Business ID"
msgstr ""

#. module: l10n_fi_business_code
#: model:ir.model,name:l10n_fi_business_code.model_res_partner
msgid "Contact"
msgstr ""

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

from . import res_partner
21 changes: 21 additions & 0 deletions l10n_fi_business_code/models/res_partner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# 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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions l10n_fi_business_code/views/res_partner.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<?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>

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

<field name="name" position="after">
<field name="business_id" filter_domain="[('business_id','like',self)]" />
</field>

</field>
</record>
</odoo>
1 change: 1 addition & 0 deletions oca_dependencies.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
partner-contact https://github.com/OCA/partner-contact

0 comments on commit 93ff2be

Please sign in to comment.