diff --git a/migration/i1.0c-release/oracle/201309190245_IDEMPIERE-1180.sql b/migration/i1.0c-release/oracle/201309190245_IDEMPIERE-1180.sql new file mode 100644 index 0000000000..27bf80b016 --- /dev/null +++ b/migration/i1.0c-release/oracle/201309190245_IDEMPIERE-1180.sql @@ -0,0 +1,11 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- Sep 19, 2013 10:36:56 AM MYT +-- IDEMPIERE-1064 Control dashboard access by role +UPDATE AD_Field SET AD_Reference_ID=30, AD_Reference_Value_ID=162,Updated=TO_DATE('2013-09-19 10:36:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202328 +; + +SELECT register_migration_script('201309190245_IDEMPIERE-1180.sql') FROM dual +; + diff --git a/migration/i1.0c-release/postgresql/201309190245_IDEMPIERE-1180.sql b/migration/i1.0c-release/postgresql/201309190245_IDEMPIERE-1180.sql new file mode 100644 index 0000000000..19e4a15737 --- /dev/null +++ b/migration/i1.0c-release/postgresql/201309190245_IDEMPIERE-1180.sql @@ -0,0 +1,8 @@ +-- Sep 19, 2013 10:36:56 AM MYT +-- IDEMPIERE-1064 Control dashboard access by role +UPDATE AD_Field SET AD_Reference_ID=30, AD_Reference_Value_ID=162,Updated=TO_TIMESTAMP('2013-09-19 10:36:56','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202328 +; + +SELECT register_migration_script('201309190245_IDEMPIERE-1180.sql') FROM dual +; + diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_Inventory.java b/org.adempiere.base/src/org/compiere/acct/Doc_Inventory.java index 8e6967c4f4..750d724da8 100644 --- a/org.adempiere.base/src/org/compiere/acct/Doc_Inventory.java +++ b/org.adempiere.base/src/org/compiere/acct/Doc_Inventory.java @@ -195,12 +195,19 @@ public class Doc_Inventory extends Doc if (costAdjustment) { product = line.getProduct(); - String productCostingMethod = product.getCostingMethod(as); - costingLevel = product.getCostingLevel(as); - if (!docCostingMethod.equals(productCostingMethod)) + if (!product.isStocked()) { doPosting = false; } + else + { + String productCostingMethod = product.getCostingMethod(as); + costingLevel = product.getCostingLevel(as); + if (!docCostingMethod.equals(productCostingMethod)) + { + doPosting = false; + } + } } BigDecimal costs = null;