From 638f3125a854e265e8bfb3cde6c15309f9398ab8 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Mon, 18 May 2015 13:06:01 +0200 Subject: [PATCH] Add module partner_gender. --- partner_gender/README.rst | 59 +++++++++++++++++++++ partner_gender/__init__.py | 19 +++++++ partner_gender/__openerp__.py | 35 ++++++++++++ partner_gender/i18n/es.po | 38 +++++++++++++ partner_gender/i18n/partner_gender.pot | 37 +++++++++++++ partner_gender/models.py | 26 +++++++++ partner_gender/static/description/icon.png | Bin 0 -> 1978 bytes partner_gender/static/description/icon.svg | 49 +++++++++++++++++ partner_gender/views/res_partner.xml | 38 +++++++++++++ 9 files changed, 301 insertions(+) create mode 100644 partner_gender/README.rst create mode 100644 partner_gender/__init__.py create mode 100644 partner_gender/__openerp__.py create mode 100644 partner_gender/i18n/es.po create mode 100644 partner_gender/i18n/partner_gender.pot create mode 100644 partner_gender/models.py create mode 100644 partner_gender/static/description/icon.png create mode 100644 partner_gender/static/description/icon.svg create mode 100644 partner_gender/views/res_partner.xml diff --git a/partner_gender/README.rst b/partner_gender/README.rst new file mode 100644 index 000000000..bab19569f --- /dev/null +++ b/partner_gender/README.rst @@ -0,0 +1,59 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :alt: License: AGPL-3 + +Partner Gender +============== + +This module was written to extend the functionality of `base_contact`_ to +support setting the gender of a partner. + + +.. _base_contact: https://github.com/OCA/partner-contact/tree/8.0/base_contact + +Installation +============ + +To install this module, you need to: + +* Install the `partner-contact`_ repository. + + +.. _partner-contact: https://github.com/OCA/partner-contact/ + +Usage +===== + +To use this module, you need to: + +* Edit a partner or create a new one. +* Ensure the partner is **not** a company. +* Go to the *Personal information* sheet. +* Set the gender there. + +For further information, please visit: + +* https://www.odoo.com/forum/help-1 +* https://github.com/OCA/partner-contact/ + +Credits +======= + +Contributors +------------ + +* Jairo Llopis + +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 http://odoo-community.org. diff --git a/partner_gender/__init__.py b/partner_gender/__init__.py new file mode 100644 index 000000000..685080d25 --- /dev/null +++ b/partner_gender/__init__.py @@ -0,0 +1,19 @@ +# -*- encoding: utf-8 -*- + +# Odoo, Open Source Management Solution +# Copyright (C) 2014-2015 Grupo ESOC +# +# 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 . + +from . import models diff --git a/partner_gender/__openerp__.py b/partner_gender/__openerp__.py new file mode 100644 index 000000000..1634a4d3e --- /dev/null +++ b/partner_gender/__openerp__.py @@ -0,0 +1,35 @@ +# -*- encoding: utf-8 -*- + +# Odoo, Open Source Management Solution +# Copyright (C) 2014-2015 Grupo ESOC +# +# 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 . + +{ + "name": "Partner gender", + "version": "1.0", + "category": "Customer Relationship Management", + "author": "Odoo Community Association (OCA), Grupo ESOC", + "license": "AGPL-3", + "website": "https://odoo-community.org/", + "installable": True, + "application": False, + "summary": "Add gender field to partners", + "depends": [ + "base_contact", + ], + "data": [ + "views/res_partner.xml", + ], +} diff --git a/partner_gender/i18n/es.po b/partner_gender/i18n/es.po new file mode 100644 index 000000000..f58f87b5a --- /dev/null +++ b/partner_gender/i18n/es.po @@ -0,0 +1,38 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * partner_gender +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0-20150514\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-05-18 10:55+0000\n" +"PO-Revision-Date: 2015-05-18 12:57+0100\n" +"Last-Translator: Jairo Llopis \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"X-Generator: Poedit 1.7.6\n" +"Language: es_ES\n" + +#. module: partner_gender +#: selection:res.partner,gender:0 +msgid "Female" +msgstr "Femenino" + +#. module: partner_gender +#: field:res.partner,gender:0 +msgid "Gender" +msgstr "Género" + +#. module: partner_gender +#: selection:res.partner,gender:0 +msgid "Male" +msgstr "Masculino" + +#. module: partner_gender +#: model:ir.model,name:partner_gender.model_res_partner +msgid "Partner" +msgstr "Empresa" diff --git a/partner_gender/i18n/partner_gender.pot b/partner_gender/i18n/partner_gender.pot new file mode 100644 index 000000000..b7839051f --- /dev/null +++ b/partner_gender/i18n/partner_gender.pot @@ -0,0 +1,37 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * partner_gender +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0-20150514\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-05-18 10:55+0000\n" +"PO-Revision-Date: 2015-05-18 10:55+0000\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: partner_gender +#: selection:res.partner,gender:0 +msgid "Female" +msgstr "" + +#. module: partner_gender +#: field:res.partner,gender:0 +msgid "Gender" +msgstr "" + +#. module: partner_gender +#: selection:res.partner,gender:0 +msgid "Male" +msgstr "" + +#. module: partner_gender +#: model:ir.model,name:partner_gender.model_res_partner +msgid "Partner" +msgstr "" + diff --git a/partner_gender/models.py b/partner_gender/models.py new file mode 100644 index 000000000..88f632381 --- /dev/null +++ b/partner_gender/models.py @@ -0,0 +1,26 @@ +# -*- encoding: utf-8 -*- + +# Odoo, Open Source Management Solution +# Copyright (C) 2014-2015 Grupo ESOC +# +# 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 . + +from openerp import fields, models + + +class Partner(models.Model): + """Partners with gender.""" + _inherit = "res.partner" + + gender = fields.Selection([('male', 'Male'), ('female', 'Female')]) diff --git a/partner_gender/static/description/icon.png b/partner_gender/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..09168c60eae08813041e5f96bb4d401140c1b8ed GIT binary patch literal 1978 zcmV;r2SxaaP)0fB{WA8Iz4 z8K%!v^{uLh{*rpwt(ors^xs{5y1J^S6B)&f1#SVVLu}&&uq9VALNEk41$YsakASK~ zBd9QD5uF(wWxk1k%)LV5I39P~7LZX$y~&3&LkjV13&;#9=-@Q47x)g?kSo80)G`)Wi=G)%fFmLI=M)owrNDlo>s{Rm zEC8+upl2*_NMj#OK%cztO%y)s{5_-!m;r1eIurcL#@xPi&^2Q#aB0zZQ)|fWzz*U! zqPT1Zt`l^P1OCz2PAM}Wg@z0P){wjr`K2BB5U4HEHV*h#Dg#lOi0Rq87kC$#4Gcw2%ew+2fqAIG z1T6vfSFUVFnV)JdLp=-V2K^uKJ}`-JS8O$^Df$>VYq0-{HlrT+9ld~00!x4aG3XeE zYLd=rYAG&1PyuH2Mn9!pO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partner_gender/views/res_partner.xml b/partner_gender/views/res_partner.xml new file mode 100644 index 000000000..2a7f53139 --- /dev/null +++ b/partner_gender/views/res_partner.xml @@ -0,0 +1,38 @@ + + + + + + + + + Partner gender + res.partner + + + + + + + + + + + +