diff --git a/db/ddlutils/oracle/views/RV_M_REQUISITION.sql b/db/ddlutils/oracle/views/RV_M_REQUISITION.sql index d470af2110..8f603f0889 100644 --- a/db/ddlutils/oracle/views/RV_M_REQUISITION.sql +++ b/db/ddlutils/oracle/views/RV_M_REQUISITION.sql @@ -4,7 +4,7 @@ CREATE OR REPLACE VIEW RV_M_REQUISITION HELP, AD_USER_ID, M_PRICELIST_ID, M_WAREHOUSE_ID, ISAPPROVED, PRIORITYRULE, DATEREQUIRED, TOTALLINES, DOCACTION, DOCSTATUS, PROCESSED, M_REQUISITIONLINE_ID, LINE, QTY, QTYORDERED, - M_PRODUCT_ID, LINEDESCRIPTION, PRICEACTUAL, LINENETAMT) + M_PRODUCT_ID, LINEDESCRIPTION, PRICEACTUAL, LINENETAMT, C_CHARGE_ID) AS SELECT r.M_Requisition_ID, r.AD_Client_ID, r.AD_Org_ID, r.IsActive, r.Created, r.CreatedBy, r.Updated, r.UpdatedBy, @@ -16,7 +16,7 @@ SELECT r.M_Requisition_ID, (CASE WHEN l.C_OrderLine_ID IS NOT NULL THEN l.Qty ELSE 0 END) AS QtyOrdered, l.M_Product_ID, l.Description AS LineDescription, - l.PriceActual, l.LineNetAmt + l.PriceActual, l.LineNetAmt, l.C_Charge_ID FROM M_Requisition r INNER JOIN M_RequisitionLine l ON (r.M_Requisition_ID=l.M_Requisition_ID); diff --git a/db/ddlutils/postgresql/views/RV_M_REQUISITION.sql b/db/ddlutils/postgresql/views/RV_M_REQUISITION.sql index d470af2110..8f603f0889 100644 --- a/db/ddlutils/postgresql/views/RV_M_REQUISITION.sql +++ b/db/ddlutils/postgresql/views/RV_M_REQUISITION.sql @@ -4,7 +4,7 @@ CREATE OR REPLACE VIEW RV_M_REQUISITION HELP, AD_USER_ID, M_PRICELIST_ID, M_WAREHOUSE_ID, ISAPPROVED, PRIORITYRULE, DATEREQUIRED, TOTALLINES, DOCACTION, DOCSTATUS, PROCESSED, M_REQUISITIONLINE_ID, LINE, QTY, QTYORDERED, - M_PRODUCT_ID, LINEDESCRIPTION, PRICEACTUAL, LINENETAMT) + M_PRODUCT_ID, LINEDESCRIPTION, PRICEACTUAL, LINENETAMT, C_CHARGE_ID) AS SELECT r.M_Requisition_ID, r.AD_Client_ID, r.AD_Org_ID, r.IsActive, r.Created, r.CreatedBy, r.Updated, r.UpdatedBy, @@ -16,7 +16,7 @@ SELECT r.M_Requisition_ID, (CASE WHEN l.C_OrderLine_ID IS NOT NULL THEN l.Qty ELSE 0 END) AS QtyOrdered, l.M_Product_ID, l.Description AS LineDescription, - l.PriceActual, l.LineNetAmt + l.PriceActual, l.LineNetAmt, l.C_Charge_ID FROM M_Requisition r INNER JOIN M_RequisitionLine l ON (r.M_Requisition_ID=l.M_Requisition_ID); diff --git a/migration/360lts-release/oracle/824z_UpdateUU.sql b/migration/360lts-release/oracle/824z_UpdateUU.sql new file mode 100644 index 0000000000..e70881d434 --- /dev/null +++ b/migration/360lts-release/oracle/824z_UpdateUU.sql @@ -0,0 +1,205 @@ +-- required to fill UU columns for installations coming from transition version + +UPDATE AD_Table SET AD_Table_UU='8c8d6676-6538-44f1-abf8-e480da7250b2' WHERE AD_Table_ID=200001; + +UPDATE AD_Column SET AD_Column_UU='1bbcd29a-4935-4908-bea6-4f8dc313d501' WHERE AD_Column_ID=200020; + +UPDATE AD_Column SET AD_Column_UU='45063c04-4fb3-46a6-b1e1-828ac5ce614c' WHERE AD_Column_ID=200021; + +UPDATE AD_Column SET AD_Column_UU='e32147f8-ad0d-41a9-afc6-ad70da9ddd5f' WHERE AD_Column_ID=200022; + +UPDATE AD_Column SET AD_Column_UU='6ff59e2a-33cd-4e8a-b9cd-8a377978f53c' WHERE AD_Column_ID=200023; + +UPDATE AD_Column SET AD_Column_UU='2e7271de-7b31-4b10-8ffc-983789141192' WHERE AD_Column_ID=200024; + +UPDATE AD_Column SET AD_Column_UU='4af1df12-baec-453a-bec9-bec84e71617e' WHERE AD_Column_ID=200025; + +UPDATE AD_Column SET AD_Column_UU='1232b0fb-6166-4ecf-a172-02dde4c7256a' WHERE AD_Column_ID=200026; + +UPDATE AD_Column SET AD_Column_UU='b9ea7299-e3d8-4ab1-9ff4-332e8ed562d6' WHERE AD_Column_ID=200027; + +UPDATE AD_Element SET AD_Element_UU='58eb631b-8cb1-4bab-93d0-bf9f51accd2e' WHERE AD_Element_ID=200005; + +UPDATE AD_Column SET AD_Column_UU='30905aed-94c4-4e8c-b2ce-de9aa41b1586' WHERE AD_Column_ID=200028; + +UPDATE AD_Element SET AD_Element_UU='c6a0fa10-0414-4257-9990-5fcb38a91ef3' WHERE AD_Element_ID=200006; + +UPDATE AD_Column SET AD_Column_UU='f2d3a898-4321-4a39-a8f6-f29f9daed67b' WHERE AD_Column_ID=200029; + +UPDATE AD_Element SET AD_Element_UU='069a7d89-cfe4-4f89-9f32-919b7caef225' WHERE AD_Element_ID=200007; + +UPDATE AD_Column SET AD_Column_UU='03a9f86d-8d7f-424b-ac2d-06b0390263e5' WHERE AD_Column_ID=200030; + +UPDATE AD_Column SET AD_Column_UU='453e63fd-79ec-4453-be2a-61a90cd3847d' WHERE AD_Column_ID=200031; + +UPDATE AD_Element SET AD_Element_UU='f0219a4d-ea25-473c-896a-1fe5dc6c25b8' WHERE AD_Element_ID=200008; + +UPDATE AD_Column SET AD_Column_UU='8440b8a0-7a07-48cd-92f2-8a72cd8afd50' WHERE AD_Column_ID=200032; + +UPDATE AD_Element SET AD_Element_UU='f2bfdcd4-9015-4135-b738-189f96469f03' WHERE AD_Element_ID=200009; + +UPDATE AD_Column SET AD_Column_UU='1b12534a-0973-4a1e-97e2-58bcc4478a10' WHERE AD_Column_ID=200033; + +UPDATE AD_Element SET AD_Element_UU='8f1543e0-6597-48bc-b0b0-1817bac20415' WHERE AD_Element_ID=200010; + +UPDATE AD_Column SET AD_Column_UU='58ee58db-f841-4965-8af5-13ff54068f4e' WHERE AD_Column_ID=200034; + +UPDATE AD_Element SET AD_Element_UU='de1b3615-148c-4cb1-9897-7fd0b5188320' WHERE AD_Element_ID=200011; + +UPDATE AD_Column SET AD_Column_UU='9129c55a-0a13-4db7-b64d-bdc9fc740a4b' WHERE AD_Column_ID=200035; + +UPDATE AD_Element SET AD_Element_UU='13f4a559-a32b-4118-a89b-b61d826bec35' WHERE AD_Element_ID=200012; + +UPDATE AD_Column SET AD_Column_UU='56e4fd27-9418-4104-823c-7c7ebd7d0e91' WHERE AD_Column_ID=200036; + +UPDATE AD_Element SET AD_Element_UU='c556911d-90fa-4e52-a569-92588720cc6c' WHERE AD_Element_ID=200013; + +UPDATE AD_Column SET AD_Column_UU='a6ff1e46-b660-4ca5-8b55-f831e2633b94' WHERE AD_Column_ID=200037; + +UPDATE AD_Element SET AD_Element_UU='ddc61868-2b75-49d8-a117-4d7460c09647' WHERE AD_Element_ID=200014; + +UPDATE AD_Column SET AD_Column_UU='a4bf053d-8778-4f9a-a9ed-3063d27e729b' WHERE AD_Column_ID=200038; + +UPDATE AD_Column SET AD_Column_UU='f44e0d81-fb24-414e-8f8b-b818a9fbb408' WHERE AD_Column_ID=200039; + +UPDATE AD_Column SET AD_Column_UU='717ff97a-bdbf-4cd0-9499-33446a8e17fd' WHERE AD_Column_ID=200040; + +UPDATE AD_Table SET AD_Table_UU='0ec6736e-94ff-4ff4-ae56-c3be505e1e00' WHERE AD_Table_ID=200002; + +UPDATE AD_Sequence SET AD_Sequence_UU='9e99f812-6480-4053-94d9-d987b2f28665' WHERE AD_Sequence_ID=200001; + +UPDATE AD_Column SET AD_Column_UU='6997dbc7-f6c2-4575-8fe6-c560c881c1ee' WHERE AD_Column_ID=200041; + +UPDATE AD_Column SET AD_Column_UU='06443f4d-f34c-40ed-91f1-f68f2099d770' WHERE AD_Column_ID=200042; + +UPDATE AD_Column SET AD_Column_UU='fc5b5b47-8f8c-4c72-b2d7-ec0da9186030' WHERE AD_Column_ID=200043; + +UPDATE AD_Column SET AD_Column_UU='7522bd43-da4f-40d7-bdd0-1d9ef2b37d4b' WHERE AD_Column_ID=200044; + +UPDATE AD_Column SET AD_Column_UU='7874a621-6c70-476c-96e8-abba949270e2' WHERE AD_Column_ID=200045; + +UPDATE AD_Column SET AD_Column_UU='9718d2ad-1e01-49b7-b7c7-0ddf78925b67' WHERE AD_Column_ID=200046; + +UPDATE AD_Column SET AD_Column_UU='c29855c1-dcc7-403c-86f6-30efb29e54a5' WHERE AD_Column_ID=200047; + +UPDATE AD_Column SET AD_Column_UU='1e1dd8bc-358c-4b4c-b6b6-b6c496cd7d9e' WHERE AD_Column_ID=200048; + +UPDATE AD_Column SET AD_Column_UU='0a26379d-e54f-434e-a570-38cd58176542' WHERE AD_Column_ID=200049; + +UPDATE AD_Column SET AD_Column_UU='33f411f6-b519-410d-a2c5-cfdad5a0520c' WHERE AD_Column_ID=200050; + +UPDATE AD_Column SET AD_Column_UU='77b74eff-9785-4985-9d6a-0c2e02e4c41a' WHERE AD_Column_ID=200051; + +UPDATE AD_Column SET AD_Column_UU='02aeafef-79ef-43af-b76c-02cb5d92aea7' WHERE AD_Column_ID=200052; + +UPDATE AD_Column SET AD_Column_UU='707ef80f-74d9-42ab-a507-ea0b9b87ef24' WHERE AD_Column_ID=200053; + +UPDATE AD_Column SET AD_Column_UU='3f6af769-b634-43a5-9889-20ff0480f371' WHERE AD_Column_ID=200054; + +UPDATE AD_Column SET AD_Column_UU='c28a3f40-c3a8-446e-83eb-9b461c458236' WHERE AD_Column_ID=200055; + +UPDATE AD_Column SET AD_Column_UU='7c0e70c0-32a6-49c4-bf9c-f1a0746c8b02' WHERE AD_Column_ID=200056; + +UPDATE AD_Column SET AD_Column_UU='f76c1c40-dbe9-42ee-9edd-9430d6b70fae' WHERE AD_Column_ID=200057; + +UPDATE AD_Column SET AD_Column_UU='419e470f-e2ee-4ce8-8460-1500140d71cc' WHERE AD_Column_ID=200058; + +UPDATE AD_Column SET AD_Column_UU='159d2c37-c8ca-46bd-8cdb-e1c3abf3008e' WHERE AD_Column_ID=200059; + +UPDATE AD_Column SET AD_Column_UU='aeaf777e-3671-4498-aaec-4dbc37163906' WHERE AD_Column_ID=200060; + +UPDATE AD_Column SET AD_Column_UU='992335c0-322b-4c02-b749-135e28931bfd' WHERE AD_Column_ID=200061; + +UPDATE AD_Column SET AD_Column_UU='c06c3c93-eaa1-4564-a778-42b10f5539c1' WHERE AD_Column_ID=200062; + +UPDATE AD_Column SET AD_Column_UU='7fbdb857-e16e-4d2d-836b-0251d935723b' WHERE AD_Column_ID=200063; + +UPDATE AD_Column SET AD_Column_UU='62a08e0b-de59-4e0f-8324-ff590b150536' WHERE AD_Column_ID=200064; + +UPDATE AD_Column SET AD_Column_UU='03ef993c-e33c-4f88-b9ba-431fc0c1449c' WHERE AD_Column_ID=200065; + +UPDATE AD_Column SET AD_Column_UU='72698e67-0526-41cd-990a-dcfebf24d73e' WHERE AD_Column_ID=200066; + +UPDATE AD_Column SET AD_Column_UU='a8e3de0a-07e2-493a-a7ac-429a41a47bb3' WHERE AD_Column_ID=200067; + +UPDATE AD_Column SET AD_Column_UU='c1026223-a57e-4e18-9dd4-bcaa5c283649' WHERE AD_Column_ID=200068; + +UPDATE AD_Column SET AD_Column_UU='b94aa816-9576-476e-99b9-258e40883b28' WHERE AD_Column_ID=200069; + +UPDATE AD_Column SET AD_Column_UU='2795cb3f-08f5-416a-a413-cac3cc614b9a' WHERE AD_Column_ID=200070; + +UPDATE AD_Column SET AD_Column_UU='68702b21-9a7f-42d1-8d00-430c3c42a335' WHERE AD_Column_ID=200071; + +UPDATE AD_Column SET AD_Column_UU='9923bd35-b9e1-493e-9b85-7812447c65f3' WHERE AD_Column_ID=200072; + +UPDATE AD_Column SET AD_Column_UU='bb6bf453-b9b7-4145-b9e2-5e0b2c3fb058' WHERE AD_Column_ID=200073; + +UPDATE AD_Column SET AD_Column_UU='21e576f8-bcef-4acf-8668-198189e3d8ad' WHERE AD_Column_ID=200074; + +UPDATE AD_Tab SET AD_Tab_UU='834474e3-50d5-41d4-a707-ca6363f19427' WHERE AD_Tab_ID=200000; + +UPDATE AD_Field SET AD_Field_UU='8b6b26dc-1c4b-4db8-b09e-a756d8128dd6' WHERE AD_Field_ID=200005; + +UPDATE AD_Field SET AD_Field_UU='73f9fbe4-fe30-48b3-b790-6581a4e61370' WHERE AD_Field_ID=200006; + +UPDATE AD_Field SET AD_Field_UU='d7e2508d-3eeb-43b7-bbee-234fed237065' WHERE AD_Field_ID=200007; + +UPDATE AD_Field SET AD_Field_UU='66f09047-e4cb-4b09-bcc0-6cdc109a60d6' WHERE AD_Field_ID=200008; + +UPDATE AD_Field SET AD_Field_UU='65399c71-c4b2-4cab-90e0-7d61204e98da' WHERE AD_Field_ID=200009; + +UPDATE AD_Field SET AD_Field_UU='65779cfa-bc31-413a-8e0c-4ef258a1b0f8' WHERE AD_Field_ID=200010; + +UPDATE AD_Field SET AD_Field_UU='39f40544-5bb5-4bdb-ba4a-85b64905ad51' WHERE AD_Field_ID=200012; + +UPDATE AD_Field SET AD_Field_UU='8bcb338d-e86f-488d-aaf5-98d8e2c9dca2' WHERE AD_Field_ID=200011; + +UPDATE AD_Field SET AD_Field_UU='8bf1fec8-10b3-46ab-93d2-73e688fe5296' WHERE AD_Field_ID=200013; + +UPDATE AD_Field SET AD_Field_UU='a7e2ad58-1b58-486f-8f49-38ca9bb28208' WHERE AD_Field_ID=200014; + +UPDATE AD_Field SET AD_Field_UU='f7b15a16-dc17-486e-b19e-f9045e1be9af' WHERE AD_Field_ID=200015; + +UPDATE AD_Field SET AD_Field_UU='6597ecd8-91a1-4b3a-acaa-4bb2fc3d0122' WHERE AD_Field_ID=200016; + +UPDATE AD_Field SET AD_Field_UU='5223bee9-051a-4811-904d-58ddad14eac2' WHERE AD_Field_ID=200017; + +UPDATE AD_Field SET AD_Field_UU='32104954-503b-455d-bdf6-f0bd8b1168a1' WHERE AD_Field_ID=200018; + +UPDATE AD_Field SET AD_Field_UU='78928c1f-21bd-4fc1-bdc8-4a5145a445e0' WHERE AD_Field_ID=200019; + +UPDATE AD_Field SET AD_Field_UU='86dcee6e-9d39-473b-8580-847c4fc8b37f' WHERE AD_Field_ID=200020; + +UPDATE AD_Field SET AD_Field_UU='b8569191-fc3c-4c49-a95d-d0f36b02ae34' WHERE AD_Field_ID=200021; + +UPDATE AD_Field SET AD_Field_UU='0f1102a0-ef80-4fb5-b68b-34103fdf5f64' WHERE AD_Field_ID=200023; + +UPDATE AD_Field SET AD_Field_UU='3464b90f-85cc-4d1a-bad2-00a16ac0597d' WHERE AD_Field_ID=200022; + +UPDATE AD_Field SET AD_Field_UU='d13f478d-3408-43e5-851b-396c060f5278' WHERE AD_Field_ID=200024; + +UPDATE AD_Field SET AD_Field_UU='31c9b27e-53d7-47d2-95f0-f2fe497ad44c' WHERE AD_Field_ID=200025; + +UPDATE AD_Field SET AD_Field_UU='a9e57492-bda2-463d-8081-d76255673b56' WHERE AD_Field_ID=200026; + +UPDATE AD_Field SET AD_Field_UU='0d987f31-d5df-4efc-8cb6-d70a7dc3d433' WHERE AD_Field_ID=200027; + +UPDATE AD_Field SET AD_Field_UU='faf7306c-9429-4840-a5df-9de9748ec660' WHERE AD_Field_ID=200028; + +UPDATE AD_Field SET AD_Field_UU='cd3d0301-7559-4cb9-8883-aa7f2c9184b9' WHERE AD_Field_ID=200029; + +UPDATE AD_Field SET AD_Field_UU='c1fe07ef-477e-4370-9583-2a24aa086316' WHERE AD_Field_ID=200030; + +UPDATE AD_Field SET AD_Field_UU='3022e456-5a80-448d-81ce-837ccd8a7488' WHERE AD_Field_ID=200031; + +UPDATE AD_Field SET AD_Field_UU='f67d0bc4-3239-49bd-a00e-47125316dc54' WHERE AD_Field_ID=200032; + +UPDATE AD_Field SET AD_Field_UU='99e6a7fa-b939-481d-942c-0ea8fc936630' WHERE AD_Field_ID=200033; + +UPDATE AD_Field SET AD_Field_UU='945e92e7-d23f-407d-88e2-741216b30bb1' WHERE AD_Field_ID=200034; + +UPDATE AD_System + SET LastMigrationScriptApplied='824z_UpdateUU.sql' +WHERE LastMigrationScriptApplied<'824z_UpdateUU.sql' + OR LastMigrationScriptApplied IS NULL +; diff --git a/migration/360lts-release/oracle/828_IDEMPIERE-204.sql b/migration/360lts-release/oracle/828_IDEMPIERE-204.sql new file mode 100644 index 0000000000..b17f400dc8 --- /dev/null +++ b/migration/360lts-release/oracle/828_IDEMPIERE-204.sql @@ -0,0 +1,41 @@ +CREATE OR REPLACE VIEW RV_M_REQUISITION +(M_REQUISITION_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, + CREATEDBY, UPDATED, UPDATEDBY, DOCUMENTNO, DESCRIPTION, + HELP, AD_USER_ID, M_PRICELIST_ID, M_WAREHOUSE_ID, ISAPPROVED, + PRIORITYRULE, DATEREQUIRED, TOTALLINES, DOCACTION, DOCSTATUS, + PROCESSED, M_REQUISITIONLINE_ID, LINE, QTY, QTYORDERED, + M_PRODUCT_ID, LINEDESCRIPTION, PRICEACTUAL, LINENETAMT, C_CHARGE_ID) +AS +SELECT r.M_Requisition_ID, + r.AD_Client_ID, r.AD_Org_ID, r.IsActive, r.Created, r.CreatedBy, r.Updated, r.UpdatedBy, + r.DocumentNo, r.Description, r.Help, + r.AD_User_ID, r.M_PriceList_ID, r.M_Warehouse_ID, r.IsApproved, r.PriorityRule, + r.DateRequired, r.TotalLines, r.DocAction, r.DocStatus, r.Processed, + l.M_RequisitionLine_ID, l.Line, + l.Qty, + (CASE WHEN l.C_OrderLine_ID IS NOT NULL THEN l.Qty ELSE 0 END) AS QtyOrdered, + l.M_Product_ID, + l.Description AS LineDescription, + l.PriceActual, l.LineNetAmt, l.C_Charge_ID +FROM M_Requisition r + INNER JOIN M_RequisitionLine l ON (r.M_Requisition_ID=l.M_Requisition_ID); + + +-- Mar 22, 2012 9:47:24 AM COT +-- IDEMPIERE-204 Add charge to Open Requisitions report +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200082,711,'U',0,'N','N','N','The Charge indicates a type of Charge (Handling, Shipping, Restocking)','N',10,'N',19,'N',968,'N','N','N','C_Charge_ID','Additional document charges','Charge',100,TO_DATE('2012-03-22 09:47:22','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_DATE('2012-03-22 09:47:22','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 22, 2012 9:47:24 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200082 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 22, 2012 9:47:47 AM COT +UPDATE AD_Column SET EntityType='D',Updated=TO_DATE('2012-03-22 09:47:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200082 +; + +UPDATE AD_System + SET LastMigrationScriptApplied='828_IDEMPIERE-204.sql' +WHERE LastMigrationScriptApplied<'828_IDEMPIERE-204.sql' + OR LastMigrationScriptApplied IS NULL +; diff --git a/migration/360lts-release/oracle/829_IDEMPIERE-117.sql b/migration/360lts-release/oracle/829_IDEMPIERE-117.sql new file mode 100644 index 0000000000..bc2af1c5b4 --- /dev/null +++ b/migration/360lts-release/oracle/829_IDEMPIERE-117.sql @@ -0,0 +1,10 @@ +-- Apr 3, 2012 11:17:51 AM COT +-- IDEMPIERE-117 Add cost history table and cost movement view +INSERT INTO AD_Sequence (IncrementNo,StartNewYear,CurrentNextSys,IsTableID,StartNo,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,Description,Name,AD_Org_ID,AD_Client_ID,Updated,UpdatedBy,Created,CreatedBy,IsActive) VALUES (1,'N',100,'Y',1000000,1000000,'N','Y',200005,'Table M_CostHistory','M_CostHistory',0,0,TO_DATE('2012-04-03 11:17:50','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2012-04-03 11:17:50','YYYY-MM-DD HH24:MI:SS'),100,'Y') +; + +UPDATE AD_System + SET LastMigrationScriptApplied='829_IDEMPIERE-117.sql' +WHERE LastMigrationScriptApplied<'829_IDEMPIERE-117.sql' + OR LastMigrationScriptApplied IS NULL +; diff --git a/migration/360lts-release/postgresql/824z_UpdateUU.sql b/migration/360lts-release/postgresql/824z_UpdateUU.sql new file mode 100644 index 0000000000..e70881d434 --- /dev/null +++ b/migration/360lts-release/postgresql/824z_UpdateUU.sql @@ -0,0 +1,205 @@ +-- required to fill UU columns for installations coming from transition version + +UPDATE AD_Table SET AD_Table_UU='8c8d6676-6538-44f1-abf8-e480da7250b2' WHERE AD_Table_ID=200001; + +UPDATE AD_Column SET AD_Column_UU='1bbcd29a-4935-4908-bea6-4f8dc313d501' WHERE AD_Column_ID=200020; + +UPDATE AD_Column SET AD_Column_UU='45063c04-4fb3-46a6-b1e1-828ac5ce614c' WHERE AD_Column_ID=200021; + +UPDATE AD_Column SET AD_Column_UU='e32147f8-ad0d-41a9-afc6-ad70da9ddd5f' WHERE AD_Column_ID=200022; + +UPDATE AD_Column SET AD_Column_UU='6ff59e2a-33cd-4e8a-b9cd-8a377978f53c' WHERE AD_Column_ID=200023; + +UPDATE AD_Column SET AD_Column_UU='2e7271de-7b31-4b10-8ffc-983789141192' WHERE AD_Column_ID=200024; + +UPDATE AD_Column SET AD_Column_UU='4af1df12-baec-453a-bec9-bec84e71617e' WHERE AD_Column_ID=200025; + +UPDATE AD_Column SET AD_Column_UU='1232b0fb-6166-4ecf-a172-02dde4c7256a' WHERE AD_Column_ID=200026; + +UPDATE AD_Column SET AD_Column_UU='b9ea7299-e3d8-4ab1-9ff4-332e8ed562d6' WHERE AD_Column_ID=200027; + +UPDATE AD_Element SET AD_Element_UU='58eb631b-8cb1-4bab-93d0-bf9f51accd2e' WHERE AD_Element_ID=200005; + +UPDATE AD_Column SET AD_Column_UU='30905aed-94c4-4e8c-b2ce-de9aa41b1586' WHERE AD_Column_ID=200028; + +UPDATE AD_Element SET AD_Element_UU='c6a0fa10-0414-4257-9990-5fcb38a91ef3' WHERE AD_Element_ID=200006; + +UPDATE AD_Column SET AD_Column_UU='f2d3a898-4321-4a39-a8f6-f29f9daed67b' WHERE AD_Column_ID=200029; + +UPDATE AD_Element SET AD_Element_UU='069a7d89-cfe4-4f89-9f32-919b7caef225' WHERE AD_Element_ID=200007; + +UPDATE AD_Column SET AD_Column_UU='03a9f86d-8d7f-424b-ac2d-06b0390263e5' WHERE AD_Column_ID=200030; + +UPDATE AD_Column SET AD_Column_UU='453e63fd-79ec-4453-be2a-61a90cd3847d' WHERE AD_Column_ID=200031; + +UPDATE AD_Element SET AD_Element_UU='f0219a4d-ea25-473c-896a-1fe5dc6c25b8' WHERE AD_Element_ID=200008; + +UPDATE AD_Column SET AD_Column_UU='8440b8a0-7a07-48cd-92f2-8a72cd8afd50' WHERE AD_Column_ID=200032; + +UPDATE AD_Element SET AD_Element_UU='f2bfdcd4-9015-4135-b738-189f96469f03' WHERE AD_Element_ID=200009; + +UPDATE AD_Column SET AD_Column_UU='1b12534a-0973-4a1e-97e2-58bcc4478a10' WHERE AD_Column_ID=200033; + +UPDATE AD_Element SET AD_Element_UU='8f1543e0-6597-48bc-b0b0-1817bac20415' WHERE AD_Element_ID=200010; + +UPDATE AD_Column SET AD_Column_UU='58ee58db-f841-4965-8af5-13ff54068f4e' WHERE AD_Column_ID=200034; + +UPDATE AD_Element SET AD_Element_UU='de1b3615-148c-4cb1-9897-7fd0b5188320' WHERE AD_Element_ID=200011; + +UPDATE AD_Column SET AD_Column_UU='9129c55a-0a13-4db7-b64d-bdc9fc740a4b' WHERE AD_Column_ID=200035; + +UPDATE AD_Element SET AD_Element_UU='13f4a559-a32b-4118-a89b-b61d826bec35' WHERE AD_Element_ID=200012; + +UPDATE AD_Column SET AD_Column_UU='56e4fd27-9418-4104-823c-7c7ebd7d0e91' WHERE AD_Column_ID=200036; + +UPDATE AD_Element SET AD_Element_UU='c556911d-90fa-4e52-a569-92588720cc6c' WHERE AD_Element_ID=200013; + +UPDATE AD_Column SET AD_Column_UU='a6ff1e46-b660-4ca5-8b55-f831e2633b94' WHERE AD_Column_ID=200037; + +UPDATE AD_Element SET AD_Element_UU='ddc61868-2b75-49d8-a117-4d7460c09647' WHERE AD_Element_ID=200014; + +UPDATE AD_Column SET AD_Column_UU='a4bf053d-8778-4f9a-a9ed-3063d27e729b' WHERE AD_Column_ID=200038; + +UPDATE AD_Column SET AD_Column_UU='f44e0d81-fb24-414e-8f8b-b818a9fbb408' WHERE AD_Column_ID=200039; + +UPDATE AD_Column SET AD_Column_UU='717ff97a-bdbf-4cd0-9499-33446a8e17fd' WHERE AD_Column_ID=200040; + +UPDATE AD_Table SET AD_Table_UU='0ec6736e-94ff-4ff4-ae56-c3be505e1e00' WHERE AD_Table_ID=200002; + +UPDATE AD_Sequence SET AD_Sequence_UU='9e99f812-6480-4053-94d9-d987b2f28665' WHERE AD_Sequence_ID=200001; + +UPDATE AD_Column SET AD_Column_UU='6997dbc7-f6c2-4575-8fe6-c560c881c1ee' WHERE AD_Column_ID=200041; + +UPDATE AD_Column SET AD_Column_UU='06443f4d-f34c-40ed-91f1-f68f2099d770' WHERE AD_Column_ID=200042; + +UPDATE AD_Column SET AD_Column_UU='fc5b5b47-8f8c-4c72-b2d7-ec0da9186030' WHERE AD_Column_ID=200043; + +UPDATE AD_Column SET AD_Column_UU='7522bd43-da4f-40d7-bdd0-1d9ef2b37d4b' WHERE AD_Column_ID=200044; + +UPDATE AD_Column SET AD_Column_UU='7874a621-6c70-476c-96e8-abba949270e2' WHERE AD_Column_ID=200045; + +UPDATE AD_Column SET AD_Column_UU='9718d2ad-1e01-49b7-b7c7-0ddf78925b67' WHERE AD_Column_ID=200046; + +UPDATE AD_Column SET AD_Column_UU='c29855c1-dcc7-403c-86f6-30efb29e54a5' WHERE AD_Column_ID=200047; + +UPDATE AD_Column SET AD_Column_UU='1e1dd8bc-358c-4b4c-b6b6-b6c496cd7d9e' WHERE AD_Column_ID=200048; + +UPDATE AD_Column SET AD_Column_UU='0a26379d-e54f-434e-a570-38cd58176542' WHERE AD_Column_ID=200049; + +UPDATE AD_Column SET AD_Column_UU='33f411f6-b519-410d-a2c5-cfdad5a0520c' WHERE AD_Column_ID=200050; + +UPDATE AD_Column SET AD_Column_UU='77b74eff-9785-4985-9d6a-0c2e02e4c41a' WHERE AD_Column_ID=200051; + +UPDATE AD_Column SET AD_Column_UU='02aeafef-79ef-43af-b76c-02cb5d92aea7' WHERE AD_Column_ID=200052; + +UPDATE AD_Column SET AD_Column_UU='707ef80f-74d9-42ab-a507-ea0b9b87ef24' WHERE AD_Column_ID=200053; + +UPDATE AD_Column SET AD_Column_UU='3f6af769-b634-43a5-9889-20ff0480f371' WHERE AD_Column_ID=200054; + +UPDATE AD_Column SET AD_Column_UU='c28a3f40-c3a8-446e-83eb-9b461c458236' WHERE AD_Column_ID=200055; + +UPDATE AD_Column SET AD_Column_UU='7c0e70c0-32a6-49c4-bf9c-f1a0746c8b02' WHERE AD_Column_ID=200056; + +UPDATE AD_Column SET AD_Column_UU='f76c1c40-dbe9-42ee-9edd-9430d6b70fae' WHERE AD_Column_ID=200057; + +UPDATE AD_Column SET AD_Column_UU='419e470f-e2ee-4ce8-8460-1500140d71cc' WHERE AD_Column_ID=200058; + +UPDATE AD_Column SET AD_Column_UU='159d2c37-c8ca-46bd-8cdb-e1c3abf3008e' WHERE AD_Column_ID=200059; + +UPDATE AD_Column SET AD_Column_UU='aeaf777e-3671-4498-aaec-4dbc37163906' WHERE AD_Column_ID=200060; + +UPDATE AD_Column SET AD_Column_UU='992335c0-322b-4c02-b749-135e28931bfd' WHERE AD_Column_ID=200061; + +UPDATE AD_Column SET AD_Column_UU='c06c3c93-eaa1-4564-a778-42b10f5539c1' WHERE AD_Column_ID=200062; + +UPDATE AD_Column SET AD_Column_UU='7fbdb857-e16e-4d2d-836b-0251d935723b' WHERE AD_Column_ID=200063; + +UPDATE AD_Column SET AD_Column_UU='62a08e0b-de59-4e0f-8324-ff590b150536' WHERE AD_Column_ID=200064; + +UPDATE AD_Column SET AD_Column_UU='03ef993c-e33c-4f88-b9ba-431fc0c1449c' WHERE AD_Column_ID=200065; + +UPDATE AD_Column SET AD_Column_UU='72698e67-0526-41cd-990a-dcfebf24d73e' WHERE AD_Column_ID=200066; + +UPDATE AD_Column SET AD_Column_UU='a8e3de0a-07e2-493a-a7ac-429a41a47bb3' WHERE AD_Column_ID=200067; + +UPDATE AD_Column SET AD_Column_UU='c1026223-a57e-4e18-9dd4-bcaa5c283649' WHERE AD_Column_ID=200068; + +UPDATE AD_Column SET AD_Column_UU='b94aa816-9576-476e-99b9-258e40883b28' WHERE AD_Column_ID=200069; + +UPDATE AD_Column SET AD_Column_UU='2795cb3f-08f5-416a-a413-cac3cc614b9a' WHERE AD_Column_ID=200070; + +UPDATE AD_Column SET AD_Column_UU='68702b21-9a7f-42d1-8d00-430c3c42a335' WHERE AD_Column_ID=200071; + +UPDATE AD_Column SET AD_Column_UU='9923bd35-b9e1-493e-9b85-7812447c65f3' WHERE AD_Column_ID=200072; + +UPDATE AD_Column SET AD_Column_UU='bb6bf453-b9b7-4145-b9e2-5e0b2c3fb058' WHERE AD_Column_ID=200073; + +UPDATE AD_Column SET AD_Column_UU='21e576f8-bcef-4acf-8668-198189e3d8ad' WHERE AD_Column_ID=200074; + +UPDATE AD_Tab SET AD_Tab_UU='834474e3-50d5-41d4-a707-ca6363f19427' WHERE AD_Tab_ID=200000; + +UPDATE AD_Field SET AD_Field_UU='8b6b26dc-1c4b-4db8-b09e-a756d8128dd6' WHERE AD_Field_ID=200005; + +UPDATE AD_Field SET AD_Field_UU='73f9fbe4-fe30-48b3-b790-6581a4e61370' WHERE AD_Field_ID=200006; + +UPDATE AD_Field SET AD_Field_UU='d7e2508d-3eeb-43b7-bbee-234fed237065' WHERE AD_Field_ID=200007; + +UPDATE AD_Field SET AD_Field_UU='66f09047-e4cb-4b09-bcc0-6cdc109a60d6' WHERE AD_Field_ID=200008; + +UPDATE AD_Field SET AD_Field_UU='65399c71-c4b2-4cab-90e0-7d61204e98da' WHERE AD_Field_ID=200009; + +UPDATE AD_Field SET AD_Field_UU='65779cfa-bc31-413a-8e0c-4ef258a1b0f8' WHERE AD_Field_ID=200010; + +UPDATE AD_Field SET AD_Field_UU='39f40544-5bb5-4bdb-ba4a-85b64905ad51' WHERE AD_Field_ID=200012; + +UPDATE AD_Field SET AD_Field_UU='8bcb338d-e86f-488d-aaf5-98d8e2c9dca2' WHERE AD_Field_ID=200011; + +UPDATE AD_Field SET AD_Field_UU='8bf1fec8-10b3-46ab-93d2-73e688fe5296' WHERE AD_Field_ID=200013; + +UPDATE AD_Field SET AD_Field_UU='a7e2ad58-1b58-486f-8f49-38ca9bb28208' WHERE AD_Field_ID=200014; + +UPDATE AD_Field SET AD_Field_UU='f7b15a16-dc17-486e-b19e-f9045e1be9af' WHERE AD_Field_ID=200015; + +UPDATE AD_Field SET AD_Field_UU='6597ecd8-91a1-4b3a-acaa-4bb2fc3d0122' WHERE AD_Field_ID=200016; + +UPDATE AD_Field SET AD_Field_UU='5223bee9-051a-4811-904d-58ddad14eac2' WHERE AD_Field_ID=200017; + +UPDATE AD_Field SET AD_Field_UU='32104954-503b-455d-bdf6-f0bd8b1168a1' WHERE AD_Field_ID=200018; + +UPDATE AD_Field SET AD_Field_UU='78928c1f-21bd-4fc1-bdc8-4a5145a445e0' WHERE AD_Field_ID=200019; + +UPDATE AD_Field SET AD_Field_UU='86dcee6e-9d39-473b-8580-847c4fc8b37f' WHERE AD_Field_ID=200020; + +UPDATE AD_Field SET AD_Field_UU='b8569191-fc3c-4c49-a95d-d0f36b02ae34' WHERE AD_Field_ID=200021; + +UPDATE AD_Field SET AD_Field_UU='0f1102a0-ef80-4fb5-b68b-34103fdf5f64' WHERE AD_Field_ID=200023; + +UPDATE AD_Field SET AD_Field_UU='3464b90f-85cc-4d1a-bad2-00a16ac0597d' WHERE AD_Field_ID=200022; + +UPDATE AD_Field SET AD_Field_UU='d13f478d-3408-43e5-851b-396c060f5278' WHERE AD_Field_ID=200024; + +UPDATE AD_Field SET AD_Field_UU='31c9b27e-53d7-47d2-95f0-f2fe497ad44c' WHERE AD_Field_ID=200025; + +UPDATE AD_Field SET AD_Field_UU='a9e57492-bda2-463d-8081-d76255673b56' WHERE AD_Field_ID=200026; + +UPDATE AD_Field SET AD_Field_UU='0d987f31-d5df-4efc-8cb6-d70a7dc3d433' WHERE AD_Field_ID=200027; + +UPDATE AD_Field SET AD_Field_UU='faf7306c-9429-4840-a5df-9de9748ec660' WHERE AD_Field_ID=200028; + +UPDATE AD_Field SET AD_Field_UU='cd3d0301-7559-4cb9-8883-aa7f2c9184b9' WHERE AD_Field_ID=200029; + +UPDATE AD_Field SET AD_Field_UU='c1fe07ef-477e-4370-9583-2a24aa086316' WHERE AD_Field_ID=200030; + +UPDATE AD_Field SET AD_Field_UU='3022e456-5a80-448d-81ce-837ccd8a7488' WHERE AD_Field_ID=200031; + +UPDATE AD_Field SET AD_Field_UU='f67d0bc4-3239-49bd-a00e-47125316dc54' WHERE AD_Field_ID=200032; + +UPDATE AD_Field SET AD_Field_UU='99e6a7fa-b939-481d-942c-0ea8fc936630' WHERE AD_Field_ID=200033; + +UPDATE AD_Field SET AD_Field_UU='945e92e7-d23f-407d-88e2-741216b30bb1' WHERE AD_Field_ID=200034; + +UPDATE AD_System + SET LastMigrationScriptApplied='824z_UpdateUU.sql' +WHERE LastMigrationScriptApplied<'824z_UpdateUU.sql' + OR LastMigrationScriptApplied IS NULL +; diff --git a/migration/360lts-release/postgresql/828_IDEMPIERE-204.sql b/migration/360lts-release/postgresql/828_IDEMPIERE-204.sql new file mode 100644 index 0000000000..483b03e957 --- /dev/null +++ b/migration/360lts-release/postgresql/828_IDEMPIERE-204.sql @@ -0,0 +1,40 @@ +CREATE OR REPLACE VIEW RV_M_REQUISITION +(M_REQUISITION_ID, AD_CLIENT_ID, AD_ORG_ID, ISACTIVE, CREATED, + CREATEDBY, UPDATED, UPDATEDBY, DOCUMENTNO, DESCRIPTION, + HELP, AD_USER_ID, M_PRICELIST_ID, M_WAREHOUSE_ID, ISAPPROVED, + PRIORITYRULE, DATEREQUIRED, TOTALLINES, DOCACTION, DOCSTATUS, + PROCESSED, M_REQUISITIONLINE_ID, LINE, QTY, QTYORDERED, + M_PRODUCT_ID, LINEDESCRIPTION, PRICEACTUAL, LINENETAMT, C_CHARGE_ID) +AS +SELECT r.M_Requisition_ID, + r.AD_Client_ID, r.AD_Org_ID, r.IsActive, r.Created, r.CreatedBy, r.Updated, r.UpdatedBy, + r.DocumentNo, r.Description, r.Help, + r.AD_User_ID, r.M_PriceList_ID, r.M_Warehouse_ID, r.IsApproved, r.PriorityRule, + r.DateRequired, r.TotalLines, r.DocAction, r.DocStatus, r.Processed, + l.M_RequisitionLine_ID, l.Line, + l.Qty, + (CASE WHEN l.C_OrderLine_ID IS NOT NULL THEN l.Qty ELSE 0 END) AS QtyOrdered, + l.M_Product_ID, + l.Description AS LineDescription, + l.PriceActual, l.LineNetAmt, l.C_Charge_ID +FROM M_Requisition r + INNER JOIN M_RequisitionLine l ON (r.M_Requisition_ID=l.M_Requisition_ID); + +-- Mar 22, 2012 9:47:24 AM COT +-- IDEMPIERE-204 Add charge to Open Requisitions report +INSERT INTO AD_Column (AD_Column_ID,AD_Table_ID,EntityType,Version,IsMandatory,IsTranslated,IsIdentifier,Help,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,CreatedBy,Updated,AD_Client_ID,AD_Org_ID,IsActive,Created,UpdatedBy) VALUES (200082,711,'U',0,'N','N','N','The Charge indicates a type of Charge (Handling, Shipping, Restocking)','N',10,'N',19,'N',968,'N','N','N','C_Charge_ID','Additional document charges','Charge',100,TO_TIMESTAMP('2012-03-22 09:47:22','YYYY-MM-DD HH24:MI:SS'),0,0,'Y',TO_TIMESTAMP('2012-03-22 09:47:22','YYYY-MM-DD HH24:MI:SS'),100) +; + +-- Mar 22, 2012 9:47:24 AM COT +INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200082 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID) +; + +-- Mar 22, 2012 9:47:47 AM COT +UPDATE AD_Column SET EntityType='D',Updated=TO_TIMESTAMP('2012-03-22 09:47:47','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200082 +; + +UPDATE AD_System + SET LastMigrationScriptApplied='828_IDEMPIERE-204.sql' +WHERE LastMigrationScriptApplied<'828_IDEMPIERE-204.sql' + OR LastMigrationScriptApplied IS NULL +; diff --git a/migration/360lts-release/postgresql/829_IDEMPIERE-117.sql b/migration/360lts-release/postgresql/829_IDEMPIERE-117.sql new file mode 100644 index 0000000000..9f9fa4f4de --- /dev/null +++ b/migration/360lts-release/postgresql/829_IDEMPIERE-117.sql @@ -0,0 +1,10 @@ +-- Apr 3, 2012 11:17:51 AM COT +-- IDEMPIERE-117 Add cost history table and cost movement view +INSERT INTO AD_Sequence (IncrementNo,StartNewYear,CurrentNextSys,IsTableID,StartNo,CurrentNext,IsAudited,IsAutoSequence,AD_Sequence_ID,Description,Name,AD_Org_ID,AD_Client_ID,Updated,UpdatedBy,Created,CreatedBy,IsActive) VALUES (1,'N',100,'Y',1000000,1000000,'N','Y',200005,'Table M_CostHistory','M_CostHistory',0,0,TO_TIMESTAMP('2012-04-03 11:17:50','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2012-04-03 11:17:50','YYYY-MM-DD HH24:MI:SS'),100,'Y') +; + +UPDATE AD_System + SET LastMigrationScriptApplied='829_IDEMPIERE-117.sql' +WHERE LastMigrationScriptApplied<'829_IDEMPIERE-117.sql' + OR LastMigrationScriptApplied IS NULL +; diff --git a/org.adempiere.base.process/src/org/compiere/process/BPartnerOrgLink.java b/org.adempiere.base.process/src/org/compiere/process/BPartnerOrgLink.java index e83574061f..c234415b6f 100644 --- a/org.adempiere.base.process/src/org/compiere/process/BPartnerOrgLink.java +++ b/org.adempiere.base.process/src/org/compiere/process/BPartnerOrgLink.java @@ -142,7 +142,7 @@ public class BPartnerOrgLink extends SvrProcess { mLoc = new MLocator (wh, "Standard"); mLoc.setIsDefault(true); - mLoc.save(get_TrxName()); + mLoc.saveEx(get_TrxName()); } // Update/Save Org Info @@ -176,7 +176,7 @@ public class BPartnerOrgLink extends SvrProcess if (!found) { MRoleOrgAccess orgAccess = new MRoleOrgAccess (org, p_AD_Role_ID); - orgAccess.save(get_TrxName()); + orgAccess.saveEx(get_TrxName()); } } diff --git a/org.adempiere.base.process/src/org/compiere/process/CopyColumnsFromTable.java b/org.adempiere.base.process/src/org/compiere/process/CopyColumnsFromTable.java index bd760dff18..a2750fc8c2 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CopyColumnsFromTable.java +++ b/org.adempiere.base.process/src/org/compiere/process/CopyColumnsFromTable.java @@ -20,6 +20,7 @@ import java.util.logging.Level; import org.compiere.model.MColumn; import org.compiere.model.MTable; import org.compiere.model.M_Element; +import org.compiere.model.PO; import org.compiere.util.AdempiereSystemError; /** @@ -84,6 +85,9 @@ public class CopyColumnsFromTable extends SvrProcess for (int i = 0; i < sourceColumns.length; i++) { MColumn colTarget = new MColumn(targetTable); + PO.copyValues(sourceColumns[i], colTarget); + colTarget.setAD_Table_ID (targetTable.getAD_Table_ID()); + colTarget.setEntityType(targetTable.getEntityType()); // special case the key -> sourceTable_ID if (sourceColumns[i].getColumnName().equals(sourceTable.getTableName()+"_ID")) { String targetColumnName = new String(targetTable.getTableName()+"_ID"); @@ -104,39 +108,9 @@ public class CopyColumnsFromTable extends SvrProcess colTarget.setName(targetTable.getName()); colTarget.setDescription(targetTable.getDescription()); colTarget.setHelp(targetTable.getHelp()); - } else { - colTarget.setColumnName(sourceColumns[i].getColumnName()); - colTarget.setAD_Element_ID(sourceColumns[i].getAD_Element_ID()); - colTarget.setName(sourceColumns[i].getName()); - colTarget.setDescription(sourceColumns[i].getDescription()); - colTarget.setHelp(sourceColumns[i].getHelp()); } - colTarget.setVersion(sourceColumns[i].getVersion()); - colTarget.setAD_Val_Rule_ID(sourceColumns[i].getAD_Val_Rule_ID()); - colTarget.setDefaultValue(sourceColumns[i].getDefaultValue()); - colTarget.setFieldLength(sourceColumns[i].getFieldLength()); - colTarget.setIsKey(sourceColumns[i].isKey()); - colTarget.setIsParent(sourceColumns[i].isParent()); - colTarget.setIsMandatory(sourceColumns[i].isMandatory()); - colTarget.setIsTranslated(sourceColumns[i].isTranslated()); - colTarget.setIsIdentifier(sourceColumns[i].isIdentifier()); - colTarget.setSeqNo(sourceColumns[i].getSeqNo()); - colTarget.setIsEncrypted(sourceColumns[i].getIsEncrypted()); - colTarget.setAD_Reference_ID(sourceColumns[i].getAD_Reference_ID()); - colTarget.setAD_Reference_Value_ID(sourceColumns[i].getAD_Reference_Value_ID()); colTarget.setIsActive(sourceColumns[i].isActive()); - colTarget.setVFormat(sourceColumns[i].getVFormat()); - colTarget.setCallout(sourceColumns[i].getCallout()); - colTarget.setIsUpdateable(sourceColumns[i].isUpdateable()); - colTarget.setAD_Process_ID(sourceColumns[i].getAD_Process_ID()); - colTarget.setValueMin(sourceColumns[i].getValueMin()); - colTarget.setValueMax(sourceColumns[i].getValueMax()); - colTarget.setIsSelectionColumn(sourceColumns[i].isSelectionColumn()); - colTarget.setReadOnlyLogic(sourceColumns[i].getReadOnlyLogic()); - colTarget.setIsSyncDatabase(sourceColumns[i].getIsSyncDatabase()); - colTarget.setIsAlwaysUpdateable(sourceColumns[i].isAlwaysUpdateable()); - colTarget.setColumnSQL(sourceColumns[i].getColumnSQL()); - colTarget.save(get_TrxName()); + colTarget.saveEx(get_TrxName()); // TODO: Copy translations m_count++; } diff --git a/org.adempiere.base.process/src/org/compiere/process/FactAcctReset.java b/org.adempiere.base.process/src/org/compiere/process/FactAcctReset.java index 667429a51c..9d6c7a4686 100644 --- a/org.adempiere.base.process/src/org/compiere/process/FactAcctReset.java +++ b/org.adempiere.base.process/src/org/compiere/process/FactAcctReset.java @@ -44,6 +44,7 @@ import org.compiere.util.DB; import org.compiere.util.TimeUtil; import org.eevolution.model.X_DD_Order; import org.eevolution.model.X_HR_Process; +import org.eevolution.model.X_PP_Cost_Collector; import org.eevolution.model.X_PP_Order; /** @@ -243,6 +244,8 @@ public class FactAcctReset extends SvrProcess docBaseType = "= '" + MPeriodControl.DOCBASETYPE_DistributionOrder+ "'"; else if (AD_Table_ID == X_HR_Process.Table_ID) docBaseType = "= '" + MPeriodControl.DOCBASETYPE_Payroll+ "'"; + else if (AD_Table_ID == X_PP_Cost_Collector.Table_ID) + docBaseType = "= '" + MPeriodControl.DOCBASETYPE_ManufacturingCostCollector+ "'"; // if (docBaseType == null) { diff --git a/org.adempiere.base.process/src/org/compiere/process/M_Product_BOM_Check.java b/org.adempiere.base.process/src/org/compiere/process/M_Product_BOM_Check.java index f888be2677..95cff66f55 100644 --- a/org.adempiere.base.process/src/org/compiere/process/M_Product_BOM_Check.java +++ b/org.adempiere.base.process/src/org/compiere/process/M_Product_BOM_Check.java @@ -85,7 +85,7 @@ public class M_Product_BOM_Check extends SvrProcess log.info("NOT BOM Product"); // No BOM - should not happen, but no problem xp.setIsVerified(true); - xp.save(get_TrxName()); + xp.saveEx(get_TrxName()); return "OK"; } @@ -170,7 +170,7 @@ public class M_Product_BOM_Check extends SvrProcess // Finish process xp.setIsVerified(true); - xp.save(get_TrxName()); + xp.saveEx(get_TrxName()); return "OK"; } // doIt diff --git a/org.adempiere.base/src/org/compiere/Adempiere.java b/org.adempiere.base/src/org/compiere/Adempiere.java index 7c6d799593..d074d8abae 100644 --- a/org.adempiere.base/src/org/compiere/Adempiere.java +++ b/org.adempiere.base/src/org/compiere/Adempiere.java @@ -45,6 +45,9 @@ import org.compiere.util.Login; import org.compiere.util.SecureEngine; import org.compiere.util.SecureInterface; import org.compiere.util.Util; +import org.eclipse.core.runtime.IProduct; +import org.eclipse.core.runtime.Platform; +import org.osgi.framework.Bundle; /** * Adempiere Control Class @@ -139,9 +142,21 @@ public final class Adempiere */ public static String getVersion() { - return MAIN_VERSION + " @ " + DATE_VERSION; + IProduct product = Platform.getProduct(); + if (product != null) { + Bundle bundle = product.getDefiningBundle(); + if (bundle != null) { + return bundle.getVersion().toString(); + } + } + return "Unknown"; } // getVersion + public static String getDatabaseVersion() + { + return DB.getSQLValueString(null, "select lastmigrationscriptapplied from ad_system"); + } + /** * Short Summary (Windows) * @return summary @@ -183,8 +198,8 @@ public final class Adempiere s_ImplementationVersion = adempierePackage.getImplementationVersion(); if (s_ImplementationVendor == null) { - s_ImplementationVendor = "Supported by ADempiere community"; - s_ImplementationVersion = "ADempiere"; + s_ImplementationVendor = "Supported by iDempiere community"; + s_ImplementationVersion = "iDempiere"; } } // setPackageInfo @@ -576,5 +591,4 @@ public final class Adempiere public static URL getResource(String name) { return Core.getResourceFinder().getResource(name); } - } // Adempiere diff --git a/org.adempiere.base/src/org/adempiere/model/I_M_CostHistory.java b/org.adempiere.base/src/org/compiere/model/I_M_CostHistory.java similarity index 99% rename from org.adempiere.base/src/org/adempiere/model/I_M_CostHistory.java rename to org.adempiere.base/src/org/compiere/model/I_M_CostHistory.java index 3aeb9c05c6..5ff875fa73 100644 --- a/org.adempiere.base/src/org/adempiere/model/I_M_CostHistory.java +++ b/org.adempiere.base/src/org/compiere/model/I_M_CostHistory.java @@ -14,11 +14,10 @@ * ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA * * or via info@compiere.org or http://www.compiere.org/license.html * *****************************************************************************/ -package org.adempiere.model; +package org.compiere.model; import java.math.BigDecimal; import java.sql.Timestamp; -import org.compiere.model.*; import org.compiere.util.KeyNamePair; /** Generated Interface for M_CostHistory diff --git a/org.adempiere.base/src/org/compiere/model/MAdvertisement.java b/org.adempiere.base/src/org/compiere/model/MAdvertisement.java index 67ba1edaec..88055bf23e 100644 --- a/org.adempiere.base/src/org/compiere/model/MAdvertisement.java +++ b/org.adempiere.base/src/org/compiere/model/MAdvertisement.java @@ -111,7 +111,7 @@ public class MAdvertisement extends X_W_Advertisement if (m_clickCount != null) { m_clickCount.setTargetURL(TargetURL); - m_clickCount.save(get_TrxName()); + m_clickCount.saveEx(get_TrxName()); } } // getClickTargetURL diff --git a/org.adempiere.base/src/org/compiere/model/MBankStatement.java b/org.adempiere.base/src/org/compiere/model/MBankStatement.java index be672499be..56806857ef 100644 --- a/org.adempiere.base/src/org/compiere/model/MBankStatement.java +++ b/org.adempiere.base/src/org/compiere/model/MBankStatement.java @@ -387,7 +387,7 @@ public class MBankStatement extends X_C_BankStatement implements DocAction { MPayment payment = new MPayment (getCtx(), line.getC_Payment_ID(), get_TrxName()); payment.setIsReconciled(true); - payment.save(get_TrxName()); + payment.saveEx(get_TrxName()); } } // Update Bank Account @@ -395,7 +395,7 @@ public class MBankStatement extends X_C_BankStatement implements DocAction ba.load(get_TrxName()); //BF 1933645 ba.setCurrentBalance(ba.getCurrentBalance().add(getStatementDifference())); - ba.save(get_TrxName()); + ba.saveEx(get_TrxName()); // User Validation String valid = ModelValidationEngine.get().fireDocValidate(this, ModelValidator.TIMING_AFTER_COMPLETE); diff --git a/org.adempiere.base/src/org/compiere/model/MCStage.java b/org.adempiere.base/src/org/compiere/model/MCStage.java index 1d429b0b5c..4d1b7ccdbc 100644 --- a/org.adempiere.base/src/org/compiere/model/MCStage.java +++ b/org.adempiere.base/src/org/compiere/model/MCStage.java @@ -287,7 +287,7 @@ public class MCStage extends X_CM_CStage thisElement.setCM_CStage_ID(this.get_ID()); thisElement.setContentHTML(" "); thisElement.setName(elementName); - thisElement.save(get_TrxName()); + thisElement.saveEx(get_TrxName()); } } diff --git a/org.adempiere.base/src/org/compiere/model/MCostDetail.java b/org.adempiere.base/src/org/compiere/model/MCostDetail.java index cf0f7cc69b..85cfef48d7 100644 --- a/org.adempiere.base/src/org/compiere/model/MCostDetail.java +++ b/org.adempiere.base/src/org/compiere/model/MCostDetail.java @@ -23,7 +23,7 @@ import java.util.List; import java.util.Properties; import java.util.logging.Level; -import org.adempiere.model.X_M_CostHistory; +import org.compiere.model.X_M_CostHistory; import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; diff --git a/org.adempiere.base/src/org/compiere/model/MExpenseType.java b/org.adempiere.base/src/org/compiere/model/MExpenseType.java index 90a6e006e2..5d915e03d3 100644 --- a/org.adempiere.base/src/org/compiere/model/MExpenseType.java +++ b/org.adempiere.base/src/org/compiere/model/MExpenseType.java @@ -106,7 +106,7 @@ public class MExpenseType extends X_S_ExpenseType MProduct prod = getProduct(); if (prod.setExpenseType(this)) - prod.save(get_TrxName()); + prod.saveEx(get_TrxName()); return success; } // afterSave diff --git a/org.adempiere.base/src/org/compiere/model/MInOut.java b/org.adempiere.base/src/org/compiere/model/MInOut.java index 5c0d5c6412..73a4c62fad 100644 --- a/org.adempiere.base/src/org/compiere/model/MInOut.java +++ b/org.adempiere.base/src/org/compiere/model/MInOut.java @@ -743,7 +743,7 @@ public class MInOut extends X_M_InOut implements DocAction if (counter) { fromLine.setRef_InOutLine_ID(line.getM_InOutLine_ID()); - fromLine.save(get_TrxName()); + fromLine.saveEx(get_TrxName()); } } if (fromLines.length != count) { @@ -1544,7 +1544,7 @@ public class MInOut extends X_M_InOut implements DocAction && sLine.getMovementQty().compareTo(oLine.getQtyOrdered()) == 0) // just if full match [ 1876965 ] { oLine.setM_AttributeSetInstance_ID(sLine.getM_AttributeSetInstance_ID()); - oLine.save(get_TrxName()); + oLine.saveEx(get_TrxName()); } } else // No Order - Try finding links via Invoice @@ -1573,7 +1573,7 @@ public class MInOut extends X_M_InOut implements DocAction && sLine.getMovementQty().compareTo(oLine.getQtyOrdered()) == 0) // just if full match [ 1876965 ] { oLine.setM_AttributeSetInstance_ID(sLine.getM_AttributeSetInstance_ID()); - oLine.save(get_TrxName()); + oLine.saveEx(get_TrxName()); } } } // No Order @@ -1667,7 +1667,7 @@ public class MInOut extends X_M_InOut implements DocAction // References (Should not be required dropShipment.setSalesRep_ID(getSalesRep_ID()); - dropShipment.save(get_TrxName()); + dropShipment.saveEx(get_TrxName()); // Update line order references to linked sales order lines MInOutLine[] lines = dropShipment.getLines(true); @@ -1877,7 +1877,7 @@ public class MInOut extends X_M_InOut implements DocAction // Refernces (Should not be required counter.setSalesRep_ID(getSalesRep_ID()); - counter.save(get_TrxName()); + counter.saveEx(get_TrxName()); String MovementType = counter.getMovementType(); boolean inTrx = MovementType.charAt(1) == '+'; // V+ Vendor Receipt @@ -1892,7 +1892,7 @@ public class MInOut extends X_M_InOut implements DocAction counterLine.setM_Locator_ID(0); counterLine.setM_Locator_ID(inTrx ? Env.ZERO : counterLine.getMovementQty()); // - counterLine.save(get_TrxName()); + counterLine.saveEx(get_TrxName()); } log.fine(counter.toString()); @@ -1904,7 +1904,7 @@ public class MInOut extends X_M_InOut implements DocAction { counter.setDocAction(counterDT.getDocAction()); counter.processIt(counterDT.getDocAction()); - counter.save(get_TrxName()); + counter.saveEx(get_TrxName()); } } return counter; @@ -1947,7 +1947,7 @@ public class MInOut extends X_M_InOut implements DocAction { line.setQty(Env.ZERO); line.addDescription("Void (" + old + ")"); - line.save(get_TrxName()); + line.saveEx(get_TrxName()); } } // diff --git a/org.adempiere.base/src/org/compiere/model/MInventory.java b/org.adempiere.base/src/org/compiere/model/MInventory.java index 196927cc3e..3a8a4f6cdc 100644 --- a/org.adempiere.base/src/org/compiere/model/MInventory.java +++ b/org.adempiere.base/src/org/compiere/model/MInventory.java @@ -689,7 +689,7 @@ public class MInventory extends X_M_Inventory implements DocAction line.setQtyInternalUse(Env.ZERO); line.setQtyCount(line.getQtyBook()); line.addDescription("Void (" + oldCount + "/" + oldInternal + ")"); - line.save(get_TrxName()); + line.saveEx(get_TrxName()); } } } diff --git a/org.adempiere.base/src/org/compiere/model/MInvoice.java b/org.adempiere.base/src/org/compiere/model/MInvoice.java index 3c21dcf4fc..0f14feaeeb 100644 --- a/org.adempiere.base/src/org/compiere/model/MInvoice.java +++ b/org.adempiere.base/src/org/compiere/model/MInvoice.java @@ -761,7 +761,7 @@ public class MInvoice extends X_C_Invoice implements DocAction if (counter) { fromLine.setRef_InvoiceLine_ID(line.getC_InvoiceLine_ID()); - fromLine.save(get_TrxName()); + fromLine.saveEx(get_TrxName()); } // MZ Goodwill @@ -2004,7 +2004,7 @@ public class MInvoice extends X_C_Invoice implements DocAction counter.setBPartner(counterBP); // Refernces (Should not be required counter.setSalesRep_ID(getSalesRep_ID()); - counter.save(get_TrxName()); + counter.saveEx(get_TrxName()); // Update copied lines MInvoiceLine[] counterLines = counter.getLines(true); @@ -2016,7 +2016,7 @@ public class MInvoice extends X_C_Invoice implements DocAction counterLine.setPrice(); counterLine.setTax(); // - counterLine.save(get_TrxName()); + counterLine.saveEx(get_TrxName()); } log.fine(counter.toString()); @@ -2028,7 +2028,7 @@ public class MInvoice extends X_C_Invoice implements DocAction { counter.setDocAction(counterDT.getDocAction()); counter.processIt(counterDT.getDocAction()); - counter.save(get_TrxName()); + counter.saveEx(get_TrxName()); } } return counter; @@ -2080,10 +2080,10 @@ public class MInvoice extends X_C_Invoice implements DocAction { MInOutLine ioLine = new MInOutLine(getCtx(), line.getM_InOutLine_ID(), get_TrxName()); ioLine.setIsInvoiced(false); - ioLine.save(get_TrxName()); + ioLine.saveEx(get_TrxName()); line.setM_InOutLine_ID(0); } - line.save(get_TrxName()); + line.saveEx(get_TrxName()); } } addDescription(Msg.getMsg(getCtx(), "Voided")); @@ -2147,7 +2147,7 @@ public class MInvoice extends X_C_Invoice implements DocAction { allocations[i].setDocAction(DocAction.ACTION_Reverse_Correct); allocations[i].reverseCorrectIt(); - allocations[i].save(get_TrxName()); + allocations[i].saveEx(get_TrxName()); } // Reverse/Delete Matching if (!isSOTrx()) @@ -2163,7 +2163,7 @@ public class MInvoice extends X_C_Invoice implements DocAction else { mPO[i].setC_InvoiceLine_ID(null); - mPO[i].save(get_TrxName()); + mPO[i].saveEx(get_TrxName()); } } } @@ -2232,10 +2232,10 @@ public class MInvoice extends X_C_Invoice implements DocAction { MInOutLine ioLine = new MInOutLine(getCtx(), iLine.getM_InOutLine_ID(), get_TrxName()); ioLine.setIsInvoiced(false); - ioLine.save(get_TrxName()); + ioLine.saveEx(get_TrxName()); // Reconsiliation iLine.setM_InOutLine_ID(0); - iLine.save(get_TrxName()); + iLine.saveEx(get_TrxName()); } } setProcessed(true); diff --git a/org.adempiere.base/src/org/compiere/model/MMeasure.java b/org.adempiere.base/src/org/compiere/model/MMeasure.java index e07992dd00..f3065b4582 100644 --- a/org.adempiere.base/src/org/compiere/model/MMeasure.java +++ b/org.adempiere.base/src/org/compiere/model/MMeasure.java @@ -388,7 +388,7 @@ public class MMeasure extends X_PA_Measure { MGoal goal = goals[i]; goal.setMeasureActual(getManualActual()); - goal.save(get_TrxName()); + goal.saveEx(get_TrxName()); } return true; } // updateManualGoals @@ -431,7 +431,7 @@ public class MMeasure extends X_PA_Measure } } goal.setMeasureActual(ManualActual); - goal.save(get_TrxName()); + goal.saveEx(get_TrxName()); } return true; } // updateAchievementGoals @@ -478,7 +478,7 @@ public class MMeasure extends X_PA_Measure log.fine("No Value = " + sql); } goal.setMeasureActual(ManualActual); - goal.save(get_TrxName()); + goal.saveEx(get_TrxName()); } return true; } // updateCalculatedGoals @@ -532,7 +532,7 @@ public class MMeasure extends X_PA_Measure log.fine("No Value = " + sql); } goal.setMeasureActual(ManualActual); - goal.save(get_TrxName()); + goal.saveEx(get_TrxName()); } return true; } // updateRequests @@ -575,7 +575,7 @@ public class MMeasure extends X_PA_Measure log.fine("No Value = " + sql); } goal.setMeasureActual(ManualActual); - goal.save(get_TrxName()); + goal.saveEx(get_TrxName()); } return true; } // updateProjects @@ -659,7 +659,7 @@ public class MMeasure extends X_PA_Measure } } goal.setMeasureActual(amt); - goal.save(get_TrxName()); + goal.saveEx(get_TrxName()); } return true; } // updateUserDefinedGoals diff --git a/org.adempiere.base/src/org/compiere/model/MMovement.java b/org.adempiere.base/src/org/compiere/model/MMovement.java index a866507bd3..89ca0c46e8 100644 --- a/org.adempiere.base/src/org/compiere/model/MMovement.java +++ b/org.adempiere.base/src/org/compiere/model/MMovement.java @@ -634,7 +634,7 @@ public class MMovement extends X_M_Movement implements DocAction { line.setMovementQty(Env.ZERO); line.addDescription("Void (" + old + ")"); - line.save(get_TrxName()); + line.saveEx(get_TrxName()); } } } diff --git a/org.adempiere.base/src/org/compiere/model/MMovementConfirm.java b/org.adempiere.base/src/org/compiere/model/MMovementConfirm.java index d3db3be768..f8eb985053 100644 --- a/org.adempiere.base/src/org/compiere/model/MMovementConfirm.java +++ b/org.adempiere.base/src/org/compiere/model/MMovementConfirm.java @@ -394,14 +394,14 @@ public class MMovementConfirm extends X_M_MovementConfirm implements DocAction if (confirm.isFullyConfirmed()) { confirm.setProcessed(true); - confirm.save(get_TrxName()); + confirm.saveEx(get_TrxName()); } else { if (createDifferenceDoc (move, confirm)) { confirm.setProcessed(true); - confirm.save(get_TrxName()); + confirm.saveEx(get_TrxName()); } else { diff --git a/org.adempiere.base/src/org/compiere/model/MOrder.java b/org.adempiere.base/src/org/compiere/model/MOrder.java index 6273275207..bb7026b5f1 100644 --- a/org.adempiere.base/src/org/compiere/model/MOrder.java +++ b/org.adempiere.base/src/org/compiere/model/MOrder.java @@ -553,7 +553,7 @@ public class MOrder extends X_C_Order implements DocAction if (counter) { fromLines[i].setRef_OrderLine_ID(line.getC_OrderLine_ID()); - fromLines[i].save(get_TrxName()); + fromLines[i].saveEx(get_TrxName()); } } if (fromLines.length != count) @@ -704,7 +704,7 @@ public class MOrder extends X_C_Order implements DocAction { MOrderLine line = lines[i]; line.setLine(number); - line.save(get_TrxName()); + line.saveEx(get_TrxName()); number += step; } m_lines = null; @@ -892,7 +892,7 @@ public class MOrder extends X_C_Order implements DocAction if (schedule[i].isValid() != valid) { schedule[i].setIsValid(valid); - schedule[i].save(get_TrxName()); + schedule[i].saveEx(get_TrxName()); } } return valid; @@ -2061,7 +2061,7 @@ public class MOrder extends X_C_Order implements DocAction counter.setDatePromised(getDatePromised()); // default is date ordered // Refernces (Should not be required counter.setSalesRep_ID(getSalesRep_ID()); - counter.save(get_TrxName()); + counter.saveEx(get_TrxName()); // Update copied lines MOrderLine[] counterLines = counter.getLines(true, null); @@ -2071,7 +2071,7 @@ public class MOrder extends X_C_Order implements DocAction counterLine.setOrder(counter); // copies header values (BP, etc.) counterLine.setPrice(); counterLine.setTax(); - counterLine.save(get_TrxName()); + counterLine.saveEx(get_TrxName()); } log.fine(counter.toString()); @@ -2082,7 +2082,7 @@ public class MOrder extends X_C_Order implements DocAction { counter.setDocAction(counterDT.getDocAction()); counter.processIt(counterDT.getDocAction()); - counter.save(get_TrxName()); + counter.saveEx(get_TrxName()); } } return counter; @@ -2111,7 +2111,7 @@ public class MOrder extends X_C_Order implements DocAction line.addDescription(Msg.getMsg(getCtx(), "Voided") + " (" + old + ")"); line.setQty(Env.ZERO); line.setLineNetAmt(Env.ZERO); - line.save(get_TrxName()); + line.saveEx(get_TrxName()); } //AZ Goodwill if (!isSOTrx()) @@ -2199,7 +2199,7 @@ public class MOrder extends X_C_Order implements DocAction return false; } ship.setDocAction(MInOut.DOCACTION_None); - ship.save(get_TrxName()); + ship.saveEx(get_TrxName()); } // for all shipments // Reverse All *Invoices* @@ -2232,7 +2232,7 @@ public class MOrder extends X_C_Order implements DocAction return false; } invoice.setDocAction(MInvoice.DOCACTION_None); - invoice.save(get_TrxName()); + invoice.saveEx(get_TrxName()); } // for all shipments m_processMsg = info.toString(); @@ -2265,7 +2265,7 @@ public class MOrder extends X_C_Order implements DocAction line.setQtyOrdered(line.getQtyDelivered()); // QtyEntered unchanged line.addDescription("Close (" + old + ")"); - line.save(get_TrxName()); + line.saveEx(get_TrxName()); } } // Clear Reservations diff --git a/org.adempiere.base/src/org/compiere/model/MPayment.java b/org.adempiere.base/src/org/compiere/model/MPayment.java index 0a38e6afc0..1a81d59235 100644 --- a/org.adempiere.base/src/org/compiere/model/MPayment.java +++ b/org.adempiere.base/src/org/compiere/model/MPayment.java @@ -2379,7 +2379,7 @@ public final class MPayment extends X_C_Payment reversal.closeIt(); reversal.setDocStatus(DOCSTATUS_Reversed); reversal.setDocAction(DOCACTION_None); - reversal.save(get_TrxName()); + reversal.saveEx(get_TrxName()); // Unlink & De-Allocate deAllocate(); @@ -2418,7 +2418,7 @@ public final class MPayment extends X_C_Payment log.warning("Automatic allocation - reversal line not saved"); } alloc.processIt(DocAction.ACTION_Complete); - alloc.save(get_TrxName()); + alloc.saveEx(get_TrxName()); // StringBuffer info = new StringBuffer (reversal.getDocumentNo()); info.append(" - @C_AllocationHdr_ID@: ").append(alloc.getDocumentNo()); @@ -2428,7 +2428,7 @@ public final class MPayment extends X_C_Payment { MBPartner bp = new MBPartner (getCtx(), getC_BPartner_ID(), get_TrxName()); bp.setTotalOpenBalance(); - bp.save(get_TrxName()); + bp.saveEx(get_TrxName()); } // After reverseCorrect m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_AFTER_REVERSECORRECT); diff --git a/org.adempiere.base/src/org/compiere/model/MProductBOM.java b/org.adempiere.base/src/org/compiere/model/MProductBOM.java index dbe0b8ccca..e620e306c3 100644 --- a/org.adempiere.base/src/org/compiere/model/MProductBOM.java +++ b/org.adempiere.base/src/org/compiere/model/MProductBOM.java @@ -166,7 +166,7 @@ public class MProductBOM extends X_M_Product_BOM if (product.isVerified()) { product.setIsVerified(false); - product.save(get_TrxName()); + product.saveEx(get_TrxName()); } // Invalidate Products where BOM is used diff --git a/org.adempiere.base/src/org/compiere/model/MRecentItem.java b/org.adempiere.base/src/org/compiere/model/MRecentItem.java index 34fee60431..6272629599 100644 --- a/org.adempiere.base/src/org/compiere/model/MRecentItem.java +++ b/org.adempiere.base/src/org/compiere/model/MRecentItem.java @@ -240,6 +240,11 @@ public class MRecentItem extends X_AD_RecentItem String windowName = win.get_Translation("Name"); MTable table = MTable.get(getCtx(), getAD_Table_ID()); PO po = table.getPO(getRecord_ID(), null); + if (po == null) { + /* Recent Item was deleted (probably with direct SQL DELETE) */ + this.deleteEx(true, null); + return null; + } String recordIdentifier = ""; if (po.get_ColumnIndex("DocumentNo") > 0) recordIdentifier = recordIdentifier + "_" + po.get_ValueAsString("DocumentNo"); diff --git a/org.adempiere.base/src/org/compiere/model/MRecurring.java b/org.adempiere.base/src/org/compiere/model/MRecurring.java index 00927d8f9f..65f68ad3ff 100644 --- a/org.adempiere.base/src/org/compiere/model/MRecurring.java +++ b/org.adempiere.base/src/org/compiere/model/MRecurring.java @@ -126,7 +126,7 @@ public class MRecurring extends X_C_Recurring } else return "Invalid @RecurringType@ = " + getRecurringType(); - run.save(get_TrxName()); + run.saveEx(get_TrxName()); // setDateLastRun (run.getUpdated()); diff --git a/org.adempiere.base/src/org/adempiere/model/X_M_CostHistory.java b/org.adempiere.base/src/org/compiere/model/X_M_CostHistory.java similarity index 98% rename from org.adempiere.base/src/org/adempiere/model/X_M_CostHistory.java rename to org.adempiere.base/src/org/compiere/model/X_M_CostHistory.java index a05c2bd75f..80edfbcf38 100644 --- a/org.adempiere.base/src/org/adempiere/model/X_M_CostHistory.java +++ b/org.adempiere.base/src/org/compiere/model/X_M_CostHistory.java @@ -15,12 +15,11 @@ * or via info@compiere.org or http://www.compiere.org/license.html * *****************************************************************************/ /** Generated Model - DO NOT CHANGE */ -package org.adempiere.model; +package org.compiere.model; import java.math.BigDecimal; import java.sql.ResultSet; import java.util.Properties; -import org.compiere.model.*; import org.compiere.util.Env; /** Generated Model for M_CostHistory @@ -32,7 +31,7 @@ public class X_M_CostHistory extends PO implements I_M_CostHistory, I_Persistent /** * */ - private static final long serialVersionUID = 20120308L; + private static final long serialVersionUID = 20120402L; /** Standard Constructor */ public X_M_CostHistory (Properties ctx, int M_CostHistory_ID, String trxName) diff --git a/org.adempiere.base/src/org/compiere/report/FinStatement.java b/org.adempiere.base/src/org/compiere/report/FinStatement.java index 2cdffac4e1..c7f98ca8fa 100644 --- a/org.adempiere.base/src/org/compiere/report/FinStatement.java +++ b/org.adempiere.base/src/org/compiere/report/FinStatement.java @@ -341,11 +341,22 @@ public class FinStatement extends SvrProcess log.finest(sb.toString()); // Set Name,Description - String sql_select = "SELECT e.Name, fa.Description " - + "FROM Fact_Acct fa" - + " INNER JOIN AD_Table t ON (fa.AD_Table_ID=t.AD_Table_ID)" - + " INNER JOIN AD_Element e ON (t.TableName||'_ID'=e.ColumnName) " - + "WHERE r.Fact_Acct_ID=fa.Fact_Acct_ID"; + String sql_select; + Language lang = Language.getLoginLanguage(); + if (Env.isBaseLanguage(lang, "AD_Element")) { + sql_select = "SELECT e.Name, fa.Description " + + "FROM Fact_Acct fa" + + " INNER JOIN AD_Table t ON (fa.AD_Table_ID=t.AD_Table_ID)" + + " INNER JOIN AD_Element e ON (t.TableName||'_ID'=e.ColumnName) " + + "WHERE r.Fact_Acct_ID=fa.Fact_Acct_ID"; + } else { + sql_select = "SELECT et.Name, fa.Description " + + "FROM Fact_Acct fa" + + " INNER JOIN AD_Table t ON (fa.AD_Table_ID=t.AD_Table_ID)" + + " INNER JOIN AD_Element e ON (t.TableName||'_ID'=e.ColumnName) " + + " INNER JOIN AD_Element_Trl et ON (e.AD_Element_ID=et.AD_Element_ID AND et.AD_Language='"+lang.getAD_Language()+"') " + + "WHERE r.Fact_Acct_ID=fa.Fact_Acct_ID"; + } // Translated Version ... sb = new StringBuffer ("UPDATE T_ReportStatement r SET (Name,Description)=(") .append(sql_select).append(") " diff --git a/org.adempiere.base/src/org/eevolution/model/MDDOrder.java b/org.adempiere.base/src/org/eevolution/model/MDDOrder.java index 3553cc0cf6..349b8809aa 100644 --- a/org.adempiere.base/src/org/eevolution/model/MDDOrder.java +++ b/org.adempiere.base/src/org/eevolution/model/MDDOrder.java @@ -486,7 +486,7 @@ public class MDDOrder extends X_DD_Order implements DocAction { MDDOrderLine line = lines[i]; line.setLine(number); - line.save(get_TrxName()); + line.saveEx(get_TrxName()); number += step; } m_lines = null; @@ -1008,7 +1008,7 @@ public class MDDOrder extends X_DD_Order implements DocAction if (old.signum() != 0) { line.addDescription(Msg.getMsg(getCtx(), "Voided") + " (" + old + ")"); - line.save(get_TrxName()); + line.saveEx(get_TrxName()); } } addDescription(Msg.getMsg(getCtx(), "Voided")); @@ -1133,7 +1133,7 @@ public class MDDOrder extends X_DD_Order implements DocAction line.setQtyOrdered(line.getQtyDelivered()); // QtyEntered unchanged line.addDescription("Close (" + old + ")"); - line.save(get_TrxName()); + line.saveEx(get_TrxName()); } } // Clear Reservations diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java index c8c43c363b..3eef8a4314 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java @@ -170,6 +170,8 @@ public class DPRecentItems extends DashboardPanel implements EventListener { int riShown = 0; for (MRecentItem ri : ris) { String label = ri.getLabel(); + if (label == null) + continue; ToolBarButton btnrecentItem = new ToolBarButton(String.valueOf(ri.getAD_RecentItem_ID())); btnrecentItem.setLabel(label); btnrecentItem.setImage(getIconFile()); diff --git a/org.adempiere.ui.zk/theme/default/version-info.zul b/org.adempiere.ui.zk/theme/default/version-info.zul index 4b9efbf2a5..1a7d227f7c 100644 --- a/org.adempiere.ui.zk/theme/default/version-info.zul +++ b/org.adempiere.ui.zk/theme/default/version-info.zul @@ -6,11 +6,9 @@ Copyright (C) 2009 Idalica Corporation import org.compiere.Adempiere; - var mainVersion = Adempiere.MAIN_VERSION; - var dateVersion = Adempiere.DATE_VERSION; - var dbVersion = Adempiere.DB_VERSION; + var mainVersion = Adempiere.getVersion(); + var dbVersion = Adempiere.getDatabaseVersion(); var vendor = Adempiere.getImplementationVendor(); - var vendorVersion = Adempiere.getImplementationVersion(); var jvm = Adempiere.getJavaInfo(); var os = Adempiere.getOSInfo(); @@ -30,15 +28,10 @@ Copyright (C) 2009 Idalica Corporation
- + - - - - - @@ -49,11 +42,6 @@ Copyright (C) 2009 Idalica Corporation - - - - -
Main VersionVersion : ${mainVersion}
Date Version:${dateVersion}
Database Version :: ${vendor}
Vendor Version:${vendorVersion}
JVM :