[IMP] stock_packaging_calculator: black, isort, prettier

This commit is contained in:
nguyen hoang hiep
2021-09-14 05:57:42 +00:00
parent aa3bed30d7
commit da79f32ca5
4 changed files with 62 additions and 6 deletions

View File

@@ -0,0 +1,54 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * stock_packaging_calculator
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 14.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: stock_packaging_calculator
#: model:ir.model.fields,field_description:stock_packaging_calculator.field_product_qty_by_packaging_mixin__display_name
msgid "Display Name"
msgstr ""
#. module: stock_packaging_calculator
#: model:ir.model.fields,field_description:stock_packaging_calculator.field_product_qty_by_packaging_mixin__id
msgid "ID"
msgstr ""
#. module: stock_packaging_calculator
#: model:ir.model.fields,field_description:stock_packaging_calculator.field_product_qty_by_packaging_mixin____last_update
msgid "Last Modified on"
msgstr ""
#. module: stock_packaging_calculator
#: model:ir.model.fields,field_description:stock_packaging_calculator.field_product_product__packaging_contained_mapping
msgid "Packaging Contained Mapping"
msgstr ""
#. module: stock_packaging_calculator
#: model:ir.model,name:stock_packaging_calculator.model_product_product
msgid "Product"
msgstr ""
#. module: stock_packaging_calculator
#: model:ir.model,name:stock_packaging_calculator.model_product_qty_by_packaging_mixin
msgid "Product Qty By Packaging (Mixin)"
msgstr ""
#. module: stock_packaging_calculator
#: model:ir.model.fields,field_description:stock_packaging_calculator.field_product_qty_by_packaging_mixin__product_qty_by_packaging_display
msgid "Qty by packaging"
msgstr ""
#. module: stock_packaging_calculator
#: model:ir.model.fields,help:stock_packaging_calculator.field_product_product__packaging_contained_mapping
msgid "Technical field to store contained packaging. "
msgstr ""

View File

@@ -6,8 +6,7 @@ from odoo import api, fields, models
class ProductQtyByPackagingMixin(models.AbstractModel): class ProductQtyByPackagingMixin(models.AbstractModel):
"""Allow displaying product qty by packaging. """Allow displaying product qty by packaging."""
"""
_name = "product.qty_by_packaging.mixin" _name = "product.qty_by_packaging.mixin"
_description = "Product Qty By Packaging (Mixin)" _description = "Product Qty By Packaging (Mixin)"

View File

@@ -121,7 +121,9 @@ class TestCalc(TestCommon):
contained=[make_pkg_values(self.pkg_box, qty=4)], contained=[make_pkg_values(self.pkg_box, qty=4)],
), ),
make_pkg_values( make_pkg_values(
self.pkg_box, qty=1, contained=[make_pkg_values(self.uom_unit, qty=50)], self.pkg_box,
qty=1,
contained=[make_pkg_values(self.uom_unit, qty=50)],
), ),
make_pkg_values(self.uom_unit, qty=5, contained=None), make_pkg_values(self.uom_unit, qty=5, contained=None),
] ]
@@ -148,7 +150,9 @@ class TestCalc(TestCommon):
], ],
), ),
make_pkg_values( make_pkg_values(
self.pkg_box, qty=1, contained=[make_pkg_values(self.uom_unit, qty=30)], self.pkg_box,
qty=1,
contained=[make_pkg_values(self.uom_unit, qty=30)],
), ),
make_pkg_values(self.uom_unit, qty=25, contained=None), make_pkg_values(self.uom_unit, qty=25, contained=None),
] ]

View File

@@ -3,8 +3,7 @@
def make_pkg_values(record, **kw): def make_pkg_values(record, **kw):
"""Helper to generate test values for packaging. """Helper to generate test values for packaging."""
"""
name = record.name name = record.name
if record._name == "uom.uom": if record._name == "uom.uom":
is_unit = True is_unit = True