diff --git a/stock_packaging_calculator_packaging_level/README.rst b/stock_packaging_calculator_packaging_level/README.rst index d67e3abf8b33..f2408a180666 100644 --- a/stock_packaging_calculator_packaging_level/README.rst +++ b/stock_packaging_calculator_packaging_level/README.rst @@ -68,12 +68,15 @@ Contributors - `Trobz `__: - Nguyen Hoang Hiep + - Khoi (Kien Kim) Other credits ------------- -The migration of this module from 13.0 to 14.0 was financially supported -by Camptocamp +The migration of this module from 13.0 to 14.0 and then from 16.0 to +18.0 was financially supported by: + +- Camptocamp Maintainers ----------- diff --git a/stock_packaging_calculator_packaging_level/__manifest__.py b/stock_packaging_calculator_packaging_level/__manifest__.py index 23ed6967d818..dd936f176a58 100644 --- a/stock_packaging_calculator_packaging_level/__manifest__.py +++ b/stock_packaging_calculator_packaging_level/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Stock packaging calculator packaging level", "summary": "Glue module for packaging level", - "version": "16.0.1.0.0", + "version": "18.0.1.0.0", "development_status": "Alpha", "category": "Warehouse Management", "website": "https://github.com/OCA/stock-logistics-warehouse", diff --git a/stock_packaging_calculator_packaging_level/models/product.py b/stock_packaging_calculator_packaging_level/models/product.py index e5cb0639d672..4ba07c6621e2 100644 --- a/stock_packaging_calculator_packaging_level/models/product.py +++ b/stock_packaging_calculator_packaging_level/models/product.py @@ -12,14 +12,13 @@ def _packaging_name_getter(self, packaging): def _qty_by_packaging_as_str(self, packaging, qty): # By default use packaging type code - qty_by_packaging_type_fname = self.env.context.get( - "qty_by_packaging_type_fname", "code" + qty_by_packaging_level_fname = self.env.context.get( + "qty_by_packaging_level_fname", "code" ) - compact_mode = self.env.context.get("qty_by_packaging_type_compact", True) + compact_mode = self.env.context.get("qty_by_packaging_level_compact", True) sep = "" if compact_mode else " " # Override to use packaging level code if packaging and packaging.packaging_level_id: - name = packaging.packaging_level_id[qty_by_packaging_type_fname] + name = packaging.packaging_level_id[qty_by_packaging_level_fname] return f"{qty}{sep}{name}" - else: - return super()._qty_by_packaging_as_str(packaging, qty) + return super()._qty_by_packaging_as_str(packaging, qty) diff --git a/stock_packaging_calculator_packaging_level/models/product_qty_by_packaging_mixin.py b/stock_packaging_calculator_packaging_level/models/product_qty_by_packaging_mixin.py index 2197968a830f..aa6d9f3cd3c4 100644 --- a/stock_packaging_calculator_packaging_level/models/product_qty_by_packaging_mixin.py +++ b/stock_packaging_calculator_packaging_level/models/product_qty_by_packaging_mixin.py @@ -15,8 +15,8 @@ class ProductQtyByPackagingMixin(models.AbstractModel): @api.depends_context( "lang", "qty_by_pkg_total_units", - "qty_by_packaging_type_fname", - "qty_by_packaging_type_compact", + "qty_by_packaging_level_fname", + "qty_by_packaging_level_compact", ) def _compute_product_qty_by_packaging_display(self): return super()._compute_product_qty_by_packaging_display() diff --git a/stock_packaging_calculator_packaging_level/readme/CONTRIBUTORS.md b/stock_packaging_calculator_packaging_level/readme/CONTRIBUTORS.md index 19f31ec40de1..3dafe83c13b1 100644 --- a/stock_packaging_calculator_packaging_level/readme/CONTRIBUTORS.md +++ b/stock_packaging_calculator_packaging_level/readme/CONTRIBUTORS.md @@ -1,4 +1,5 @@ - Simone Orsi \<\> -- [Trobz](https://trobz.com): +- [Trobz](https://trobz.com): - Nguyen Hoang Hiep \<\> + - Khoi (Kien Kim) \<\> diff --git a/stock_packaging_calculator_packaging_level/readme/CREDITS.md b/stock_packaging_calculator_packaging_level/readme/CREDITS.md index 4351fe296a86..9a705f397892 100644 --- a/stock_packaging_calculator_packaging_level/readme/CREDITS.md +++ b/stock_packaging_calculator_packaging_level/readme/CREDITS.md @@ -1,2 +1,3 @@ -The migration of this module from 13.0 to 14.0 was financially supported -by Camptocamp +The migration of this module from 13.0 to 14.0 and then from 16.0 to 18.0 was financially supported by: + +- Camptocamp diff --git a/stock_packaging_calculator_packaging_level/static/description/index.html b/stock_packaging_calculator_packaging_level/static/description/index.html index 3d3df18e3be7..5e149f7aae5f 100644 --- a/stock_packaging_calculator_packaging_level/static/description/index.html +++ b/stock_packaging_calculator_packaging_level/static/description/index.html @@ -413,14 +413,18 @@

Contributors

  • Simone Orsi <simone.orsi@camptocamp.com>
  • Trobz:
  • Other credits

    -

    The migration of this module from 13.0 to 14.0 was financially supported -by Camptocamp

    +

    The migration of this module from 13.0 to 14.0 and then from 16.0 to +18.0 was financially supported by:

    +
      +
    • Camptocamp
    • +

    Maintainers

    diff --git a/stock_packaging_calculator_packaging_level/tests/test_packaging_by_qty.py b/stock_packaging_calculator_packaging_level/tests/test_packaging_by_qty.py index 775fa4e5b319..6cf5cdda4b98 100644 --- a/stock_packaging_calculator_packaging_level/tests/test_packaging_by_qty.py +++ b/stock_packaging_calculator_packaging_level/tests/test_packaging_by_qty.py @@ -49,8 +49,8 @@ def test_as_str(self): ) self.assertEqual( self.product_a.with_context( - qty_by_packaging_type_fname="name", - qty_by_packaging_type_compact=False, + qty_by_packaging_level_fname="name", + qty_by_packaging_level_compact=False, ).product_qty_by_packaging_as_str(250), "1 Transport Box,\xa01 Retail Box", )