Browse Source

[IMP] partner_contact_nationality: black, isort, prettier

14.0
Marçal Isern 4 years ago
committed by newtratip
parent
commit
9fc4e5ab8d
  1. 20
      partner_contact_nationality/__manifest__.py
  2. 2
      partner_contact_nationality/models/res_partner.py
  3. 33
      partner_contact_nationality/views/res_partner.xml

20
partner_contact_nationality/__manifest__.py

@ -9,18 +9,14 @@
"website": "https://odoo-community.org/", "website": "https://odoo-community.org/",
"author": "Grupo ESOC, Odoo Community Association (OCA)", "author": "Grupo ESOC, Odoo Community Association (OCA)",
"contributors": [ "contributors": [
'Jairo Llopis <j.llopis@grupoesoc.es>',
'Richard deMeester <richard@willowit.com.au>',
'Denis Roussel <denis.roussel@acsone.eu>',
"Jairo Llopis <j.llopis@grupoesoc.es>",
"Richard deMeester <richard@willowit.com.au>",
"Denis Roussel <denis.roussel@acsone.eu>",
], ],
"license": "AGPL-3", "license": "AGPL-3",
'application': False,
'installable': True,
'auto_install': False,
"depends": [
"partner_contact_personal_information_page",
],
"data": [
"views/res_partner.xml",
],
"application": False,
"installable": True,
"auto_install": False,
"depends": ["partner_contact_personal_information_page"],
"data": ["views/res_partner.xml"],
} }

2
partner_contact_nationality/models/res_partner.py

@ -5,6 +5,6 @@ from odoo import fields, models
class ResPartner(models.Model): class ResPartner(models.Model):
_inherit = 'res.partner'
_inherit = "res.partner"
nationality_id = fields.Many2one("res.country", "Nationality") nationality_id = fields.Many2one("res.country", "Nationality")

33
partner_contact_nationality/views/res_partner.xml

@ -1,17 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo> <odoo>
<record id="view_personal_information_page_nationality" 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="//page[@name='personal_information_page']/group[@name='personal_information_group']">
<field name='nationality_id'/>
</xpath>
</data>
</field>
</record>
<record id="view_personal_information_page_nationality" 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="//page[@name='personal_information_page']/group[@name='personal_information_group']"
>
<field name='nationality_id' />
</xpath>
</data>
</field>
</record>
</odoo> </odoo>
Loading…
Cancel
Save