Browse Source

[IMP] partner_company_group: black, isort

14.0
ernestotejeda 5 years ago
committed by newtratip
parent
commit
eec3c26013
  1. 33
      partner_company_group/__manifest__.py
  2. 7
      partner_company_group/models/account_invoice.py
  3. 7
      partner_company_group/models/crm_lead.py
  4. 10
      partner_company_group/models/res_partner.py
  5. 7
      partner_company_group/models/sale_order.py

33
partner_company_group/__manifest__.py

@ -1,24 +1,19 @@
# Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
'name': 'Partner Company Group',
'summary': 'Adds the possibility to add a company group to a company',
'version': '12.0.1.0.0',
'category': 'Sales',
'author': 'Camptocamp SA, Odoo Community Association (OCA)',
'license': 'AGPL-3',
'depends': [
'base',
'account',
'crm',
'sale',
"name": "Partner Company Group",
"summary": "Adds the possibility to add a company group to a company",
"version": "12.0.1.0.0",
"category": "Sales",
"author": "Camptocamp SA, Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": ["base", "account", "crm", "sale"],
"website": "https://github.com/OCA/partner-contact",
"data": [
"views/opportunity_view.xml",
"views/contact_view.xml",
"views/sale_order_view.xml",
"views/account_invoice_view.xml",
],
'website': 'https://github.com/OCA/partner-contact',
'data': [
'views/opportunity_view.xml',
'views/contact_view.xml',
'views/sale_order_view.xml',
'views/account_invoice_view.xml',
],
'installable': True,
"installable": True,
}

7
partner_company_group/models/account_invoice.py

@ -1,13 +1,12 @@
# Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models, fields
from odoo import fields, models
class AccountInvoice(models.Model):
_inherit = 'account.invoice'
_inherit = "account.invoice"
company_group_id = fields.Many2one(
related='partner_id.company_group_id',
store=True
related="partner_id.company_group_id", store=True
)

7
partner_company_group/models/crm_lead.py

@ -1,13 +1,12 @@
# Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models, fields
from odoo import fields, models
class CrmLead(models.Model):
_inherit = 'crm.lead'
_inherit = "crm.lead"
company_group_id = fields.Many2one(
related='partner_id.company_group_id',
store=True
related="partner_id.company_group_id", store=True
)

10
partner_company_group/models/res_partner.py

@ -1,17 +1,15 @@
# Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models, fields
from odoo import fields, models
class Contact(models.Model):
_inherit = 'res.partner'
_inherit = "res.partner"
company_group_id = fields.Many2one(
'res.partner',
'Company group',
domain=[('is_company', '=', True)]
"res.partner", "Company group", domain=[("is_company", "=", True)]
)
def _commercial_fields(self):
return super(Contact, self)._commercial_fields() + ['company_group_id']
return super(Contact, self)._commercial_fields() + ["company_group_id"]

7
partner_company_group/models/sale_order.py

@ -1,13 +1,12 @@
# Copyright 2019 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models, fields
from odoo import fields, models
class SaleOrder(models.Model):
_inherit = 'sale.order'
_inherit = "sale.order"
company_group_id = fields.Many2one(
related='partner_id.company_group_id',
store=True
related="partner_id.company_group_id", store=True
)
Loading…
Cancel
Save