diff --git a/ddmrp/models/stock_buffer.py b/ddmrp/models/stock_buffer.py index 9d8cfd46c..aeda383a3 100644 --- a/ddmrp/models/stock_buffer.py +++ b/ddmrp/models/stock_buffer.py @@ -1195,6 +1195,11 @@ def _compute_product_vendor_code(self): help="Request for Quotation total quantity that is planned inside of " "the DLT horizon.", ) + rfq_total_qty = fields.Float( + string="RFQ Total Qty", + readonly=True, + help="Request for Quotation total quantity that is planned", + ) net_flow_position = fields.Float( digits="Product Unit of Measure", readonly=True, @@ -1682,9 +1687,11 @@ def _calc_incoming_dlt_qty(self): rec.rfq_outside_dlt_qty = sum(pols_outside_dlt.mapped("product_qty")) pols_inside_dlt = rec._get_rfq_dlt(dlt_interval="inside") rec.rfq_inside_dlt_qty = sum(pols_inside_dlt.mapped("product_qty")) + rec.rfq_total_qty = rec.rfq_inside_dlt_qty + rec.rfq_outside_dlt_qty else: rec.rfq_outside_dlt_qty = 0.0 rec.rfq_inside_dlt_qty = 0.0 + rec.rfq_total_qty = 0.0 rec.incoming_total_qty = rec.incoming_dlt_qty + rec.incoming_outside_dlt_qty return True diff --git a/ddmrp/views/stock_buffer_view.xml b/ddmrp/views/stock_buffer_view.xml index fce375013..4bd0a9f04 100644 --- a/ddmrp/views/stock_buffer_view.xml +++ b/ddmrp/views/stock_buffer_view.xml @@ -80,6 +80,7 @@ type="object" attrs="{'invisible':[('incoming_outside_dlt_qty', '=', 0)]}" /> +