mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[IMP] stock_packaging_calculator_packaging_type: black, isort, prettier
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
../../../../stock_packaging_calculator_packaging_type
|
||||||
6
setup/stock_packaging_calculator_packaging_type/setup.py
Normal file
6
setup/stock_packaging_calculator_packaging_type/setup.py
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import setuptools
|
||||||
|
|
||||||
|
setuptools.setup(
|
||||||
|
setup_requires=['setuptools-odoo'],
|
||||||
|
odoo_addon=True,
|
||||||
|
)
|
||||||
@@ -6,8 +6,7 @@ from odoo import api, models
|
|||||||
|
|
||||||
|
|
||||||
class ProductQtyByPackagingMixin(models.AbstractModel):
|
class ProductQtyByPackagingMixin(models.AbstractModel):
|
||||||
"""Allow displaying product qty by packaging.
|
"""Allow displaying product qty by packaging."""
|
||||||
"""
|
|
||||||
|
|
||||||
_inherit = "product.qty_by_packaging.mixin"
|
_inherit = "product.qty_by_packaging.mixin"
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,8 @@ class TestCalc(TestCommon):
|
|||||||
)
|
)
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
self.product_a.with_context(
|
self.product_a.with_context(
|
||||||
qty_by_packaging_type_fname="name", qty_by_packaging_type_compact=False,
|
qty_by_packaging_type_fname="name",
|
||||||
|
qty_by_packaging_type_compact=False,
|
||||||
).product_qty_by_packaging_as_str(250),
|
).product_qty_by_packaging_as_str(250),
|
||||||
"1 Transport Box,\xa01 Retail Box",
|
"1 Transport Box,\xa01 Retail Box",
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user