From 9c46372caf40bb26e6ec885d3c01bfcc79c276fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20G=C3=B6ttsch?= Date: Tue, 30 Sep 2025 21:32:46 +0200 Subject: [PATCH] [FIX] sale_order_batch: remove SO from batch on cancelation --- sale_order_batch/README.rst | 21 +++++----- sale_order_batch/__manifest__.py | 2 +- sale_order_batch/models/sale_order.py | 5 +++ sale_order_batch/readme/HISTORY.rst | 21 +++++----- .../static/description/index.html | 39 +++++++------------ 5 files changed, 41 insertions(+), 47 deletions(-) diff --git a/sale_order_batch/README.rst b/sale_order_batch/README.rst index b01de81..748e9e7 100644 --- a/sale_order_batch/README.rst +++ b/sale_order_batch/README.rst @@ -34,16 +34,17 @@ anymore as log as they are part of a batch. Only Sale Orders in state Qutotation Changelog ========= -:16.0.0.0.1: Initial module. -:16.0.0.1: Add Multi Company ability -:16.0.0.2: rename product creation methode -:16.0.0.3: Make validity_date persistent, add batches to SO views -:16.0.0.4: Remove validity date -:16.0.0.5: Move product logic to sale order lines -:16.0.2.1.0: Add "In Progress" and "Cancelled" state -:16.0.2.2.0: Add invoice status and menues -:16.0.2.2.1: Add lst_price to view -:16.0.2.3.0: Add "Reset to Open" +- 16.0.0.0.1: Initial module. +- 16.0.0.1: Add Multi Company ability +- 16.0.0.2: rename product creation methode +- 16.0.0.3: Make validity_date persistent, add batches to SO views +- 16.0.0.4: Remove validity date +- 16.0.0.5: Move product logic to sale order lines +- 16.0.2.1.0: Add "In Progress" and "Cancelled" state +- 16.0.2.2.0: Add invoice status and menues +- 16.0.2.2.1: Add lst_price to view +- 16.0.2.3.0: Add "Reset to Open" +- 16.0.2.3.1: Remove Sale Order from batch on cancelation Bug Tracker =========== diff --git a/sale_order_batch/__manifest__.py b/sale_order_batch/__manifest__.py index d0457a5..24fa8d7 100644 --- a/sale_order_batch/__manifest__.py +++ b/sale_order_batch/__manifest__.py @@ -4,7 +4,7 @@ "author": "BAKEUP", "website": "https://www.bakeup.org", "category": "Sale", - "version": "16.0.2.3.0", + "version": "16.0.2.3.1", "depends": ["sale", "product"], "data": [ "security/ir.model.access.csv", diff --git a/sale_order_batch/models/sale_order.py b/sale_order_batch/models/sale_order.py index 6d67058..69a3c7b 100644 --- a/sale_order_batch/models/sale_order.py +++ b/sale_order_batch/models/sale_order.py @@ -62,6 +62,11 @@ class SaleOrder(models.Model): ) return super().action_confirm() + def action_cancel(self): + self.write({"batch_id": False}) + res = super().action_cancel() + return res + def write(self, vals): res = super().write(vals) if "batch_id" in vals.keys(): diff --git a/sale_order_batch/readme/HISTORY.rst b/sale_order_batch/readme/HISTORY.rst index c566386..592dc2e 100644 --- a/sale_order_batch/readme/HISTORY.rst +++ b/sale_order_batch/readme/HISTORY.rst @@ -1,10 +1,11 @@ -:16.0.0.0.1: Initial module. -:16.0.0.1: Add Multi Company ability -:16.0.0.2: rename product creation methode -:16.0.0.3: Make validity_date persistent, add batches to SO views -:16.0.0.4: Remove validity date -:16.0.0.5: Move product logic to sale order lines -:16.0.2.1.0: Add "In Progress" and "Cancelled" state -:16.0.2.2.0: Add invoice status and menues -:16.0.2.2.1: Add lst_price to view -:16.0.2.3.0: Add "Reset to Open" \ No newline at end of file +- 16.0.0.0.1: Initial module. +- 16.0.0.1: Add Multi Company ability +- 16.0.0.2: rename product creation methode +- 16.0.0.3: Make validity_date persistent, add batches to SO views +- 16.0.0.4: Remove validity date +- 16.0.0.5: Move product logic to sale order lines +- 16.0.2.1.0: Add "In Progress" and "Cancelled" state +- 16.0.2.2.0: Add invoice status and menues +- 16.0.2.2.1: Add lst_price to view +- 16.0.2.3.0: Add "Reset to Open" +- 16.0.2.3.1: Remove Sale Order from batch on cancelation \ No newline at end of file diff --git a/sale_order_batch/static/description/index.html b/sale_order_batch/static/description/index.html index 30d478b..57dab9b 100644 --- a/sale_order_batch/static/description/index.html +++ b/sale_order_batch/static/description/index.html @@ -388,32 +388,19 @@ anymore as log as they are part of a batch. Only Sale Orders in state Qutotation

Changelog

- --- - - - - - - - - - - - - - - - - - - - - - -
16.0.0.0.1:Initial module.
16.0.0.1:Add Multi Company ability
16.0.0.2:rename product creation methode
16.0.0.3:Make validity_date persistent, add batches to SO views
16.0.0.4:Remove validity date
16.0.0.5:Move product logic to sale order lines
16.0.2.1.0:Add “In Progress” and “Cancelled” state
16.0.2.2.0:Add invoice status and menues
16.0.2.2.1:Add lst_price to view
16.0.2.3.0:Add “Reset to Open”
+

Bug Tracker