From bb34ca493e11f9d27ba790dd5d07192acd7ac3a9 Mon Sep 17 00:00:00 2001 From: Iryna Vyshnevska Date: Fri, 18 Oct 2019 11:44:24 +0300 Subject: [PATCH] fixup! [MIG][13.0] agreemnt_sale + black --- agreement_sale/models/res_config_settings.py | 8 +++---- agreement_sale/models/sale.py | 25 +++++++++++++------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/agreement_sale/models/res_config_settings.py b/agreement_sale/models/res_config_settings.py index 167bc9c4..71c68272 100644 --- a/agreement_sale/models/res_config_settings.py +++ b/agreement_sale/models/res_config_settings.py @@ -2,13 +2,11 @@ from odoo import fields, models class ResConfigSettings(models.TransientModel): - _inherit = 'res.config.settings' + _inherit = "res.config.settings" group_use_agreement_type = fields.Boolean( - 'Use agreement types', - implied_group='agreement.group_use_agreement_type' + "Use agreement types", implied_group="agreement.group_use_agreement_type" ) group_use_agreement_template = fields.Boolean( - 'Use agreement template', - implied_group='agreement.group_use_agreement_template' + "Use agreement template", implied_group="agreement.group_use_agreement_template" ) diff --git a/agreement_sale/models/sale.py b/agreement_sale/models/sale.py index bf97d9de..88b52345 100644 --- a/agreement_sale/models/sale.py +++ b/agreement_sale/models/sale.py @@ -2,19 +2,28 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo import models, fields +from odoo import fields, models class SaleOrder(models.Model): - _inherit = 'sale.order' + _inherit = "sale.order" agreement_id = fields.Many2one( - comodel_name='agreement', string='Agreement', ondelete='restrict', - track_visibility='onchange', readonly=True, copy=False, - states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}) + comodel_name="agreement", + string="Agreement", + ondelete="restrict", + track_visibility="onchange", + readonly=True, + copy=False, + states={"draft": [("readonly", False)], "sent": [("readonly", False)]}, + ) agreement_type_id = fields.Many2one( - comodel_name="agreement.type", string="Agreement Type", + comodel_name="agreement.type", + string="Agreement Type", ondelete="restrict", - track_visibility='onchange', readonly=True, copy=True, - states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}) + track_visibility="onchange", + readonly=True, + copy=True, + states={"draft": [("readonly", False)], "sent": [("readonly", False)]}, + )