details: https://code.openbravo.com/erp/devel/pi/rev/685b7fc35b49 changeset: 35563:685b7fc35b49 user: Atul Gaware <atul.gaware <at> openbravo.com> date: Tue Mar 26 09:56:06 2019 +0530 summary: Fixes Issue 40324: Bill Of Materials Production should take the stock from same warehouse than the storage bin defined in the Production Plan tab
** New optional flag is provided in order to force use of warehouse of selected storage bin in production plan to be used as priority warehouse for all the production line for picking stock of prodcuts to be consumed and produced ones. details: https://code.openbravo.com/erp/devel/pi/rev/4aa73ae52644 changeset: 35564:4aa73ae52644 user: David Miguelez <david.miguelez <at> openbravo.com> date: Wed Mar 27 11:34:47 2019 +0100 summary: Related to issue 40450. Give a default value to the new parameter in case it is not sent to the PL. diffstat: src-db/database/model/functions/M_PRODUCTION_RUN.xml | 12 ++++++++++-- src-db/database/sourcedata/AD_ELEMENT.xml | 14 ++++++++++++++ src-db/database/sourcedata/AD_PROCESS_PARA.xml | 20 ++++++++++++++++++++ 3 files changed, 44 insertions(+), 2 deletions(-) diffs (97 lines): diff -r 0f7bd818ce07 -r 4aa73ae52644 src-db/database/model/functions/M_PRODUCTION_RUN.xml --- a/src-db/database/model/functions/M_PRODUCTION_RUN.xml Wed Mar 27 11:11:53 2019 +0100 +++ b/src-db/database/model/functions/M_PRODUCTION_RUN.xml Wed Mar 27 11:34:47 2019 +0100 @@ -19,7 +19,7 @@ * parts created by ComPiere are Copyright (C) ComPiere, Inc.; * All Rights Reserved. * Contributor(s): Openbravo SLU - * Contributions are Copyright (C) 2001-2017 Openbravo, S.L.U. + * Contributions are Copyright (C) 2001-2019 Openbravo, S.L.U. * * Specifically, this derivative work is based upon the following Compiere * file and version. @@ -52,6 +52,7 @@ CUR_PL_Post RECORD; -- Parameter Variables MustBeStocked CHAR(1) ; + forceUseOfWHOfSelectedLocator CHAR(1):= 'N' ; v_IsCreated CHAR(1) ; v_Processed VARCHAR2(60) ; v_Client_ID VARCHAR2(32); @@ -102,6 +103,9 @@ IF (Cur_Parameter.ParameterName = 'MustBeStocked') THEN MustBeStocked:=Cur_Parameter.P_String; DBMS_OUTPUT.PUT_LINE(' MustBeStocked=' || MustBeStocked) ; + ELSIF (Cur_Parameter.ParameterName = 'ForceUseOfWHOfSelectedLocator') THEN + forceUseOfWHOfSelectedLocator := Cur_Parameter.P_String; + DBMS_OUTPUT.PUT_LINE(' forceUseOfWHOfSelectedLocator=' || forceUseOfWHOfSelectedLocator) ; ELSE DBMS_OUTPUT.PUT_LINE('*** Unknown Parameter=' || Cur_Parameter.ParameterName) ; END IF; @@ -254,7 +258,11 @@ v_pinstance_msg AD_PInstance.errormsg%TYPE; BEGIN v_pinstance_id := get_uuid(); - M_GET_STOCK_PARAM(v_pinstance_id, v_record_id, null, v_Product_old, null, null, v_Warehouse_old, cur_bom.org_id, null, p_user, v_client_id, null, v_UOM_old, null, null, null, 10, '137', null, 'N', v_pinstance_result, v_pinstance_msg, 'Y', null, null); + IF (forceUseOfWHOfSelectedLocator = 'Y') THEN + M_GET_STOCK_PARAM(v_pinstance_id, v_record_id, null, v_Product_old, null, v_Warehouse_old, null, cur_bom.org_id, null, p_user, v_client_id, null, v_UOM_old, null, null, null, 10, '137', null, 'N', v_pinstance_result, v_pinstance_msg, 'Y', null, null); + ELSE + M_GET_STOCK_PARAM(v_pinstance_id, v_record_id, null, v_Product_old, null, null, v_Warehouse_old, cur_bom.org_id, null, p_user, v_client_id, null, v_UOM_old, null, null, null, 10, '137', null, 'N', v_pinstance_result, v_pinstance_msg, 'Y', null, null); + END IF; -- Check result IF (v_pinstance_result = 0) THEN -- Error on m_get_stock diff -r 0f7bd818ce07 -r 4aa73ae52644 src-db/database/sourcedata/AD_ELEMENT.xml --- a/src-db/database/sourcedata/AD_ELEMENT.xml Wed Mar 27 11:11:53 2019 +0100 +++ b/src-db/database/sourcedata/AD_ELEMENT.xml Wed Mar 27 11:34:47 2019 +0100 @@ -31611,6 +31611,20 @@ <!--AC4E5A6E23B44763AA66997A35B7D583--> <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY> <!--AC4E5A6E23B44763AA66997A35B7D583--></AD_ELEMENT> +<!--AC6978E3C1494DFCB02A37BEFB962937--><AD_ELEMENT> +<!--AC6978E3C1494DFCB02A37BEFB962937--> <AD_ELEMENT_ID><![CDATA[AC6978E3C1494DFCB02A37BEFB962937]]></AD_ELEMENT_ID> +<!--AC6978E3C1494DFCB02A37BEFB962937--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--AC6978E3C1494DFCB02A37BEFB962937--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--AC6978E3C1494DFCB02A37BEFB962937--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--AC6978E3C1494DFCB02A37BEFB962937--> <COLUMNNAME><![CDATA[ForceUseOfWHOfSelectedLocator]]></COLUMNNAME> +<!--AC6978E3C1494DFCB02A37BEFB962937--> <NAME><![CDATA[Force Use Of Warehouse Of Selected Storage Bin]]></NAME> +<!--AC6978E3C1494DFCB02A37BEFB962937--> <PRINTNAME><![CDATA[Force Use Of Warehouse Of Selected Storage Bin]]></PRINTNAME> +<!--AC6978E3C1494DFCB02A37BEFB962937--> <DESCRIPTION><![CDATA[Force Use Of Warehouse Of Selected Storage Bin]]></DESCRIPTION> +<!--AC6978E3C1494DFCB02A37BEFB962937--> <HELP><![CDATA[Force Use Of Warehouse Of Selected Storage Bin]]></HELP> +<!--AC6978E3C1494DFCB02A37BEFB962937--> <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID> +<!--AC6978E3C1494DFCB02A37BEFB962937--> <ISGLOSSARY><![CDATA[N]]></ISGLOSSARY> +<!--AC6978E3C1494DFCB02A37BEFB962937--></AD_ELEMENT> + <!--AC84AE28C06C11DD80E0001B388C61A4--><AD_ELEMENT> <!--AC84AE28C06C11DD80E0001B388C61A4--> <AD_ELEMENT_ID><![CDATA[AC84AE28C06C11DD80E0001B388C61A4]]></AD_ELEMENT_ID> <!--AC84AE28C06C11DD80E0001B388C61A4--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> diff -r 0f7bd818ce07 -r 4aa73ae52644 src-db/database/sourcedata/AD_PROCESS_PARA.xml --- a/src-db/database/sourcedata/AD_PROCESS_PARA.xml Wed Mar 27 11:11:53 2019 +0100 +++ b/src-db/database/sourcedata/AD_PROCESS_PARA.xml Wed Mar 27 11:34:47 2019 +0100 @@ -4123,6 +4123,26 @@ <!--6928C4E56A7F4760839813474B8B3451--> <AD_ELEMENT_ID><![CDATA[1581]]></AD_ELEMENT_ID> <!--6928C4E56A7F4760839813474B8B3451--></AD_PROCESS_PARA> +<!--6DC1641E727D41E883DE575E37CE8BC7--><AD_PROCESS_PARA> +<!--6DC1641E727D41E883DE575E37CE8BC7--> <AD_PROCESS_PARA_ID><![CDATA[6DC1641E727D41E883DE575E37CE8BC7]]></AD_PROCESS_PARA_ID> +<!--6DC1641E727D41E883DE575E37CE8BC7--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> +<!--6DC1641E727D41E883DE575E37CE8BC7--> <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID> +<!--6DC1641E727D41E883DE575E37CE8BC7--> <ISACTIVE><![CDATA[Y]]></ISACTIVE> +<!--6DC1641E727D41E883DE575E37CE8BC7--> <NAME><![CDATA[Force Use Of Warehouse Of Selected Storage Bin]]></NAME> +<!--6DC1641E727D41E883DE575E37CE8BC7--> <DESCRIPTION><![CDATA[Force Use Of Warehouse Of Selected Storage Bin]]></DESCRIPTION> +<!--6DC1641E727D41E883DE575E37CE8BC7--> <HELP><![CDATA[Force Use Of Warehouse Of Selected Storage Bin]]></HELP> +<!--6DC1641E727D41E883DE575E37CE8BC7--> <AD_PROCESS_ID><![CDATA[137]]></AD_PROCESS_ID> +<!--6DC1641E727D41E883DE575E37CE8BC7--> <SEQNO><![CDATA[20]]></SEQNO> +<!--6DC1641E727D41E883DE575E37CE8BC7--> <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID> +<!--6DC1641E727D41E883DE575E37CE8BC7--> <COLUMNNAME><![CDATA[ForceUseOfWHOfSelectedLocator]]></COLUMNNAME> +<!--6DC1641E727D41E883DE575E37CE8BC7--> <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED> +<!--6DC1641E727D41E883DE575E37CE8BC7--> <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH> +<!--6DC1641E727D41E883DE575E37CE8BC7--> <ISMANDATORY><![CDATA[N]]></ISMANDATORY> +<!--6DC1641E727D41E883DE575E37CE8BC7--> <ISRANGE><![CDATA[N]]></ISRANGE> +<!--6DC1641E727D41E883DE575E37CE8BC7--> <DEFAULTVALUE><![CDATA[N]]></DEFAULTVALUE> +<!--6DC1641E727D41E883DE575E37CE8BC7--> <AD_ELEMENT_ID><![CDATA[AC6978E3C1494DFCB02A37BEFB962937]]></AD_ELEMENT_ID> +<!--6DC1641E727D41E883DE575E37CE8BC7--></AD_PROCESS_PARA> + <!--6E19A05CE9564C15BA5FAA118C005859--><AD_PROCESS_PARA> <!--6E19A05CE9564C15BA5FAA118C005859--> <AD_PROCESS_PARA_ID><![CDATA[6E19A05CE9564C15BA5FAA118C005859]]></AD_PROCESS_PARA_ID> <!--6E19A05CE9564C15BA5FAA118C005859--> <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID> _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits