From 3c7b69908c91a43a37acc230ce8266bc04bb38fa Mon Sep 17 00:00:00 2001 From: Juan Carlos B Date: Thu, 11 Apr 2024 13:50:52 +0200 Subject: [PATCH] [FIX] product_pricelist_direct_print: bugfix Blank product_attribute_values on changing show_variants --- product_pricelist_direct_print/README.rst | 6 +++++- product_pricelist_direct_print/readme/CONTRIBUTORS.rst | 4 ++++ .../static/description/index.html | 6 +++++- .../wizards/product_pricelist_print.py | 5 +++++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/product_pricelist_direct_print/README.rst b/product_pricelist_direct_print/README.rst index 3c2bd7f7028..641f7db3042 100644 --- a/product_pricelist_direct_print/README.rst +++ b/product_pricelist_direct_print/README.rst @@ -7,7 +7,7 @@ Product Pricelist Direct Print !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! - !! source digest: sha256:bbbf555a680110a067dd5c0c1ab882d2762a649195f8548a47118cec42144d8f + !! source digest: sha256:02b2fb653bde2ced42f189f9c21cdc2bc6df51c74a2fa1de9203c52e56922647 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png @@ -119,6 +119,10 @@ Contributors * Sylvain LE GAL +* `FactorLibre `_: + + * Juan Carlos Bonilla + Maintainers ~~~~~~~~~~~ diff --git a/product_pricelist_direct_print/readme/CONTRIBUTORS.rst b/product_pricelist_direct_print/readme/CONTRIBUTORS.rst index 1c39a8b17c6..326a350fb47 100644 --- a/product_pricelist_direct_print/readme/CONTRIBUTORS.rst +++ b/product_pricelist_direct_print/readme/CONTRIBUTORS.rst @@ -13,3 +13,7 @@ * `GRAP `_: * Sylvain LE GAL + +* `FactorLibre `_: + + * Juan Carlos Bonilla diff --git a/product_pricelist_direct_print/static/description/index.html b/product_pricelist_direct_print/static/description/index.html index 7e828224bb8..dee3379f4f2 100644 --- a/product_pricelist_direct_print/static/description/index.html +++ b/product_pricelist_direct_print/static/description/index.html @@ -367,7 +367,7 @@

Product Pricelist Direct Print

!! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -!! source digest: sha256:bbbf555a680110a067dd5c0c1ab882d2762a649195f8548a47118cec42144d8f +!! source digest: sha256:02b2fb653bde2ced42f189f9c21cdc2bc6df51c74a2fa1de9203c52e56922647 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/product-attribute Translate me on Weblate Try me on Runboat

Print price list from menu option, product templates, products variants or @@ -483,6 +483,10 @@

Contributors

  • Sylvain LE GAL <https://twitter.com/legalsylvain>
  • +
  • FactorLibre:
      +
    • Juan Carlos Bonilla
    • +
    +
  • diff --git a/product_pricelist_direct_print/wizards/product_pricelist_print.py b/product_pricelist_direct_print/wizards/product_pricelist_print.py index f739d517d18..1e33cd04df7 100644 --- a/product_pricelist_direct_print/wizards/product_pricelist_print.py +++ b/product_pricelist_direct_print/wizards/product_pricelist_print.py @@ -104,6 +104,11 @@ def _onchange_partner_ids(self): if not self.partner_count: self.last_ordered_products = False + @api.onchange("show_variants") + def _onchange_show_variants(self): + if not self.show_variants: + self.show_attribute_values = False + @api.model def default_get(self, fields): res = super().default_get(fields)