Ninja Plugin -

222 views
Skip to first unread message

Alejandro Guerra

unread,
Apr 25, 2017, 9:31:45 AM4/25/17
to iDempiere
Hi Mr Red1, 
I hope you can help me find where my error is while using your plugin. ..

I'm trying to use your ninja plugin and at the moment of import I always generate this error .. I am attaching the CSVs I am using.
Regards, 
Alejandro Guerra
abr 25, 2017 9:17:49 AM org.adempiere.webui.apps.ProcessParameterPanel init
GRAVE: SELECT p.Name, p.Description, p.Help, p.AD_Reference_ID, p.AD_Process_Para_ID, p.FieldLength, p.IsMandatory, p.IsRange, p.ColumnName, p.DefaultValue, p.DefaultValue2, p.VFormat, p.ValueMin, p.ValueMax, p.SeqNo, p.AD_Reference_Value_ID, vr.Code AS ValidationCode, p.ReadOnlyLogic, p.DisplayLogic, p.IsEncrypted, NULL AS FormatPattern, p.MandatoryLogic FROM AD_Process_Para p LEFT OUTER JOIN AD_Val_Rule vr ON (p.AD_Val_Rule_ID=vr.AD_Val_Rule_ID) WHERE p.AD_Process_ID=? AND p.IsActive='Y'  ORDER BY SeqNo
org.postgresql.util.PSQLException: ERROR: no existe la columna p.mandatorylogic
  Position: 335
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2455)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2155)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:288)
at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:430)
at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:356)
at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:168)
at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:116)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeQuery(NewProxyPreparedStatement.java:353)
at sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.compiere.db.StatementProxy.invoke(StatementProxy.java:128)
at com.sun.proxy.$Proxy4.executeQuery(Unknown Source)
at org.adempiere.webui.apps.ProcessParameterPanel.init(ProcessParameterPanel.java:233)
at org.adempiere.webui.apps.AbstractProcessDialog.init(AbstractProcessDialog.java:225)
at org.adempiere.webui.apps.ProcessModalDialog.<init>(ProcessModalDialog.java:83)
at org.adempiere.webui.apps.ProcessModalDialog.<init>(ProcessModalDialog.java:109)
at org.adempiere.webui.adwindow.AbstractADWindowContent.executeButtonProcess0(AbstractADWindowContent.java:2997)
at org.adempiere.webui.adwindow.AbstractADWindowContent.executeButtonProcess(AbstractADWindowContent.java:2952)
at org.adempiere.webui.adwindow.AbstractADWindowContent.actionButton0(AbstractADWindowContent.java:2886)
at org.adempiere.webui.adwindow.AbstractADWindowContent.actionButton(AbstractADWindowContent.java:2705)
at org.adempiere.webui.adwindow.AbstractADWindowContent.access$29(AbstractADWindowContent.java:2654)
at org.adempiere.webui.adwindow.AbstractADWindowContent$47.run(AbstractADWindowContent.java:3029)
at org.adempiere.webui.apps.BusyDialogTemplate.onEvent(BusyDialogTemplate.java:37)
at org.zkoss.zk.ui.AbstractComponent.onEvent(AbstractComponent.java:3030)
at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:3001)
at org.zkoss.zk.ui.AbstractComponent.service(AbstractComponent.java:2942)
at org.zkoss.zk.ui.impl.EventProcessor.process(EventProcessor.java:136)
at org.zkoss.zk.ui.impl.UiEngineImpl.processEvent(UiEngineImpl.java:1826)
at org.zkoss.zk.ui.impl.UiEngineImpl.process(UiEngineImpl.java:1611)
at org.zkoss.zk.ui.impl.UiEngineImpl.execUpdate(UiEngineImpl.java:1321)
at org.zkoss.zk.au.http.DHtmlUpdateServlet.process(DHtmlUpdateServlet.java:611)
at org.zkoss.zk.au.http.DHtmlUpdateServlet.doGet(DHtmlUpdateServlet.java:485)
at org.zkoss.zk.au.http.DHtmlUpdateServlet.doPost(DHtmlUpdateServlet.java:494)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:837)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
at org.eclipse.jetty.server.Server.handle(Server.java:524)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:319)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:253)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
at java.lang.Thread.run(Thread.java:745)


1_M_Product_Category.csv
2_M_Product.csv

redhuan d. oon

unread,
Apr 25, 2017, 9:45:50 AM4/25/17
to iDempiere
You should remove "quotes" from your CSV and have no <Enter> blank at the bottom.
I already done that and attach back the zipped file, but you must make sure you have the C_Tax_Category dependency data first. If not, put that first. Use this as guide: http://red1.org/DocBook/data/C_TaxCategory_data.html

Anozi Mada

unread,
Apr 25, 2017, 9:46:03 AM4/25/17
to iDempiere
Recently process parameter get mandatory logic field and it seems you haven't apply the migration script to the latest.

Regards,
Anozi Mada

redhuan d. oon

