From 11065139d3369deb049922970d4b980e6deeef87 Mon Sep 17 00:00:00 2001 From: "jinling.yang" Date: Mon, 6 Feb 2023 18:11:03 +0800 Subject: [PATCH] =?UTF-8?q?bom=E7=BB=84=E4=BB=B6=E7=9A=84=E5=85=AC?= =?UTF-8?q?=E6=96=A4=E6=95=B0=E9=87=8F=E4=BF=AE=E5=A4=8D=EF=BC=8C=E4=BA=A7?= =?UTF-8?q?=E5=93=81=E9=A1=B5=E9=9D=A2=E7=9A=84=E6=A8=A1=E5=9E=8B=E6=A0=B9?= =?UTF-8?q?=E6=8D=AE=E7=B1=BB=E5=9E=8B=E9=9A=90=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sf_dlm/models/product_template.py | 2 +- sf_dlm/views/product_template_view.xml | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sf_dlm/models/product_template.py b/sf_dlm/models/product_template.py index 115f42d4..1e37be2b 100644 --- a/sf_dlm/models/product_template.py +++ b/sf_dlm/models/product_template.py @@ -237,7 +237,7 @@ class ResMrpBom(models.Model): 'bom_id': self.id, 'product_id': raw_bom_line.id, 'product_tmpl_id': raw_bom_line.product_tmpl_id.id, - 'product_qty': round(embryo.volume / 1000000000 * raw_bom_line.materials_type_id.density, 2), + 'product_qty': round(embryo.volume * raw_bom_line.materials_type_id.density / 1000000), 'product_uom_id': raw_bom_line.uom_id.id, }) return bom_line diff --git a/sf_dlm/views/product_template_view.xml b/sf_dlm/views/product_template_view.xml index 6746f45a..7dadde8b 100644 --- a/sf_dlm/views/product_template_view.xml +++ b/sf_dlm/views/product_template_view.xml @@ -10,12 +10,12 @@ - - - - - + + +