From 155c91051a3cf9693aacfadaf48f3d99c1beafe8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Niels=20G=C3=B6ttsch?=
Date: Tue, 30 Sep 2025 20:42:41 +0200
Subject: [PATCH] [IMP] nfu_wholesaler_exporter: change limiter and visibility
---
nfu_wholesaler_exporter/README.rst | 13 +++++-----
nfu_wholesaler_exporter/__manifest__.py | 2 +-
.../models/sale_order_batch.py | 4 +--
.../readme/DESCRIPTION.rst | 2 +-
nfu_wholesaler_exporter/readme/HISTORY.rst | 9 ++++---
.../static/description/index.html | 25 +++++++------------
.../views/sale_order_batch_views.xml | 2 +-
7 files changed, 26 insertions(+), 31 deletions(-)
diff --git a/nfu_wholesaler_exporter/README.rst b/nfu_wholesaler_exporter/README.rst
index aafdc62..a7f75c3 100644
--- a/nfu_wholesaler_exporter/README.rst
+++ b/nfu_wholesaler_exporter/README.rst
@@ -7,7 +7,7 @@ NFU Wholesaler Exporter
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- !! source digest: sha256:f5c1fd3329fff4e1de63fae68edca9ba70a1f2444b6674d5fac9ede1a6ff1f94
+ !! source digest: sha256:28b8f6f6ee63fced0ebd3f78299f4d04bc9630718533ef7c93d34b67d335384e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -27,7 +27,7 @@ It exports the article number (default_code) and the qty of the Sale Order Batch
Product view.
Großhändler bieten die Möglichkeit Bestellungen als CSV hochzuladen. Dafür werden lediglich 2 Spalten benötigt
-\|Artnr\|Menge\|
+\|Artnr\|Menge\|. Als Trennezeichen dient das ";"
* Artnr
Artikelnummer beim Hersteller
@@ -43,10 +43,11 @@ Großhändler bieten die Möglichkeit Bestellungen als CSV hochzuladen. Dafür w
Changelog
=========
-:0.0.1: Initial module.
-:1.0.0: Adjust to Grell format specification
-:1.0.1: Rename to CSV Exporter
-:1.1.0: Add rounding for float values and remove zero lines
+- 16.0.0.0.1: Initial module.
+- 16.0.1.0.0: Adjust to Grell format specification
+- 16.0.1.0.1: Rename to CSV Exporter
+- 16.0.1.1.0: Add rounding for float values and remove zero lines
+- 16.0.1.2.0: Change limiter to ";" and only show exporter in closed state
Bug Tracker
===========
diff --git a/nfu_wholesaler_exporter/__manifest__.py b/nfu_wholesaler_exporter/__manifest__.py
index 979489c..75d1fd1 100644
--- a/nfu_wholesaler_exporter/__manifest__.py
+++ b/nfu_wholesaler_exporter/__manifest__.py
@@ -4,7 +4,7 @@
"author": "BAKEUP",
"website": "https://www.bakeup.org",
"category": "Sale",
- "version": "16.0.1.1.0",
+ "version": "16.0.1.2.0",
"depends": ["sale_order_batch", "nfu_sale_order_batch_packaging"],
"data": ["views/sale_order_batch_views.xml"],
"license": "LGPL-3",
diff --git a/nfu_wholesaler_exporter/models/sale_order_batch.py b/nfu_wholesaler_exporter/models/sale_order_batch.py
index 0858297..1775ffc 100644
--- a/nfu_wholesaler_exporter/models/sale_order_batch.py
+++ b/nfu_wholesaler_exporter/models/sale_order_batch.py
@@ -11,7 +11,7 @@ class SaleOrderBatch(models.Model):
def export_wholesaler_csv(self):
self.ensure_one()
# Prepare CSV content
- csv_content = "Artnr,Menge\n"
+ csv_content = "Artnr;Menge\n"
for product in self.product_ids.filtered(lambda p: p.product_id.default_code):
if not float_is_zero(
product.product_uom_qty,
@@ -29,7 +29,7 @@ class SaleOrderBatch(models.Model):
wholesaler_qty = int(
round(product.product_uom_qty / product.product_packaging_qty)
)
- csv_content += f"{product.product_id.default_code},{wholesaler_qty}\n" # noqa: E231
+ csv_content += f"{product.product_id.default_code};{wholesaler_qty}\n" # noqa: E702,E231
# Encode CSV content to base64
csv_base64 = base64.b64encode(csv_content.encode("utf-8"))
diff --git a/nfu_wholesaler_exporter/readme/DESCRIPTION.rst b/nfu_wholesaler_exporter/readme/DESCRIPTION.rst
index 33e74fa..d0ff8e4 100644
--- a/nfu_wholesaler_exporter/readme/DESCRIPTION.rst
+++ b/nfu_wholesaler_exporter/readme/DESCRIPTION.rst
@@ -3,7 +3,7 @@ It exports the article number (default_code) and the qty of the Sale Order Batch
Product view.
Großhändler bieten die Möglichkeit Bestellungen als CSV hochzuladen. Dafür werden lediglich 2 Spalten benötigt
-\|Artnr\|Menge\|
+\|Artnr\|Menge\|. Als Trennezeichen dient das ";"
* Artnr
Artikelnummer beim Hersteller
diff --git a/nfu_wholesaler_exporter/readme/HISTORY.rst b/nfu_wholesaler_exporter/readme/HISTORY.rst
index 38148e9..83765ab 100644
--- a/nfu_wholesaler_exporter/readme/HISTORY.rst
+++ b/nfu_wholesaler_exporter/readme/HISTORY.rst
@@ -1,4 +1,5 @@
-:0.0.1: Initial module.
-:1.0.0: Adjust to Grell format specification
-:1.0.1: Rename to CSV Exporter
-:1.1.0: Add rounding for float values and remove zero lines
\ No newline at end of file
+- 16.0.0.0.1: Initial module.
+- 16.0.1.0.0: Adjust to Grell format specification
+- 16.0.1.0.1: Rename to CSV Exporter
+- 16.0.1.1.0: Add rounding for float values and remove zero lines
+- 16.0.1.2.0: Change limiter to ";" and only show exporter in closed state
\ No newline at end of file
diff --git a/nfu_wholesaler_exporter/static/description/index.html b/nfu_wholesaler_exporter/static/description/index.html
index 4387f7f..177629e 100644
--- a/nfu_wholesaler_exporter/static/description/index.html
+++ b/nfu_wholesaler_exporter/static/description/index.html
@@ -367,14 +367,14 @@ ul.auto-toc {
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-!! source digest: sha256:f5c1fd3329fff4e1de63fae68edca9ba70a1f2444b6674d5fac9ede1a6ff1f94
+!! source digest: sha256:28b8f6f6ee63fced0ebd3f78299f4d04bc9630718533ef7c93d34b67d335384e
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

This module adds a CSV exporter action to Sale Order Batch module.
It exports the article number (default_code) and the qty of the Sale Order Batch
Product view.
Großhändler bieten die Möglichkeit Bestellungen als CSV hochzuladen. Dafür werden lediglich 2 Spalten benötigt
-|Artnr|Menge|
+|Artnr|Menge|. Als Trennezeichen dient das “;”
- Artnr
@@ -403,20 +403,13 @@ Das ist aktuell der default_code, falls wir den mal prefixen, muss das hier ange
-
-
-
-
-| 0.0.1: | Initial module. |
-
-| 1.0.0: | Adjust to Grell format specification |
-
-| 1.0.1: | Rename to CSV Exporter |
-
-| 1.1.0: | Add rounding for float values and remove zero lines |
-
-
-
+
+- 16.0.0.0.1: Initial module.
+- 16.0.1.0.0: Adjust to Grell format specification
+- 16.0.1.0.1: Rename to CSV Exporter
+- 16.0.1.1.0: Add rounding for float values and remove zero lines
+- 16.0.1.2.0: Change limiter to “;” and only show exporter in closed state
+
diff --git a/nfu_wholesaler_exporter/views/sale_order_batch_views.xml b/nfu_wholesaler_exporter/views/sale_order_batch_views.xml
index f94838d..36c4206 100644
--- a/nfu_wholesaler_exporter/views/sale_order_batch_views.xml
+++ b/nfu_wholesaler_exporter/views/sale_order_batch_views.xml
@@ -11,7 +11,7 @@
type="object"
string="Export Wholesaler CSV"
class="oe_highlight"
- attrs="{'invisible': [('state', '=','open')]}"
+ attrs="{'invisible': [('state', '!=','closed')]}"
/>