unread,
Apr 25, 2017, 9:49:51 AM4/25/17
to iDempiere
Forgot to attach the file. Also check that your Ninja plugin is the latest at https://sourceforge.net/projects/red1/files/ModuleCreator/
Archive.zip

Alejandro Guerra

unread,
Apr 25, 2017, 10:49:57 AM4/25/17
to iDempiere
Hi Anozi, 

The last script applied is "201704131337_IDEMPIERE-3338.sql"

Regards,
Alejandro Guerra

Anozi Mada

unread,
Apr 25, 2017, 11:08:02 AM4/25/17
to iDempiere
That's weird because then it should have been applied already. But the error said column p.mandatorylogic is not exists.
Just to make sure can you reapply migration script 201703291605_IDEMPIERE-3321.sql and test it via sql editor with something like SELECT MandatoryLogic FROM AD_Process_Para

Alejandro Guerra

unread,
Apr 25, 2017, 12:46:00 PM4/25/17
to iDempiere
I have no record. We only applied the folder 4.1 from the script.

Alejandro Guerra

unread,
Apr 25, 2017, 4:18:57 PM4/25/17
to iDempiere
I created a new file, Can u check that is wrong ??
Ragards,
Alejandro Guerra
1_M_Product_Category.csv

redhuan d. oon

unread,
Apr 25, 2017, 6:43:09 PM4/25/17
to iDempiere
Anozi, I was worried my plugins need upgrading to latest iDempiere base because i have not updated since v20161129. But i tested an Excel Info-Window plugin at iDempiere demo site and it worked right away. So its not a bug from old plugins.

Alejandro,
Your file still has a blank <Enter> at the end. Use my Archive.zip i attached earlier. Then import your new C_TaxCategory first or create it manually.

redhuan d. oon

unread,
Apr 25, 2017, 8:11:35 PM4/25/17
to iDempiere
Alejandro, you cannot use commas inside your data cells. Change to + and it will be converted back during import. For example:

MANDRIL ALAMBRISMO 1+5/2+5/3+5/4+5/5MM

Alejandro Guerra

unread,
Apr 25, 2017, 9:38:36 PM4/25/17
to idem...@googlegroups.com
Red1, 

In libreoffice you did not export all to csv like mac .... I found a macro to do it; And it's worked. Now I do not know how to delete the blank <Enter> at the end.
This is the reason I sent it for you to test.

Regards,
Alejandro Guerra

--
You received this message because you are subscribed to a topic in the Google Groups "iDempiere" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/idempiere/SnFQv1dqLmM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to idempiere+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/d11c2e5e-1416-4c68-9796-45a58ab0bfd2%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
Alejandro Guerra
M  +58412 3041304

Alejandro Guerra

unread,
Apr 25, 2017, 9:39:15 PM4/25/17
to idem...@googlegroups.com
Ok. I'll change

Thank.

--
You received this message because you are subscribed to a topic in the Google Groups "iDempiere" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/idempiere/SnFQv1dqLmM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to idempiere+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

redhuan d. oon

unread,
Apr 25, 2017, 9:48:34 PM4/25/17
to iDempiere
Can you share your macro to export all in LibreOffice to us? Send to my email if possible.
The blank <enter> is easy as its only one last char. Just delete manually.
But remember to replace all , with +.
And use 'Standard' TaxCategory to test first later u can create your own tax category.

Alejandro Guerra

unread,
Apr 25, 2017, 9:59:00 PM4/25/17
to idem...@googlegroups.com
Yes of course....




REM  Useful macro to save calc document sheets to csv files hoisted from http://www.oooforum.org/forum/viewtopic.phtml?t=6286

REM Create a new macro in Tools 

REM  *****  BASIC  ***** 

REM  *****  BASIC  ***** 

' Cf http://www.oooforum.org/forum/viewtopic.phtml?t=6286 

'****************************************************************** 
'This is a simple Library to save all Sheets of a Spreadsheet 
'as CSV-File. It fits my needs. But if you improve this library, 
'please make it public (OO-Forum) ! 

'Orig. author: Michael Taupitz 
'email:   mit...@gmx.net 
'date :     25.2.2004 

'userloser fixed some bugs on Aug 23 2013 
'****************************************************************** 

Option Explicit 

' saves sheets in the doc directory, but 
' without appending the document filename 
Sub Main 
   SaveAllToCSV() 
End Sub 

' example appending a prefix to 
' the csv file name 
Sub Main1 
   SaveAllToCSV("prefix - ") 
End Sub 


' This procedure iterates over the spreadsheets in 
' a Calc file and save each to a new file named 
' $basename/${newFileNamePrefix}$sheet_name.csv 

