{"action":"closed","issue":{"url":"https://api.github.com/repos/adempiere/adempiere/issues/436","repository_url":"https://api.github.com/repos/adempiere/adempiere","labels_url":"https://api.github.com/repos/adempiere/adempiere/issues/436/labels{/name}","comments_url":"https://api.github.com/repos/adempiere/adempiere/issues/436/comments","events_url":"https://api.github.com/repos/adempiere/adempiere/issues/436/events","html_url":"https://github.com/adempiere/adempiere/issues/436","id":161259117,"number":436,"title":"Error when try auto generate print format based on report view with multiples companies","user":{"login":"e-Evolution","id":786968,"avatar_url":"https://avatars.githubusercontent.com/u/786968?v=3","gravatar_id":"","url":"https://api.github.com/users/e-Evolution","html_url":"https://github.com/e-Evolution","followers_url":"https://api.github.com/users/e-Evolution/followers","following_url":"https://api.github.com/users/e-Evolution/following{/other_user}","gists_url":"https://api.github.com/users/e-Evolution/gists{/gist_id}","starred_url":"https://api.github.com/users/e-Evolution/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/e-Evolution/subscriptions","organizations_url":"https://api.github.com/users/e-Evolution/orgs","repos_url":"https://api.github.com/users/e-Evolution/repos","events_url":"https://api.github.com/users/e-Evolution/events{/privacy}","received_events_url":"https://api.github.com/users/e-Evolution/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/adempiere/adempiere/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"e-Evolution","id":786968,"avatar_url":"https://avatars.githubusercontent.com/u/786968?v=3","gravatar_id":"","url":"https://api.github.com/users/e-Evolution","html_url":"https://github.com/e-Evolution","followers_url":"https://api.github.com/users/e-Evolution/followers","following_url":"https://api.github.com/users/e-Evolution/following{/other_user}","gists_url":"https://api.github.com/users/e-Evolution/gists{/gist_id}","starred_url":"https://api.github.com/users/e-Evolution/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/e-Evolution/subscriptions","organizations_url":"https://api.github.com/users/e-Evolution/orgs","repos_url":"https://api.github.com/users/e-Evolution/repos","events_url":"https://api.github.com/users/e-Evolution/events{/privacy}","received_events_url":"https://api.github.com/users/e-Evolution/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2016-06-20T18:14:35Z","updated_at":"2016-06-20T18:15:21Z","closed_at":"2016-06-20T18:15:21Z","body":"The problem is that print format name is build based on original print format , this is ok when work a single company but when try create same report in second company this fails because detect violation constraints.\r\n\r\n===========> DB.executeUpdate: INSERT INTO AD_PrintFormat (AD_Client_ID,AD_Org_ID,AD_PrintColor_ID,AD_PrintFont_ID,AD_PrintFormat_ID,AD_PrintPaper_ID,AD_ReportView_ID,AD_Table_ID,Created,CreatedBy,FooterMargin,HeaderMargin,IsActive,IsDefault,IsForm,IsStandardHeaderFooter,IsSummary,IsTableBased,Name,Updated,UpdatedBy) VALUES (1000007,1000015,100,130,1000360,100,117,413,TO_TIMESTAMP('2016-06-17 13:13:04','YYYY-MM-DD HH24:MI:SS'),1024714,0,0,'Y','N','N','Y','N','Y','Saldos Abiertos',TO_TIMESTAMP('2016-06-17 13:13:04','YYYY-MM-DD HH24:MI:SS'),1024714) [POSave_2e9c5de6-88a3-4ded-b83e-23d2a2178462] [271]\r\norg.postgresql.util.PSQLException: ERROR: llave duplicada viola restricción de unicidad «ad_printformat_name»\r\nDetail: Ya existe la llave (ad_client_id, ad_table_id, name)=(1000007, 413, Saldos Abiertos).; State=23505; ErrorCode=0\r\nat org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)\r\nat org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)\r\nat org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)\r\nat org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)\r\nat org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:419)\r\nat org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:365)\r\nat com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)\r\nat sun.reflect.GeneratedMethodAccessor98.invoke(Unknown Source)\r\nat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\nat java.lang.reflect.Method.invoke(Method.java:497)\r\nat org.compiere.db.StatementProxy.invoke(StatementProxy.java:100)\r\nat com.sun.proxy.$Proxy69.executeUpdate(Unknown Source)\r\nat org.compiere.util.DB.executeUpdate(DB.java:1032)\r\nat org.compiere.util.DB.executeUpdate(DB.java:894)\r\nat org.compiere.util.DB.executeUpdate(DB.java:881)\r\nat org.compiere.model.PO.saveNew(PO.java:2820)\r\nat org.compiere.model.PO.save(PO.java:2157)\r\nat org.compiere.print.MPrintFormat.createFromReportView(MPrintFormat.java:575)\r\nat org.compiere.print.ReportEngine.get(ReportEngine.java:1227)\r\nat org.compiere.print.ReportCtl.startStandardReport(ReportCtl.java:207)\r\nat org.compiere.print.ReportCtl.start(ReportCtl.java:158)\r\nat org.compiere.print.ReportCtl.start(ReportCtl.java:104)\r\nat org.compiere.apps.ProcessCtl.run(ProcessCtl.java:468)\r\nat org.compiere.apps.ProcessCtl.process(ProcessCtl.java:217)"}}
{"actor":{"display_login":"e-Evolution"}}