Skip to content

Commit

Permalink
[IMP] : black, isort, prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
primes2h committed Dec 12, 2021
1 parent 4242524 commit d86eb58
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 26 deletions.
27 changes: 12 additions & 15 deletions partner_contact_birthplace/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
'name': 'Partner contact birthplace',
'summary': 'This module allows to define a birthplace for partners.',
'version': '12.0.1.0.0',
'category': 'Customer Relationship Management',
'website': 'https://github.com/OCA/partner-contact/tree/12.0/'
'partner_contact_birthplace',
'author': 'Agile Business Group, Odoo Community Association (OCA)',
'license': 'AGPL-3',
'application': False,
'installable': True,
'depends': [
'partner_contact_personal_information_page',
],
'data': [
'views/res_partner.xml'
"name": "Partner contact birthplace",
"summary": "This module allows to define a birthplace for partners.",
"version": "12.0.1.0.0",
"category": "Customer Relationship Management",
"website": "https://github.com/OCA/partner-contact" "partner_contact_birthplace",
"author": "Agile Business Group, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": [
"partner_contact_personal_information_page",
],
"data": ["views/res_partner.xml"],
}
10 changes: 5 additions & 5 deletions partner_contact_birthplace/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@


class ResPartner(models.Model):
_inherit = 'res.partner'
_inherit = "res.partner"

birth_city = fields.Char()
birth_state_id = fields.Many2one(
comodel_name='res.country.state', string='Birth state',
ondelete='restrict')
comodel_name="res.country.state", string="Birth state", ondelete="restrict"
)
birth_country_id = fields.Many2one(
comodel_name='res.country', string='Birth country',
ondelete='restrict')
comodel_name="res.country", string="Birth country", ondelete="restrict"
)
14 changes: 8 additions & 6 deletions partner_contact_birthplace/views/res_partner.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<!-- License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->

<odoo>
<record id="view_personal_information_birthplace" model="ir.ui.view">
<field name="name">Birthplace field</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="partner_contact_personal_information_page.personal_information"/>
<field
name="inherit_id"
ref="partner_contact_personal_information_page.personal_information"
/>
<field name="arch" type="xml">
<xpath expr="//group[@name='personal_information_group']">
<field name="birth_city"/>
<field name="birth_state_id"/>
<field name="birth_country_id"/>
<field name="birth_city" />
<field name="birth_state_id" />
<field name="birth_country_id" />
</xpath>
</field>
</record>
Expand Down
6 changes: 6 additions & 0 deletions setup/partner_contact_birthplace/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

0 comments on commit d86eb58

Please sign in to comment.