[MIG] mrp_usability to v16

This commit is contained in:
Alexis de Lattre
2022-10-27 22:23:25 +02:00
parent 71ebe2adea
commit bbb0cb17f7
6 changed files with 21 additions and 22 deletions

View File

@@ -1,4 +1,4 @@
# Copyright 2015-2020 Akretion (http://www.akretion.com)
# Copyright 2015-2022 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
@@ -10,11 +10,11 @@ class MrpProduction(models.Model):
_inherit = 'mrp.production'
# Method used by the report, inherited in this module
@api.model
def get_stock_move_sold_out_report(self, move):
lines = move.active_move_line_ids
qty_in_lots = sum([x.product_uom_qty for x in lines])
diff = round(move.product_qty - qty_in_lots, 3)
if diff == 0.0:
return ""
return diff
# @api.model
# def get_stock_move_sold_out_report(self, move):
# lines = move.active_move_line_ids
# qty_in_lots = sum([x.product_uom_qty for x in lines])
# diff = round(move.product_qty - qty_in_lots, 3)
# if diff == 0.0:
# return ""
# return diff