[Warehouse]Add default warehouse rule.
authorGorka Ion Damián <gorkaion.damian@openbravo.com>
Tue, 09 Oct 2012 16:53:02 +0200
changeset 18641 1a1231b55075
parent 18640 b436bc7d3b64
child 18642 fce0cb0998d9
[Warehouse]Add default warehouse rule.
referencedata/standard/Core_Warehouse_Rules.xml
src-db/database/model/functions/M_WAREHOUSE_DEFAULT_RULE.xml
src-db/database/sourcedata/AD_DATASET.xml
--- a/referencedata/standard/Core_Warehouse_Rules.xml	Tue Oct 09 15:34:15 2012 +0200
+++ b/referencedata/standard/Core_Warehouse_Rules.xml	Tue Oct 09 16:53:02 2012 +0200
@@ -5,13 +5,20 @@
     <active>true</active>
     <name>Unique Storage Bin</name>
     <procedure>M_UNIQUELOCATOR_RULE</procedure>
-    <description xsi:nil="true"/>
+    <description>Returns stock of the first storage bin in the warehouse with enough stock.</description>
   </WarehouseRule>
   <WarehouseRule id="5F23F9B25A834B78A0549AF028E29051" identifier="Unique Attribute">
     <id>5F23F9B25A834B78A0549AF028E29051</id>
     <active>true</active>
     <name>Unique Attribute</name>
     <procedure>M_UNIQUEATTRIBUTE_RULE</procedure>
-    <description xsi:nil="true"/>
+    <description>Returns stock of the first attribute set instance in the warehouse with enough stock.</description>
+  </WarehouseRule>
+  <WarehouseRule id="F2DEA5B4C39F4423BF0AAC73DABD4146" identifier="Default Warehouse Rule">
+    <id>F2DEA5B4C39F4423BF0AAC73DABD4146</id>
+    <active>true</active>
+    <name>Default Warehouse Rule</name>
+    <procedure>M_WAREHOUSE_DEFAULT_RULE</procedure>
+    <description>Useful to overwrite a warehouse rule defined at warehouse on specific documents.</description>
   </WarehouseRule>
 </ob:Openbravo>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-db/database/model/functions/M_WAREHOUSE_DEFAULT_RULE.xml	Tue Oct 09 16:53:02 2012 +0200
@@ -0,0 +1,37 @@
+<?xml version="1.0"?>
+  <database name="FUNCTION M_WAREHOUSE_DEFAULT_RULE">
+    <function name="M_WAREHOUSE_DEFAULT_RULE" type="NULL">
+      <parameter name="pinstance_id" type="VARCHAR" mode="in">
+        <default/>
+      </parameter>
+      <parameter name="p_warehouse_id" type="VARCHAR" mode="in">
+        <default/>
+      </parameter>
+      <body><![CDATA[/*************************************************************************
+* The contents of this file are subject to the Openbravo  Public  License
+* Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+* Version 1.1  with a permitted attribution clause; you may not  use this
+* file except in compliance with the License. You  may  obtain  a copy of
+* the License at http://www.openbravo.com/legal/license.html
+* Software distributed under the License  is  distributed  on  an "AS IS"
+* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+* License for the specific  language  governing  rights  and  limitations
+* under the License.
+* The Original Code is Openbravo ERP.
+* The Initial Developer of the Original Code is Openbravo SLU
+* All portions are Copyright (C) 2012 Openbravo SLU
+* All Rights Reserved.
+* Contributor(s):  ______________________________________.
+************************************************************************/
+BEGIN
+  /*
+  
+  This rule keeps stock proposed as defaulted by the m_get_stock procedure. It shall be used when it is desired to
+  overwrite a warehouse rule defined at warehouse level.
+  
+  */
+  RETURN;
+END M_WAREHOUSE_DEFAULT_RULE
+]]></body>
+    </function>
+  </database>
--- a/src-db/database/sourcedata/AD_DATASET.xml	Tue Oct 09 15:34:15 2012 +0200
+++ b/src-db/database/sourcedata/AD_DATASET.xml	Tue Oct 09 16:53:02 2012 +0200
@@ -69,7 +69,7 @@
 <!--52C0F6734D1C4CE68C091526984B6C87-->  <EXPORT><![CDATA[N]]></EXPORT>
 <!--52C0F6734D1C4CE68C091526984B6C87-->  <ACCESSLEVEL><![CDATA[6]]></ACCESSLEVEL>
 <!--52C0F6734D1C4CE68C091526984B6C87-->  <EXPORTALLOWED><![CDATA[Y]]></EXPORTALLOWED>
-<!--52C0F6734D1C4CE68C091526984B6C87-->  <CHECKSUM><![CDATA[259014102123836593406738777089170491447]]></CHECKSUM>
+<!--52C0F6734D1C4CE68C091526984B6C87-->  <CHECKSUM><![CDATA[45186928065247714328207251939202646850]]></CHECKSUM>
 <!--52C0F6734D1C4CE68C091526984B6C87-->  <SEQNO><![CDATA[30]]></SEQNO>
 <!--52C0F6734D1C4CE68C091526984B6C87--></AD_DATASET>