diff --git a/partner_contact_birthplace/README.rst b/partner_contact_birthplace/README.rst new file mode 100644 index 000000000..ad1ab9c04 --- /dev/null +++ b/partner_contact_birthplace/README.rst @@ -0,0 +1,54 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.svg + :target: https://www.gnu.org/licenses/agpl + :alt: License: AGPL-3 + +========================== +Partner contact birthplace +========================== + +This module allows to define a birthplace for partners. + +Usage +===== + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/134/10.0 + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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 `_. + +Contributors +------------ + +* Simone Rubino (www.agilebg.com) + +Do not contact contributors directly about support or help with technical issues. + +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. diff --git a/partner_contact_birthplace/__init__.py b/partner_contact_birthplace/__init__.py new file mode 100644 index 000000000..b44d76594 --- /dev/null +++ b/partner_contact_birthplace/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import models diff --git a/partner_contact_birthplace/__manifest__.py b/partner_contact_birthplace/__manifest__.py new file mode 100644 index 000000000..11e6ca1b4 --- /dev/null +++ b/partner_contact_birthplace/__manifest__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# Copyright 2018 Simone Rubino - Agile Business Group +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + 'name': 'Partner contact birthplace', + 'summary': 'This module allows to define a birthplace for partners.', + 'version': '10.0.1.0.0', + 'category': 'Customer Relationship Management', + 'website': 'https://github.com/OCA/partner-contact/tree/10.0/' + 'partner_contact_birthplace', + 'author': 'Agile Business Group, Odoo Community Association (OCA)', + 'license': 'AGPL-3', + 'application': False, + 'installable': True, + 'depends': [ + 'partner_contact_personal_information_page', + ], + 'data': [ + 'views/res_partner.xml' + ], +} diff --git a/partner_contact_birthplace/i18n/it.po b/partner_contact_birthplace/i18n/it.po new file mode 100644 index 000000000..98a900f84 --- /dev/null +++ b/partner_contact_birthplace/i18n/it.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * partner_contact_birthplace +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0+e\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-05-28 12:58+0000\n" +"PO-Revision-Date: 2018-05-28 12:58+0000\n" +"Last-Translator: Simone Rubino \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: partner_contact_birthplace +#: model:ir.model.fields,field_description:partner_contact_birthplace.field_res_partner_birth_city +#: model:ir.model.fields,field_description:partner_contact_birthplace.field_res_users_birth_city +msgid "Birth city" +msgstr "Città di nascita" + +#. module: partner_contact_birthplace +#: model:ir.model.fields,field_description:partner_contact_birthplace.field_res_partner_birth_country_id +#: model:ir.model.fields,field_description:partner_contact_birthplace.field_res_users_birth_country_id +msgid "Birth country" +msgstr "Stato di nascita" + +#. module: partner_contact_birthplace +#: model:ir.model.fields,field_description:partner_contact_birthplace.field_res_partner_birth_state_id +#: model:ir.model.fields,field_description:partner_contact_birthplace.field_res_users_birth_state_id +msgid "Birth state" +msgstr "Provincia di nascita" + +#. module: partner_contact_birthplace +#: model:ir.model,name:partner_contact_birthplace.model_res_partner +msgid "Partner" +msgstr "Partner" diff --git a/partner_contact_birthplace/models/__init__.py b/partner_contact_birthplace/models/__init__.py new file mode 100644 index 000000000..2d6da8513 --- /dev/null +++ b/partner_contact_birthplace/models/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from . import res_partner diff --git a/partner_contact_birthplace/models/res_partner.py b/partner_contact_birthplace/models/res_partner.py new file mode 100644 index 000000000..014f4cb0b --- /dev/null +++ b/partner_contact_birthplace/models/res_partner.py @@ -0,0 +1,17 @@ +# -*- coding: utf-8 -*- +# Copyright 2018 Simone Rubino - Agile Business Group +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +from odoo import fields, models + + +class ResPartner(models.Model): + _inherit = 'res.partner' + + birth_city = fields.Char() + birth_state_id = fields.Many2one( + comodel_name='res.country.state', string='Birth state', + ondelete='restrict') + birth_country_id = fields.Many2one( + comodel_name='res.country', string='Birth country', + ondelete='restrict') diff --git a/partner_contact_birthplace/static/description/icon.png b/partner_contact_birthplace/static/description/icon.png new file mode 100644 index 000000000..3a0328b51 Binary files /dev/null and b/partner_contact_birthplace/static/description/icon.png differ diff --git a/partner_contact_birthplace/views/res_partner.xml b/partner_contact_birthplace/views/res_partner.xml new file mode 100644 index 000000000..2479108a3 --- /dev/null +++ b/partner_contact_birthplace/views/res_partner.xml @@ -0,0 +1,18 @@ + + + + + + Birthplace field + res.partner + + + + + + + + + +