-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
556 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": [ | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
), | ||
) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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": [ | ||
] | ||
} |
7 changes: 7 additions & 0 deletions
7
l10n_fi_business_code_validate/data/res_partner_id_category.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
Oops, something went wrong.