Browse Source
Merge branch 'partner_gender_90' of https://github.com/richard-willowit/partner-contact into richard-willowit-partner_gender_90
pull/223/head
Merge branch 'partner_gender_90' of https://github.com/richard-willowit/partner-contact into richard-willowit-partner_gender_90
pull/223/head
Yannick Vaucher
9 years ago
7 changed files with 94 additions and 106 deletions
-
48partner_contact_gender/README.rst
-
18partner_contact_gender/__init__.py
-
37partner_contact_gender/__openerp__.py
-
26partner_contact_gender/models.py
-
5partner_contact_gender/models/__init__.py
-
14partner_contact_gender/models/res_partner.py
-
52partner_contact_gender/views/res_partner.xml
@ -1,19 +1,5 @@ |
|||
# -*- encoding: utf-8 -*- |
|||
|
|||
# Odoo, Open Source Management Solution |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es> |
|||
# |
|||
# 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/>. |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from . import models |
@ -1,26 +0,0 @@ |
|||
# -*- encoding: utf-8 -*- |
|||
|
|||
# Odoo, Open Source Management Solution |
|||
# Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es> |
|||
# |
|||
# 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/>. |
|||
|
|||
from openerp import fields, models |
|||
|
|||
|
|||
class Partner(models.Model): |
|||
"""Partners with gender.""" |
|||
_inherit = "res.partner" |
|||
|
|||
gender = fields.Selection([('male', 'Male'), ('female', 'Female')]) |
@ -0,0 +1,5 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es> |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from . import res_partner |
@ -0,0 +1,14 @@ |
|||
# -*- coding: utf-8 -*- |
|||
# Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es> |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from openerp import fields, models |
|||
|
|||
|
|||
class ResPartner(models.Model): |
|||
_inherit = 'res.partner' |
|||
|
|||
gender = fields.Selection([('male', 'Male'), |
|||
('female', 'Female'), |
|||
('other', 'Other') |
|||
]) |
@ -1,38 +1,38 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
|
|||
<!-- |
|||
Odoo, Open Source Management Solution |
|||
Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es> |
|||
|
|||
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/>. |
|||
--> |
|||
|
|||
<openerp> |
|||
<odoo> |
|||
<data> |
|||
|
|||
<record id="form" model="ir.ui.view"> |
|||
<field name="name">Partner gender</field> |
|||
<!-- Declared the same in every module that may need it --> |
|||
<record id="base.personal_contact_information" model="ir.ui.view"> |
|||
<field name="name">Personal information page for contacts form</field> |
|||
<field name="model">res.partner</field> |
|||
<field name="inherit_id" ref="base.view_partner_form"/> |
|||
<field name="priority">2</field> |
|||
<field name="arch" type="xml"> |
|||
<data> |
|||
<xpath expr="//page[@name='internal_notes']" position="after"> |
|||
<page name="personal_information_page" |
|||
string="Personal Information" |
|||
attrs="{'invisible': [('is_company','=',True)]}"> |
|||
<group name="personal_information_group"/> |
|||
</page> |
|||
</xpath> |
|||
</data> |
|||
</field> |
|||
</record> |
|||
|
|||
<record id="personal_contact_information" model="ir.ui.view"> |
|||
<field name="name">Partner gender: personal info</field> |
|||
<field name="model">res.partner</field> |
|||
<field name="inherit_id" ref="partner_contact_personal_information_page.personal_information"/> |
|||
<field name="inherit_id" ref="base.personal_contact_information"/> |
|||
<field name="arch" type="xml"> |
|||
<data> |
|||
<xpath expr="//group[@name='personal_information_group']"> |
|||
<field name="gender"/> |
|||
<xpath expr="//page[@name='personal_information_page']/group[@name='personal_information_group']"> |
|||
<field name='gender'/> |
|||
</xpath> |
|||
</data> |
|||
</field> |
|||
</record> |
|||
|
|||
</data> |
|||
</openerp> |
|||
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue