IDEMPIERE-3705 Define customer or vendor by context when creating new BPs via QuickEntry
This commit is contained in:
parent
d28dec8f32
commit
389ffe4927
|
@ -0,0 +1,22 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- Mar 26, 2018 12:53:01 PM CEST
|
||||
-- IDEMPIERE-3705 Define customer or vendor by context when creating new BPs via QuickEntry
|
||||
UPDATE AD_Field SET AD_Val_Rule_ID=NULL, IsQuickEntry='Y', AD_Reference_Value_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-03-26 12:53:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=9614
|
||||
;
|
||||
|
||||
-- Mar 26, 2018 12:53:05 PM CEST
|
||||
UPDATE AD_Field SET AD_Val_Rule_ID=NULL, IsQuickEntry='Y', AD_Reference_Value_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-03-26 12:53:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=9623
|
||||
;
|
||||
|
||||
-- Mar 26, 2018 12:53:10 PM CEST
|
||||
UPDATE AD_Field SET DisplayLogic='@_QUICK_ENTRY_MODE_@!Y', AD_Val_Rule_ID=NULL, AD_Reference_Value_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-03-26 12:53:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=9614
|
||||
;
|
||||
|
||||
-- Mar 26, 2018 12:53:13 PM CEST
|
||||
UPDATE AD_Field SET DisplayLogic='@_QUICK_ENTRY_MODE_@!Y', AD_Val_Rule_ID=NULL, AD_Reference_Value_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-03-26 12:53:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=9623
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201803261255_IDEMPIERE-3705.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,14 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- Apr 16, 2018 8:50:16 PM CEST
|
||||
-- AP2-15 Define customer or vendor by context when creating new BPs via QuickEntry
|
||||
UPDATE AD_Menu SET IsSOTrx='Y',Updated=TO_DATE('2018-04-16 20:50:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=328
|
||||
;
|
||||
|
||||
-- Apr 16, 2018 8:50:44 PM CEST
|
||||
UPDATE AD_Menu SET IsSOTrx='N',Updated=TO_DATE('2018-04-16 20:50:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=335
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201804162050_IDEMPIERE-3705.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,19 @@
|
|||
-- Mar 26, 2018 12:53:01 PM CEST
|
||||
-- IDEMPIERE-3705 Define customer or vendor by context when creating new BPs via QuickEntry
|
||||
UPDATE AD_Field SET AD_Val_Rule_ID=NULL, IsQuickEntry='Y', AD_Reference_Value_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-03-26 12:53:01','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=9614
|
||||
;
|
||||
|
||||
-- Mar 26, 2018 12:53:05 PM CEST
|
||||
UPDATE AD_Field SET AD_Val_Rule_ID=NULL, IsQuickEntry='Y', AD_Reference_Value_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-03-26 12:53:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=9623
|
||||
;
|
||||
|
||||
-- Mar 26, 2018 12:53:10 PM CEST
|
||||
UPDATE AD_Field SET DisplayLogic='@_QUICK_ENTRY_MODE_@!Y', AD_Val_Rule_ID=NULL, AD_Reference_Value_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-03-26 12:53:10','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=9614
|
||||
;
|
||||
|
||||
-- Mar 26, 2018 12:53:13 PM CEST
|
||||
UPDATE AD_Field SET DisplayLogic='@_QUICK_ENTRY_MODE_@!Y', AD_Val_Rule_ID=NULL, AD_Reference_Value_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-03-26 12:53:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=9623
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201803261255_IDEMPIERE-3705.sql') FROM dual
|
||||
;
|
|
@ -0,0 +1,11 @@
|
|||
-- Apr 16, 2018 8:50:16 PM CEST
|
||||
-- IDEMPIERE-3705 Define customer or vendor by context when creating new BPs via QuickEntry
|
||||
UPDATE AD_Menu SET IsSOTrx='Y',Updated=TO_TIMESTAMP('2018-04-16 20:50:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=328
|
||||
;
|
||||
|
||||
-- Apr 16, 2018 8:50:44 PM CEST
|
||||
UPDATE AD_Menu SET IsSOTrx='N',Updated=TO_TIMESTAMP('2018-04-16 20:50:44','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Menu_ID=335
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201804162050_IDEMPIERE-3705.sql') FROM dual
|
||||
;
|
|
@ -6,7 +6,7 @@ Bundle-Version: 5.1.0.qualifier
|
|||
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
|
||||
Require-Bundle: org.adempiere.base;bundle-version="0.0.0"
|
||||
Eclipse-RegisterBuddy: org.adempiere.base
|
||||
Service-Component: OSGI-INF/costadjustmentcalloutfactory.xml
|
||||
Service-Component: OSGI-INF/costadjustmentcalloutfactory.xml, OSGI-INF/bpartnerquickentrycalloutFactory.xml
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Export-Package: org.compiere.model
|
||||
Bundle-ClassPath: .
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.adempiere.base.callout.BPartnerCalloutFactory">
|
||||
<implementation class="org.adempiere.base.callout.BPartnerCalloutFactory"/>
|
||||
<service>
|
||||
<provide interface="org.adempiere.base.IColumnCalloutFactory"/>
|
||||
</service>
|
||||
</scr:component>
|
|
@ -0,0 +1,30 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2013 Diego Ruiz *
|
||||
* Copyright (C) 2013 Trek Global *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.base.callout;
|
||||
|
||||
import org.adempiere.base.IColumnCallout;
|
||||
import org.adempiere.base.IColumnCalloutFactory;
|
||||
import org.adempiere.model.CalloutBPartnerQuickEntry;
|
||||
import org.compiere.model.MBPartner;
|
||||
|
||||
public class BPartnerCalloutFactory implements IColumnCalloutFactory {
|
||||
|
||||
@Override
|
||||
public IColumnCallout[] getColumnCallouts(String tableName, String columnName) {
|
||||
if (tableName.equalsIgnoreCase(MBPartner.Table_Name)) {
|
||||
return new IColumnCallout[]{new CalloutBPartnerQuickEntry()};
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2013 Diego Ruiz *
|
||||
* Copyright (C) 2013 Trek Global *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.model;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
import org.adempiere.base.IColumnCallout;
|
||||
import org.compiere.model.GridField;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MBPartner;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Util;
|
||||
|
||||
public class CalloutBPartnerQuickEntry implements IColumnCallout {
|
||||
|
||||
@Override
|
||||
public String start(Properties ctx, int WindowNo, GridTab mTab, GridField mField, Object value, Object oldValue) {
|
||||
// this callout is just for quick entry window
|
||||
if ("Y".equals(Env.getContext(ctx, WindowNo, "_QUICK_ENTRY_MODE_"))) {
|
||||
int parent_windowNo = Integer.parseInt(Env.getContext(ctx, WindowNo, "_QUICK_ENTRY_CALLER_WINDOW_"));
|
||||
|
||||
String docSOTrx = Env.getContext(ctx, parent_windowNo, "IsSOTrx", false);
|
||||
|
||||
if (!Util.isEmpty(docSOTrx)) {
|
||||
boolean isSOTrx = "Y".equals(docSOTrx);
|
||||
mTab.setValue(MBPartner.COLUMNNAME_IsCustomer, isSOTrx);
|
||||
mTab.setValue(MBPartner.COLUMNNAME_IsVendor, !isSOTrx);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue