diff --git a/sale_order_batch/README.rst b/sale_order_batch/README.rst index 603f2a1..b01de81 100644 --- a/sale_order_batch/README.rst +++ b/sale_order_batch/README.rst @@ -34,16 +34,16 @@ anymore as log as they are part of a batch. Only Sale Orders in state Qutotation Changelog ========= -:0.0.1: Initial module. -:1.0.0: Add Multi Company ability -:1.0.1: rename product creation methode -:1.1.0: Make validity_date persistent, add batches to SO views -:1.1.1: Remove validity date -:2.0.0: Move product logic to sale order lines -:2.1.0: Add "In Progress" and "Cancelled" state -:2.2.0: Add invoice status and menues -:2.2.1: Add lst_price to view -:2.2.2: store all quantities and round open values +: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 =========== diff --git a/sale_order_batch/__manifest__.py b/sale_order_batch/__manifest__.py index 0c82464..dd180ad 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.2.2", + "version": "16.0.2.3.0", "depends": ["sale", "product"], "data": [ "data/ir_sequence_data.xml", diff --git a/sale_order_batch/models/sale_order.py b/sale_order_batch/models/sale_order.py index 5398cc1..05994a2 100644 --- a/sale_order_batch/models/sale_order.py +++ b/sale_order_batch/models/sale_order.py @@ -24,7 +24,8 @@ class SaleOrder(models.Model): def action_add_to_batch(self): """ - TODO: Add Wizard to choose between batches if more than one existis. Picking the first one for now. + TODO: Add Wizard to choose between batches if more than one existis. + Picking the first one for now. """ for sale_order in self: company = sale_order.company_id diff --git a/sale_order_batch/models/sale_order_batch.py b/sale_order_batch/models/sale_order_batch.py index eac06e2..ad0150e 100644 --- a/sale_order_batch/models/sale_order_batch.py +++ b/sale_order_batch/models/sale_order_batch.py @@ -187,10 +187,19 @@ class SaleOrderBatch(models.Model): def action_cancel(self): for batch in self: orders = batch.sale_order_ids - orders.action_cancel() + # use _action_cancel to skip the wizzard + # ToDo: Implement wizard logic + orders._action_cancel() batch.update({"state": "cancel"}) return True + def action_open(self): + for batch in self: + orders = batch.sale_order_ids + orders.action_draft() + batch.update({"state": "open"}) + return True + @api.model_create_multi def create(self, vals_list): for vals in vals_list: diff --git a/sale_order_batch/readme/HISTORY.rst b/sale_order_batch/readme/HISTORY.rst index 4ff955d..c566386 100644 --- a/sale_order_batch/readme/HISTORY.rst +++ b/sale_order_batch/readme/HISTORY.rst @@ -1,10 +1,10 @@ -:0.0.1: Initial module. -:1.0.0: Add Multi Company ability -:1.0.1: rename product creation methode -:1.1.0: Make validity_date persistent, add batches to SO views -:1.1.1: Remove validity date -:2.0.0: Move product logic to sale order lines -:2.1.0: Add "In Progress" and "Cancelled" state -:2.2.0: Add invoice status and menues -:2.2.1: Add lst_price to view -:2.2.2: store all quantities and round open values \ 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" \ 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 a3afdfe..30d478b 100644 --- a/sale_order_batch/static/description/index.html +++ b/sale_order_batch/static/description/index.html @@ -392,25 +392,25 @@ anymore as log as they are part of a batch. Only Sale Orders in state Qutotation -0.0.1:Initial module. +16.0.0.0.1:Initial module. -1.0.0:Add Multi Company ability +16.0.0.1:Add Multi Company ability -1.0.1:rename product creation methode +16.0.0.2:rename product creation methode -1.1.0:Make validity_date persistent, add batches to SO views +16.0.0.3:Make validity_date persistent, add batches to SO views -1.1.1:Remove validity date +16.0.0.4:Remove validity date -2.0.0:Move product logic to sale order lines +16.0.0.5:Move product logic to sale order lines -2.1.0:Add “In Progress” and “Cancelled” state +16.0.2.1.0:Add “In Progress” and “Cancelled” state -2.2.0:Add invoice status and menues +16.0.2.2.0:Add invoice status and menues -2.2.1:Add lst_price to view +16.0.2.2.1:Add lst_price to view -2.2.2:store all quantities and round open values +16.0.2.3.0:Add “Reset to Open” diff --git a/sale_order_batch/views/sale_order_batch_views.xml b/sale_order_batch/views/sale_order_batch_views.xml index 028aa95..40f239c 100644 --- a/sale_order_batch/views/sale_order_batch_views.xml +++ b/sale_order_batch/views/sale_order_batch_views.xml @@ -77,6 +77,15 @@ type="object" attrs="{'invisible': [('state', 'not in',['open', 'in_progress','closed'])]}" /> +