From aaf95c4cb4f0c2b3eb50c48cbd70e3a3c8f757dc Mon Sep 17 00:00:00 2001 From: ps-tubtim Date: Thu, 12 Mar 2020 15:47:16 +0700 Subject: [PATCH] [IMP] product_quick_bom: black, isort --- product_quick_bom/__manifest__.py | 2 +- product_quick_bom/models/product.py | 5 +---- product_quick_bom/tests/test_quick_bom.py | 7 +++---- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/product_quick_bom/__manifest__.py b/product_quick_bom/__manifest__.py index aa4c0cedb..2796dd87b 100644 --- a/product_quick_bom/__manifest__.py +++ b/product_quick_bom/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Product Quick Bom", "summary": "Create the bom directly from the product", - "version": "12.0.1.0.0", + "version": "13.0.1.0.0", "category": "mrp", "website": "https://github.com/OCA/manufacture", "author": "Akretion, Odoo Community Association (OCA)", diff --git a/product_quick_bom/models/product.py b/product_quick_bom/models/product.py index e6afef532..c67fa3e49 100644 --- a/product_quick_bom/models/product.py +++ b/product_quick_bom/models/product.py @@ -26,10 +26,7 @@ class ProductTemplate(models.Model): # we just add a button to create one def button_create_bom(self): self.ensure_one() - vals = { - "product_tmpl_id": self.id, - "type": "normal", - } + vals = {"product_tmpl_id": self.id, "type": "normal"} self.env["mrp.bom"].create(vals) specific_bom_line_ids = fields.One2many( diff --git a/product_quick_bom/tests/test_quick_bom.py b/product_quick_bom/tests/test_quick_bom.py index c2e01afba..e25f768f0 100644 --- a/product_quick_bom/tests/test_quick_bom.py +++ b/product_quick_bom/tests/test_quick_bom.py @@ -1,9 +1,10 @@ # Copyright (C) 2015 Akretion (http://www.akretion.com). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from odoo.tests.common import TransactionCase import logging +from odoo.tests.common import TransactionCase + _logger = logging.getLogger(__name__) @@ -15,9 +16,7 @@ class TestQuickBom(TransactionCase): self.prd_1 = self.env.ref("mrp.product_product_computer_desk_bolt") self.prd_2 = self.env.ref("mrp.product_product_computer_desk_screw") self.prd_3 = self.env.ref("mrp.product_product_wood_ply") - self.tmpl_4 = self.env.ref( - "product.product_delivery_02_product_template" - ) + self.tmpl_4 = self.env.ref("product.product_delivery_02_product_template") def test_create_bom(self): self.tmpl_4.button_create_bom()