Richard deMeester
9 years ago
committed by
Tima
7 changed files with 68 additions and 85 deletions
-
44partner_contact_nationality/README.rst
-
16partner_contact_nationality/__init__.py
-
32partner_contact_nationality/__openerp__.py
-
26partner_contact_nationality/models.py
-
5partner_contact_nationality/models/__init__.py
-
11partner_contact_nationality/models/res_partner.py
-
15partner_contact_nationality/views/res_partner.xml
@ -1,19 +1,5 @@ |
|||
# -*- coding: 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/>. |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
from . import models |
@ -1,32 +1,26 @@ |
|||
# -*- coding: 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/>. |
|||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). |
|||
|
|||
{ |
|||
"name": "Contact's nationality", |
|||
"version": "8.0.1.0.0", |
|||
"author": "Odoo Community Association (OCA)", |
|||
"name": "Contact nationality", |
|||
"summary": "Add nationality field to contacts", |
|||
"version": "9.0.1.0.0", |
|||
"category": "Customer Relationship Management", |
|||
"website": "https://odoo-community.org/", |
|||
"author": "Grupo ESOC, Odoo Community Association (OCA)", |
|||
"contributors": [ |
|||
'Jairo Llopis <j.llopis@grupoesoc.es>', |
|||
'Richard deMeester <richard@willowit.com.au>', |
|||
], |
|||
"license": "AGPL-3", |
|||
'application': False, |
|||
'installable': True, |
|||
'auto_install': False, |
|||
"depends": [ |
|||
"partner_contact_personal_information_page", |
|||
], |
|||
"data": [ |
|||
"views/res_partner.xml", |
|||
], |
|||
'installable': False, |
|||
} |
@ -1,26 +0,0 @@ |
|||
# -*- coding: 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): |
|||
"""Partner with nationality.""" |
|||
_inherit = "res.partner" |
|||
|
|||
nationality_id = fields.Many2one("res.country", "Nationality") |
@ -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,11 @@ |
|||
# -*- 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' |
|||
|
|||
nationality_id = fields.Many2one("res.country", "Nationality") |
@ -1,19 +1,22 @@ |
|||
</data> |
|||
</openerp> |
|||
|
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<openerp> |
|||
<odoo> |
|||
<data> |
|||
|
|||
<record id="form" model="ir.ui.view"> |
|||
<field name="name">Nationality field</field> |
|||
<record id="view_res_partner_personal_information" model="ir.ui.view"> |
|||
<field name="name">Partner nationality: personal info</field> |
|||
<field name="model">res.partner</field> |
|||
<field name="inherit_id" ref="partner_contact_personal_information_page.personal_information"/> |
|||
<field name="arch" type="xml"> |
|||
<data> |
|||
<xpath expr="//group[@name='personal_information_group']"> |
|||
<field name="nationality_id"/> |
|||
<xpath expr="//page[@name='personal_information_page']/group[@name='personal_information_group']"> |
|||
<field name='nationality_id'/> |
|||
</xpath> |
|||
</data> |
|||
</field> |
|||
</record> |
|||
|
|||
</data> |
|||
</openerp> |
|||
</odoo> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue