[IMP] stock_packaging_calculator: black, isort, prettier

This commit is contained in:
Christopher Ormaza
2021-12-13 13:14:34 -05:00
parent 57f81a2605
commit 9ded9efb55
3 changed files with 9 additions and 2 deletions

View File

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

View File

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

View File

@@ -89,12 +89,12 @@ class Product(models.Model):
"_packaging_name_getter", self._packaging_name_getter
)
packagings = sorted(
[
(
Packaging(x.id, name_getter(x), x.qty, x.barcode, False)
for x in self.packaging_ids.filtered(custom_filter)
# Exclude the ones w/ zero qty as they are useless for the math
if x.qty
],
),
reverse=True,
key=lambda x: x.qty,
)