diff --git a/sale_automatic_workflow_stock/README.rst b/sale_automatic_workflow_stock/README.rst index c9a8e443de0b..0e8207c1cccc 100644 --- a/sale_automatic_workflow_stock/README.rst +++ b/sale_automatic_workflow_stock/README.rst @@ -81,6 +81,13 @@ Contributors - Thomas Fossoul - Silvija Butko - Tri Doan <> +- Chau Le <> + +Other credits +------------- + +The migration of this module from 17.0 to 18.0 was financially supported +by Camptocamp. Maintainers ----------- diff --git a/sale_automatic_workflow_stock/__manifest__.py b/sale_automatic_workflow_stock/__manifest__.py index 325484626e40..e333ec7d2cdf 100644 --- a/sale_automatic_workflow_stock/__manifest__.py +++ b/sale_automatic_workflow_stock/__manifest__.py @@ -5,7 +5,7 @@ { "name": "Sale Automatic Workflow Stock", - "version": "17.0.1.0.0", + "version": "18.0.1.0.0", "category": "Sales Management", "license": "AGPL-3", "author": "Akretion, " diff --git a/sale_automatic_workflow_stock/models/automatic_workflow_job.py b/sale_automatic_workflow_stock/models/automatic_workflow_job.py index bc31f26165aa..0d9f91493cc0 100644 --- a/sale_automatic_workflow_stock/models/automatic_workflow_job.py +++ b/sale_automatic_workflow_stock/models/automatic_workflow_job.py @@ -41,7 +41,7 @@ def _validate_pickings(self, picking_filter): def _handle_pickings(self, sale_workflow): """Override to add stock picking validation.""" super()._handle_pickings(sale_workflow) - workflow_domain = [("workflow_process_id", "=", sale_workflow.id)] + workflow_domain = self._sale_workflow_domain(sale_workflow) if sale_workflow.validate_picking: self._validate_pickings( safe_eval(sale_workflow.picking_filter_id.domain) + workflow_domain diff --git a/sale_automatic_workflow_stock/models/sale_order.py b/sale_automatic_workflow_stock/models/sale_order.py index f58e75d6f89d..5d8e41c4b59e 100644 --- a/sale_automatic_workflow_stock/models/sale_order.py +++ b/sale_automatic_workflow_stock/models/sale_order.py @@ -22,6 +22,17 @@ def _depends_picking_policy(self): depends.append("workflow_process_id") return depends + @api.depends("delivery_status") + def _compute_all_qty_delivered(self): + for order in self: + order.all_qty_delivered = order.delivery_status == "full" + + @api.onchange("workflow_process_id") + def _onchange_workflow_process_id(self): + if self.workflow_process_id.picking_policy: + self.picking_policy = self.workflow_process_id.picking_policy + return super()._onchange_workflow_process_id() + @api.depends(lambda self: self._depends_picking_policy()) def _compute_picking_policy(self): res = None diff --git a/sale_automatic_workflow_stock/readme/CONTRIBUTORS.md b/sale_automatic_workflow_stock/readme/CONTRIBUTORS.md index a2c33c26d736..804e15bef5c1 100644 --- a/sale_automatic_workflow_stock/readme/CONTRIBUTORS.md +++ b/sale_automatic_workflow_stock/readme/CONTRIBUTORS.md @@ -10,3 +10,4 @@ - Thomas Fossoul \<\> - Silvija Butko \<\> - Tri Doan \<\<\>\> +- Chau Le \<\<\>\> diff --git a/sale_automatic_workflow_stock/readme/CREDITS.md b/sale_automatic_workflow_stock/readme/CREDITS.md new file mode 100644 index 000000000000..83b3ec91f7d5 --- /dev/null +++ b/sale_automatic_workflow_stock/readme/CREDITS.md @@ -0,0 +1 @@ +The migration of this module from 17.0 to 18.0 was financially supported by Camptocamp. diff --git a/sale_automatic_workflow_stock/static/description/index.html b/sale_automatic_workflow_stock/static/description/index.html index 25a3e49d3ca6..beeb81aa68e7 100644 --- a/sale_automatic_workflow_stock/static/description/index.html +++ b/sale_automatic_workflow_stock/static/description/index.html @@ -390,7 +390,8 @@

Sale Automatic Workflow Stock

  • Credits
  • @@ -428,10 +429,16 @@

    Contributors

  • Thomas Fossoul <thomas@niboo.com>
  • Silvija Butko <silvija@focusate.eu>
  • Tri Doan <<tridm@trobz.com>>
  • +
  • Chau Le <<chaulb@trobz.com>>
  • +
    +

    Other credits

    +

    The migration of this module from 17.0 to 18.0 was financially supported +by Camptocamp.

    +