[IMP] : black, isort, prettier

This commit is contained in:
Kitti U
2021-04-19 15:52:18 +07:00
parent 9ad505d702
commit 9350f93e62
7 changed files with 25 additions and 15 deletions

View File

@@ -0,0 +1 @@
../../../../stock_request

View File

@@ -0,0 +1,6 @@
import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

View File

@@ -6,7 +6,7 @@
"summary": "Internal request for stock",
"version": "13.0.1.3.1",
"license": "LGPL-3",
"website": "https://github.com/stock-logistics-warehouse",
"website": "https://github.com/OCA/stock-logistics-warehouse",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"category": "Warehouse Management",
"depends": ["stock"],

View File

@@ -113,7 +113,9 @@ class StockRequest(models.Model):
help="Quantity cancelled",
)
picking_count = fields.Integer(
string="Delivery Orders", compute="_compute_picking_ids", readonly=True,
string="Delivery Orders",
compute="_compute_picking_ids",
readonly=True,
)
allocation_ids = fields.One2many(
comodel_name="stock.request.allocation",
@@ -291,7 +293,7 @@ class StockRequest(models.Model):
def _prepare_procurement_values(self, group_id=False):
""" Prepare specific key for moves or other components that
"""Prepare specific key for moves or other components that
will be created from a procurement rule
coming from a stock request. This method could be override
in order to add other custom key that could be used in

View File

@@ -185,8 +185,8 @@ class StockRequest(models.AbstractModel):
@api.constrains("product_id")
def _check_product_uom(self):
""" Check if the UoM has the same category as the
product standard UoM """
"""Check if the UoM has the same category as the
product standard UoM"""
if any(
request.product_id.uom_id.category_id != request.product_uom_id.category_id
for request in self
@@ -240,8 +240,8 @@ class StockRequest(models.AbstractModel):
@api.onchange("company_id")
def onchange_company_id(self):
""" Sets a default warehouse when the company is changed and limits
the user selection of warehouses. """
"""Sets a default warehouse when the company is changed and limits
the user selection of warehouses."""
if self.company_id and (
not self.warehouse_id or self.warehouse_id.company_id != self.company_id
):

View File

@@ -57,7 +57,8 @@ class StockRequestAllocation(models.Model):
"in the default UoM of the product",
)
open_product_qty = fields.Float(
"Open Quantity", compute="_compute_open_product_qty",
"Open Quantity",
compute="_compute_open_product_qty",
)
@api.depends(

View File

@@ -327,7 +327,7 @@ class TestStockRequestBase(TestStockRequest):
self.assertEqual(stock_request.location_id, self.warehouse.lot_stock_id)
def test_stock_request_order_validations_01(self):
""" Testing the discrepancy in warehouse_id between
"""Testing the discrepancy in warehouse_id between
stock request and order"""
expected_date = fields.Datetime.now()
vals = {
@@ -355,7 +355,7 @@ class TestStockRequestBase(TestStockRequest):
self.request_order.with_user(self.stock_request_user).create(vals)
def test_stock_request_order_validations_02(self):
""" Testing the discrepancy in location_id between
"""Testing the discrepancy in location_id between
stock request and order"""
expected_date = fields.Datetime.now()
vals = {
@@ -383,7 +383,7 @@ class TestStockRequestBase(TestStockRequest):
self.request_order.with_user(self.stock_request_user).create(vals)
def test_stock_request_order_validations_03(self):
""" Testing the discrepancy in requested_by between
"""Testing the discrepancy in requested_by between
stock request and order"""
expected_date = fields.Datetime.now()
vals = {
@@ -413,7 +413,7 @@ class TestStockRequestBase(TestStockRequest):
self.request_order.with_user(self.stock_request_user).create(vals)
def test_stock_request_order_validations_04(self):
""" Testing the discrepancy in procurement_group_id between
"""Testing the discrepancy in procurement_group_id between
stock request and order"""
procurement_group = self.env["procurement.group"].create(
{"name": "Procurement"}
@@ -445,7 +445,7 @@ class TestStockRequestBase(TestStockRequest):
self.request_order.with_user(self.stock_request_user).create(vals)
def test_stock_request_order_validations_05(self):
""" Testing the discrepancy in company between
"""Testing the discrepancy in company between
stock request and order"""
expected_date = fields.Datetime.now()
vals = {
@@ -473,7 +473,7 @@ class TestStockRequestBase(TestStockRequest):
self.request_order.with_user(self.stock_request_user).create(vals)
def test_stock_request_order_validations_06(self):
""" Testing the discrepancy in expected dates between
"""Testing the discrepancy in expected dates between
stock request and order"""
expected_date = fields.Datetime.now()
child_expected_date = "2015-01-01"
@@ -502,7 +502,7 @@ class TestStockRequestBase(TestStockRequest):
self.request_order.create(vals)
def test_stock_request_order_validations_07(self):
""" Testing the discrepancy in picking policy between
"""Testing the discrepancy in picking policy between
stock request and order"""
expected_date = fields.Datetime.now()
vals = {