Browse Source

[IMP] partner_capital: black, isort

14.0
kongrattapong 5 years ago
committed by Víctor Martínez
parent
commit
cb2f9856f3
  1. 1
      partner_capital/__init__.py
  2. 28
      partner_capital/__manifest__.py
  3. 1
      partner_capital/models/__init__.py
  4. 29
      partner_capital/models/res_partner.py
  5. 2
      partner_capital/models/res_partner_turnover_range.py

1
partner_capital/__init__.py

@ -1,2 +1 @@
from . import models

28
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,
}

1
partner_capital/models/__init__.py

@ -1,3 +1,2 @@
from . import res_partner_turnover_range
from . import res_partner

29
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"),
],
)

2
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)
Loading…
Cancel
Save