From cb2f9856f3e8a687af16cc458f2192476f93a081 Mon Sep 17 00:00:00 2001 From: kongrattapong Date: Fri, 20 Dec 2019 10:00:42 +0700 Subject: [PATCH] [IMP] partner_capital: black, isort --- partner_capital/__init__.py | 1 - partner_capital/__manifest__.py | 28 +++++++++--------- partner_capital/models/__init__.py | 1 - partner_capital/models/res_partner.py | 29 ++++++++++--------- .../models/res_partner_turnover_range.py | 2 +- 5 files changed, 30 insertions(+), 31 deletions(-) diff --git a/partner_capital/__init__.py b/partner_capital/__init__.py index a9e337226..0650744f6 100644 --- a/partner_capital/__init__.py +++ b/partner_capital/__init__.py @@ -1,2 +1 @@ - from . import models diff --git a/partner_capital/__manifest__.py b/partner_capital/__manifest__.py index 166954f8f..877dfcd3e 100644 --- a/partner_capital/__manifest__.py +++ b/partner_capital/__manifest__.py @@ -4,21 +4,19 @@ # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { - 'name': 'Partners Capital', - 'version': '12.0.1.0.0', - 'category': 'Customer Relationship Management', - 'license': 'AGPL-3', - 'author': 'Antiun IngenierĂ­a S.L., ' - 'Tecnativa, ' - 'Odoo Community Association (OCA)', - 'website': 'https://github.com/OCA/partner-contact', - 'depends': [ - 'contacts', - ], - 'data': [ - 'views/res_partner_turnover_range_view.xml', - 'views/res_partner_view.xml', - 'security/ir.model.access.csv', + "name": "Partners Capital", + "version": "12.0.1.0.0", + "category": "Customer Relationship Management", + "license": "AGPL-3", + "author": "Antiun IngenierĂ­a S.L., " + "Tecnativa, " + "Odoo Community Association (OCA)", + "website": "https://github.com/OCA/partner-contact", + "depends": ["contacts"], + "data": [ + "views/res_partner_turnover_range_view.xml", + "views/res_partner_view.xml", + "security/ir.model.access.csv", ], "installable": True, } diff --git a/partner_capital/models/__init__.py b/partner_capital/models/__init__.py index 036ad3507..15a64961d 100644 --- a/partner_capital/models/__init__.py +++ b/partner_capital/models/__init__.py @@ -1,3 +1,2 @@ - from . import res_partner_turnover_range from . import res_partner diff --git a/partner_capital/models/res_partner.py b/partner_capital/models/res_partner.py index 5bdd4ef12..e15d62c24 100644 --- a/partner_capital/models/res_partner.py +++ b/partner_capital/models/res_partner.py @@ -6,24 +6,27 @@ from odoo import fields, models class ResPartner(models.Model): - _inherit = 'res.partner' + _inherit = "res.partner" capital_country_id = fields.Many2one( - 'res.country', + "res.country", "Capital country", - help="Country of origin of this company's capital.") + help="Country of origin of this company's capital.", + ) capital_amount = fields.Monetary( "Capital amount", - currency_field='capital_currency_id', - help="Publicly registered capital amount.") - capital_currency_id = fields.Many2one( - "res.currency", - string="Capital currency") - turnover_range_id = fields.Many2one( - 'res.partner.turnover_range', - "Turnover range") + currency_field="capital_currency_id", + help="Publicly registered capital amount.", + ) + capital_currency_id = fields.Many2one("res.currency", string="Capital currency") + turnover_range_id = fields.Many2one("res.partner.turnover_range", "Turnover range") turnover_amount = fields.Float() company_size = fields.Selection( string="Company size", - selection=[('micro', 'Micro'), ('small', 'Small'), - ('medium', 'Medium'), ('big', 'Big')]) + selection=[ + ("micro", "Micro"), + ("small", "Small"), + ("medium", "Medium"), + ("big", "Big"), + ], + ) diff --git a/partner_capital/models/res_partner_turnover_range.py b/partner_capital/models/res_partner_turnover_range.py index 548ecd6a0..57c7cd824 100644 --- a/partner_capital/models/res_partner_turnover_range.py +++ b/partner_capital/models/res_partner_turnover_range.py @@ -6,7 +6,7 @@ from odoo import fields, models class ResPartnerTurnoverRange(models.Model): - _name = 'res.partner.turnover_range' + _name = "res.partner.turnover_range" _description = "Turnover range" name = fields.Char(required=True, translate=True)