From fae6bf361a9799e9e8f185ae5b11f41f783dc224 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Tue, 31 Dec 2024 11:01:01 +0100 Subject: [PATCH] [MIG] sale_stock_usability_akretion: migrate to 18 --- sale_stock_usability_akretion/__manifest__.py | 7 +++--- .../models/account_move.py | 2 +- .../models/sale_order.py | 6 ++--- .../models/stock_picking.py | 2 +- .../views/procurement_group.xml | 2 +- .../views/sale_order.xml | 23 ------------------- .../views/sale_report.xml | 2 +- .../views/stock_move.xml | 6 ++--- .../views/stock_picking.xml | 4 ++-- 9 files changed, 15 insertions(+), 39 deletions(-) delete mode 100644 sale_stock_usability_akretion/views/sale_order.xml diff --git a/sale_stock_usability_akretion/__manifest__.py b/sale_stock_usability_akretion/__manifest__.py index 4d46f7c..c9fecc3 100644 --- a/sale_stock_usability_akretion/__manifest__.py +++ b/sale_stock_usability_akretion/__manifest__.py @@ -1,11 +1,11 @@ -# Copyright 2015-2022 Akretion (http://www.akretion.com) +# Copyright 2015-2024 Akretion France (https://www.akretion.com) # @author Alexis de Lattre # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'Sale Stock Usability', - 'version': '16.0.1.0.0', + 'version': '18.0.1.0.0', 'category': 'Sales Management', 'license': 'AGPL-3', 'summary': 'Small usability improvements to the sale_stock module', @@ -23,11 +23,10 @@ This module has been written by Alexis de Lattre from Akretion # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). diff --git a/sale_stock_usability_akretion/models/sale_order.py b/sale_stock_usability_akretion/models/sale_order.py index 777830d..81e928c 100644 --- a/sale_stock_usability_akretion/models/sale_order.py +++ b/sale_stock_usability_akretion/models/sale_order.py @@ -1,8 +1,8 @@ -# Copyright 2015-2020 Akretion France (http://www.akretion.com) +# Copyright 2015-2024 Akretion France (https://www.akretion.com) # @author Alexis de Lattre # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo import api, fields, models +from odoo import fields, models from odoo.tools import float_compare, float_round @@ -22,7 +22,7 @@ class SaleOrder(models.Model): 'Product Unit of Measure') for line in self.order_line: if ( - line.product_id.type in ('product', 'consu') and + line.product_id.type == 'consu' and float_compare( line.product_uom_qty, line.qty_delivered, precision_digits=prec) > 0): diff --git a/sale_stock_usability_akretion/models/stock_picking.py b/sale_stock_usability_akretion/models/stock_picking.py index 1c0ccbb..0cfebdf 100644 --- a/sale_stock_usability_akretion/models/stock_picking.py +++ b/sale_stock_usability_akretion/models/stock_picking.py @@ -1,4 +1,4 @@ -# Copyright 2024 Akretion France (http://www.akretion.com) +# Copyright 2024 Akretion France (https://www.akretion.com) # @author Alexis de Lattre # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). diff --git a/sale_stock_usability_akretion/views/procurement_group.xml b/sale_stock_usability_akretion/views/procurement_group.xml index 991385d..5b9fd18 100644 --- a/sale_stock_usability_akretion/views/procurement_group.xml +++ b/sale_stock_usability_akretion/views/procurement_group.xml @@ -1,6 +1,6 @@ diff --git a/sale_stock_usability_akretion/views/sale_order.xml b/sale_stock_usability_akretion/views/sale_order.xml deleted file mode 100644 index 84b4468..0000000 --- a/sale_stock_usability_akretion/views/sale_order.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - sale_stock_usability.order.form - sale.order - - - - - - - - - - - diff --git a/sale_stock_usability_akretion/views/sale_report.xml b/sale_stock_usability_akretion/views/sale_report.xml index f584347..2208bf0 100644 --- a/sale_stock_usability_akretion/views/sale_report.xml +++ b/sale_stock_usability_akretion/views/sale_report.xml @@ -1,6 +1,6 @@ diff --git a/sale_stock_usability_akretion/views/stock_move.xml b/sale_stock_usability_akretion/views/stock_move.xml index 8eb65c3..0df8617 100644 --- a/sale_stock_usability_akretion/views/stock_move.xml +++ b/sale_stock_usability_akretion/views/stock_move.xml @@ -1,6 +1,6 @@ @@ -12,9 +12,9 @@ stock.move - + - + diff --git a/sale_stock_usability_akretion/views/stock_picking.xml b/sale_stock_usability_akretion/views/stock_picking.xml index 24dfa0b..9f82bb0 100644 --- a/sale_stock_usability_akretion/views/stock_picking.xml +++ b/sale_stock_usability_akretion/views/stock_picking.xml @@ -1,6 +1,6 @@ @@ -13,7 +13,7 @@ - +