Browse Source

[IMP] : black, isort, prettier

14.0
Sergio Zanchetta 3 years ago
parent
commit
d86eb5815a
  1. 27
      partner_contact_birthplace/__manifest__.py
  2. 10
      partner_contact_birthplace/models/res_partner.py
  3. 14
      partner_contact_birthplace/views/res_partner.xml
  4. 1
      setup/partner_contact_birthplace/odoo/addons/partner_contact_birthplace
  5. 6
      setup/partner_contact_birthplace/setup.py

27
partner_contact_birthplace/__manifest__.py

@ -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
partner_contact_birthplace/models/res_partner.py

@ -5,12 +5,12 @@ from odoo import fields, models
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
partner_contact_birthplace/views/res_partner.xml

@ -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>

1
setup/partner_contact_birthplace/odoo/addons/partner_contact_birthplace

@ -0,0 +1 @@
../../../../partner_contact_birthplace

6
setup/partner_contact_birthplace/setup.py

@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
Loading…
Cancel
Save