mirror of
https://github.com/OCA/stock-logistics-warehouse.git
synced 2025-01-21 14:27:28 +02:00
[IMP] stock_packaging_calculator: black, isort, prettier
This commit is contained in:
@@ -0,0 +1 @@
|
||||
../../../../stock_packaging_calculator
|
||||
6
setup/stock_packaging_calculator/setup.py
Normal file
6
setup/stock_packaging_calculator/setup.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['setuptools-odoo'],
|
||||
odoo_addon=True,
|
||||
)
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user