From 2eaded69013932e49be8fd9709931d28ae0e4635 Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Tue, 26 May 2015 10:39:24 +0200 Subject: [PATCH] Add module partner_contact_affected_by_gender_violence. --- .../README.rst | 66 +++++++++++++++++++ .../__init__.py | 19 ++++++ .../__openerp__.py | 32 +++++++++ .../i18n/es.po | 28 ++++++++ ...er_contact_affected_by_gender_violence.pot | 27 ++++++++ .../models.py | 25 +++++++ .../views/res_partner.xml | 20 ++++++ 7 files changed, 217 insertions(+) create mode 100644 partner_contact_affected_by_gender_violence/README.rst create mode 100644 partner_contact_affected_by_gender_violence/__init__.py create mode 100644 partner_contact_affected_by_gender_violence/__openerp__.py create mode 100644 partner_contact_affected_by_gender_violence/i18n/es.po create mode 100644 partner_contact_affected_by_gender_violence/i18n/partner_contact_affected_by_gender_violence.pot create mode 100644 partner_contact_affected_by_gender_violence/models.py create mode 100644 partner_contact_affected_by_gender_violence/views/res_partner.xml diff --git a/partner_contact_affected_by_gender_violence/README.rst b/partner_contact_affected_by_gender_violence/README.rst new file mode 100644 index 000000000..167e5bec8 --- /dev/null +++ b/partner_contact_affected_by_gender_violence/README.rst @@ -0,0 +1,66 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :alt: License: AGPL-3 + +Module name +=========== + +This module was written to extend the functionality of Odoo to support having a +checkbox that indicates if your contacts have been affected by gender violence. + +Installation +============ + +To install this module, you need to: + +* Install the OCA repository `partner-contact`_. + +Configuration +============= + +No configuration is needed. + +Usage +===== + +To use this module, you need to: + +* Edit or create a partner. +* Ensure it is **not** a company. +* Go to the *Personal Information* sheet. +* Set the *Affected by gender violence* checkbox there. + +For further information, please visit: + +* https://www.odoo.com/forum/help-1 +* https://github.com/OCA/partner-contact/ + +Known issues / Roadmap +====================== + +* None. + +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. + + +.. _partner-contact: https://github.com/OCA/partner-contact/ diff --git a/partner_contact_affected_by_gender_violence/__init__.py b/partner_contact_affected_by_gender_violence/__init__.py new file mode 100644 index 000000000..3b3430c28 --- /dev/null +++ b/partner_contact_affected_by_gender_violence/__init__.py @@ -0,0 +1,19 @@ +# -*- coding: 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_contact_affected_by_gender_violence/__openerp__.py b/partner_contact_affected_by_gender_violence/__openerp__.py new file mode 100644 index 000000000..9db0332f7 --- /dev/null +++ b/partner_contact_affected_by_gender_violence/__openerp__.py @@ -0,0 +1,32 @@ +# -*- coding: 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": "Contact affected by gender violence", + "summary": "Know if a contact has been affected by gender violence", + "version": "1.0.0", + "author": "Odoo Community Association (OCA)", + "category": "Customer Relationship Management", + "website": "https://odoo-community.org/", + "depends": [ + "partner_contact_personal_information_page", + ], + "data": [ + "views/res_partner.xml", + ], +} diff --git a/partner_contact_affected_by_gender_violence/i18n/es.po b/partner_contact_affected_by_gender_violence/i18n/es.po new file mode 100644 index 000000000..4d4e987df --- /dev/null +++ b/partner_contact_affected_by_gender_violence/i18n/es.po @@ -0,0 +1,28 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * partner_contact_affected_by_gender_violence +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0-20150514\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-05-26 08:34+0000\n" +"PO-Revision-Date: 2015-05-26 10:36+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_contact_affected_by_gender_violence +#: field:res.partner,affected_by_gender_violence:0 +msgid "Affected by gender violence" +msgstr "Afectado por violencia de género" + +#. module: partner_contact_affected_by_gender_violence +#: model:ir.model,name:partner_contact_affected_by_gender_violence.model_res_partner +msgid "Partner" +msgstr "Empresa" diff --git a/partner_contact_affected_by_gender_violence/i18n/partner_contact_affected_by_gender_violence.pot b/partner_contact_affected_by_gender_violence/i18n/partner_contact_affected_by_gender_violence.pot new file mode 100644 index 000000000..1a18f442f --- /dev/null +++ b/partner_contact_affected_by_gender_violence/i18n/partner_contact_affected_by_gender_violence.pot @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * partner_contact_affected_by_gender_violence +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 8.0-20150514\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-05-26 08:34+0000\n" +"PO-Revision-Date: 2015-05-26 08:34+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_contact_affected_by_gender_violence +#: field:res.partner,affected_by_gender_violence:0 +msgid "Affected by gender violence" +msgstr "" + +#. module: partner_contact_affected_by_gender_violence +#: model:ir.model,name:partner_contact_affected_by_gender_violence.model_res_partner +msgid "Partner" +msgstr "" + diff --git a/partner_contact_affected_by_gender_violence/models.py b/partner_contact_affected_by_gender_violence/models.py new file mode 100644 index 000000000..81ff2c6c0 --- /dev/null +++ b/partner_contact_affected_by_gender_violence/models.py @@ -0,0 +1,25 @@ +# -*- coding: 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): + _inherit = "res.partner" + + affected_by_gender_violence = fields.Boolean() diff --git a/partner_contact_affected_by_gender_violence/views/res_partner.xml b/partner_contact_affected_by_gender_violence/views/res_partner.xml new file mode 100644 index 000000000..0f470f4f1 --- /dev/null +++ b/partner_contact_affected_by_gender_violence/views/res_partner.xml @@ -0,0 +1,20 @@ + + + + + + Affected by gender violence field + res.partner + + + + + + + + + + + +