From a4fb75f657e4674d23f3c146e9538a9208c46066 Mon Sep 17 00:00:00 2001 From: Vincent Van Rossem Date: Tue, 22 Sep 2020 13:05:45 +0200 Subject: [PATCH] [IMP] beesdoo_purchase: black formatter (-l 79 -t py35) --- beesdoo_purchase/models/__init__.py | 2 +- beesdoo_purchase/models/account_invoice.py | 14 ++++++++------ beesdoo_purchase/models/res_config.py | 7 +++---- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/beesdoo_purchase/models/__init__.py b/beesdoo_purchase/models/__init__.py index 118e747..415c11a 100644 --- a/beesdoo_purchase/models/__init__.py +++ b/beesdoo_purchase/models/__init__.py @@ -1,3 +1,3 @@ from . import account_invoice from . import purchase -from . import res_config \ No newline at end of file +from . import res_config diff --git a/beesdoo_purchase/models/account_invoice.py b/beesdoo_purchase/models/account_invoice.py index f6cc57a..2bdf44c 100644 --- a/beesdoo_purchase/models/account_invoice.py +++ b/beesdoo_purchase/models/account_invoice.py @@ -2,13 +2,15 @@ from odoo import api, fields, models, _ class AccountInvoice(models.Model): - _inherit = 'account.invoice' + _inherit = "account.invoice" def _prepare_invoice_line_from_po_line(self, line): """ Override parent's method to invert Purchase Order Reference on invoice line""" - invoice_line = super(AccountInvoice, self)._prepare_invoice_line_from_po_line(line) + invoice_line = super( + AccountInvoice, self + )._prepare_invoice_line_from_po_line(line) if self.user_has_groups( - 'beesdoo_purchase.' - 'group_invert_po_ref_on_inv_line'): - invoice_line['name'] = line.name + ': ' + line.order_id.name - return invoice_line \ No newline at end of file + "beesdoo_purchase." "group_invert_po_ref_on_inv_line" + ): + invoice_line["name"] = line.name + ": " + line.order_id.name + return invoice_line diff --git a/beesdoo_purchase/models/res_config.py b/beesdoo_purchase/models/res_config.py index f6f4fc0..7f36d18 100644 --- a/beesdoo_purchase/models/res_config.py +++ b/beesdoo_purchase/models/res_config.py @@ -2,13 +2,12 @@ from odoo import fields, models class ResConfigSettings(models.TransientModel): - _inherit = 'res.config.settings' + _inherit = "res.config.settings" group_invert_po_ref_on_inv_line = fields.Boolean( """Allow inverting the Purchase Order Reference on the invoice lines""", - implied_group="beesdoo_purchase." - "group_invert_po_ref_on_inv_line", + implied_group="beesdoo_purchase." "group_invert_po_ref_on_inv_line", help="""Allows you to invert Purchase Order Reference on the - invoice lines.""" + invoice lines.""", )