mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[IMP] product_quick_bom: black, isort
This commit is contained in:
@@ -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)",
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user