[FIX] sale_order_batch: remove SO from batch on cancelation

This commit is contained in:
Niels Göttsch 2025-09-30 21:32:46 +02:00 committed by madmooose
parent 49376f3eca
commit 7c97f818f5
5 changed files with 41 additions and 47 deletions

View file

@ -34,16 +34,17 @@ anymore as log as they are part of a batch. Only Sale Orders in state Qutotation
Changelog Changelog
========= =========
:16.0.0.0.1: Initial module. - 16.0.0.0.1: Initial module.
:16.0.0.1: Add Multi Company ability - 16.0.0.1: Add Multi Company ability
:16.0.0.2: rename product creation methode - 16.0.0.2: rename product creation methode
:16.0.0.3: Make validity_date persistent, add batches to SO views - 16.0.0.3: Make validity_date persistent, add batches to SO views
:16.0.0.4: Remove validity date - 16.0.0.4: Remove validity date
:16.0.0.5: Move product logic to sale order lines - 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.1.0: Add "In Progress" and "Cancelled" state
:16.0.2.2.0: Add invoice status and menues - 16.0.2.2.0: Add invoice status and menues
:16.0.2.2.1: Add lst_price to view - 16.0.2.2.1: Add lst_price to view
:16.0.2.3.0: Add "Reset to Open" - 16.0.2.3.0: Add "Reset to Open"
- 16.0.2.3.1: Remove Sale Order from batch on cancelation
Bug Tracker Bug Tracker
=========== ===========

View file

@ -4,7 +4,7 @@
"author": "BAKEUP", "author": "BAKEUP",
"website": "https://www.bakeup.org", "website": "https://www.bakeup.org",
"category": "Sale", "category": "Sale",
"version": "16.0.2.3.0", "version": "16.0.2.3.1",
"depends": ["sale", "product"], "depends": ["sale", "product"],
"data": [ "data": [
"security/ir.model.access.csv", "security/ir.model.access.csv",

View file

@ -62,6 +62,11 @@ class SaleOrder(models.Model):
) )
return super().action_confirm() return super().action_confirm()
def action_cancel(self):
self.write({"batch_id": False})
res = super().action_cancel()
return res
def write(self, vals): def write(self, vals):
res = super().write(vals) res = super().write(vals)
if "batch_id" in vals.keys(): if "batch_id" in vals.keys():

View file

@ -1,10 +1,11 @@
:16.0.0.0.1: Initial module. - 16.0.0.0.1: Initial module.
:16.0.0.1: Add Multi Company ability - 16.0.0.1: Add Multi Company ability
:16.0.0.2: rename product creation methode - 16.0.0.2: rename product creation methode
:16.0.0.3: Make validity_date persistent, add batches to SO views - 16.0.0.3: Make validity_date persistent, add batches to SO views
:16.0.0.4: Remove validity date - 16.0.0.4: Remove validity date
:16.0.0.5: Move product logic to sale order lines - 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.1.0: Add "In Progress" and "Cancelled" state
:16.0.2.2.0: Add invoice status and menues - 16.0.2.2.0: Add invoice status and menues
:16.0.2.2.1: Add lst_price to view - 16.0.2.2.1: Add lst_price to view
:16.0.2.3.0: Add "Reset to Open" - 16.0.2.3.0: Add "Reset to Open"
- 16.0.2.3.1: Remove Sale Order from batch on cancelation

View file

@ -388,32 +388,19 @@ anymore as log as they are part of a batch. Only Sale Orders in state Qutotation
</div> </div>
<div class="section" id="changelog"> <div class="section" id="changelog">
<h1><a class="toc-backref" href="#toc-entry-1">Changelog</a></h1> <h1><a class="toc-backref" href="#toc-entry-1">Changelog</a></h1>
<table class="docutils field-list" frame="void" rules="none"> <ul class="simple">
<col class="field-name" /> <li>16.0.0.0.1: Initial module.</li>
<col class="field-body" /> <li>16.0.0.1: Add Multi Company ability</li>
<tbody valign="top"> <li>16.0.0.2: rename product creation methode</li>
<tr class="field"><th class="field-name">16.0.0.0.1:</th><td class="field-body">Initial module.</td> <li>16.0.0.3: Make validity_date persistent, add batches to SO views</li>
</tr> <li>16.0.0.4: Remove validity date</li>
<tr class="field"><th class="field-name">16.0.0.1:</th><td class="field-body">Add Multi Company ability</td> <li>16.0.0.5: Move product logic to sale order lines</li>
</tr> <li>16.0.2.1.0: Add “In Progress” and “Cancelled” state</li>
<tr class="field"><th class="field-name">16.0.0.2:</th><td class="field-body">rename product creation methode</td> <li>16.0.2.2.0: Add invoice status and menues</li>
</tr> <li>16.0.2.2.1: Add lst_price to view</li>
<tr class="field"><th class="field-name">16.0.0.3:</th><td class="field-body">Make validity_date persistent, add batches to SO views</td> <li>16.0.2.3.0: Add “Reset to Open”</li>
</tr> <li>16.0.2.3.1: Remove Sale Order from batch on cancelation</li>
<tr class="field"><th class="field-name">16.0.0.4:</th><td class="field-body">Remove validity date</td> </ul>
</tr>
<tr class="field"><th class="field-name">16.0.0.5:</th><td class="field-body">Move product logic to sale order lines</td>
</tr>
<tr class="field"><th class="field-name">16.0.2.1.0:</th><td class="field-body">Add “In Progress” and “Cancelled” state</td>
</tr>
<tr class="field"><th class="field-name">16.0.2.2.0:</th><td class="field-body">Add invoice status and menues</td>
</tr>
<tr class="field"><th class="field-name">16.0.2.2.1:</th><td class="field-body">Add lst_price to view</td>
</tr>
<tr class="field"><th class="field-name">16.0.2.3.0:</th><td class="field-body">Add “Reset to Open”</td>
</tr>
</tbody>
</table>
</div> </div>
<div class="section" id="bug-tracker"> <div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1> <h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>