Sub SaveAllToCSV(Optional newFileNamePrefix as String) 

   Dim i as Integer 
   Dim path as String 
   Dim newFile as String 
   Dim oDocSheets,oSheet as Object 
    
   ' setup the options of the export csv filter 
   ' for details see http://wiki.openoffice.org/wiki/Documentation/DevGuide/Spreadsheets/Filter_Options 
    
   Dim filterArgs(1) as new com.sun.star.beans.PropertyValue 
   filterArgs(0).Name  = "FilterName" 
   filterArgs(0).Value = "Text - txt - csv (StarCalc)" 
   filterArgs(1).Name  = "FilterOptions" 
   ' field sep(44 - comma), txt delim (34 - dblquo), charset (0 = system, 76 - utf8), first line (1 or 2) 
   filterArgs(1).Value = "44,34,ANSI,1,,0,true,true,true" 

   ' get the document path from the name 
   path = ConvertFromUrl(Dirname) 
    
   'Iterate through the spreadsheets in a file and save each to a 
   ' $filename/$sheet_name.csv 
   oDocSheets = StarDesktop.CurrentFrame.Controller.Model.Sheets 
   For i = 0 To oDocSheets.Count-1 
        'retrieve sheet reference, set as active sheet 
        oSheet = oDocSheets(i) 
        ThisComponent.CurrentController.setActiveSheet(oSheet) 
        
        ' make the filename 
        if ismissing(newFileNamePrefix) then 
              newFile = ConvertToUrl(path & oSheet.Name & ".csv") 
        else 
              newFile = ConvertToUrl(path & newFileNamePrefix & oSheet.Name & ".csv") 
        end if 

        ' save csv to disk file newFile 
          ThisComponent.storeAsUrl(newFile, filterArgs) 
   Next 

End Sub 

' stolen from the forums, works like a buggy dirname(1) 
' but does not take argument, works with 
' the url of the currently open document instead 

Function Dirname 

   Dim odoc as object 
   Dim fileName As String 
   Dim n As Long 

    odoc = ThisComponent 
    fileName = odoc.url 

    For n = Len( fileName ) To 1 Step -1 
      If Mid( fileName, n, 1 ) = "/" Then Exit For 
    Next n 

   ' assign var to func name to return value 
   ' oh my 
   Dirname = Left( fileName, n ) 

End Function


For more options, visit https://groups.google.com/d/optout.

Alejandro Guerra

unread,
Apr 25, 2017, 10:00:30 PM4/25/17
to idem...@googlegroups.com
Okay. But I want to get it done without editing it.


For more options, visit https://groups.google.com/d/optout.

redhuan d. oon

unread,
Apr 25, 2017, 10:08:40 PM4/25/17
to iDempiere
Thanks for the macro. In return i will modify the code now to automatically take care of accidental blanks and empty rows/columns. I will inform here shortly with an update.

Alejandro Guerra

unread,
Apr 25, 2017, 10:15:21 PM4/25/17
to idem...@googlegroups.com
Anytime 
After 4 day looking finally, i  found it

Thank for the update.


For more options, visit https://groups.google.com/d/optout.

Alejandro Guerra

unread,
Apr 25, 2017, 10:42:49 PM4/25/17
to idem...@googlegroups.com
If you import the text field like this?

"MANDRIL ALAMBRISMO 1,5/2,5/3,5/4,5/5MM"

--
You received this message because you are subscribed to a topic in the Google Groups "iDempiere" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/idempiere/SnFQv1dqLmM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to idempiere+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

redhuan d. oon

unread,
Apr 26, 2017, 3:40:38 AM4/26/17
to iDempiere

OK, i have repaired the code and yes, it also can now do "quotes with, commas". Here is your original M_Product.csv i imported. But please bear in mind any dependent new data such as TaxCategory and UOM (Gross) have to be created first or imported first.

Please take the latest Ninja plugin https://sourceforge.net/projects/red1/files/ModuleCreator/

Alejandro Guerra

unread,
Apr 26, 2017, 8:05:21 AM4/26/17
to iDempiere
Hi Red 1, 

i'll test for all data and i'll feedback to you
Regards,
Alejandro Guerra
"MANDRIL ALAMBRISMO 1,5/2,5/3,5/4,5/5MM"

To unsubscribe from this group and all its topics, send an email to idempiere+...@googlegroups.com.

Alejandro Guerra

unread,
Apr 26, 2017, 10:04:20 AM4/26/17
to iDempiere
Hi Red1, 

Importing the 3_M_ProductPrice we get this error

ERROR: la sintaxis de entrada no es válida para el tipo numeric: «1,5»

Regards, 
3_M_ProductPrice.csv

redhuan d. oon

unread,
Apr 26, 2017, 12:08:27 PM4/26/17
to iDempiere
The error seems to say its not valid and may not be the Ninja. I do not use comma as decimal point so i m not sure how to test that.

redhuan d. oon

unread,
Apr 27, 2017, 3:33:02 AM4/27/17
to iDempiere
I test your file and confirmed that your error is due to different locale:

ERROR: invalid input syntax for type numeric: "1,5"

Either you use the dot decimal system or change your client locale to accept commas.

Alejandro Guerra

unread,
Apr 27, 2017, 1:35:32 PM4/27/17
to idem...@googlegroups.com
Hi Red1,

For now I use the import file loader and it works perfect without changing the decimal point !!!


Imágenes integradas 1

To unsubscribe from this group and all its topics, send an email to idempiere+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/add7dbc3-d3aa-4ed3-984d-98bf16b2d9d6%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages