Skip to content

Commit

Permalink
Merge branch 'develop' into feature/solop-develop/spuy
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinBetanc0urt committed Dec 23, 2024
2 parents a56dfcc + 4d33891 commit ca0266a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
Binary file modified resources/adempiere-grpc-server.pb
Binary file not shown.
6 changes: 6 additions & 0 deletions src/main/java/org/spin/base/util/LookupUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.compiere.util.Env;
import org.compiere.util.Util;
import org.spin.backend.grpc.common.LookupItem;
import org.spin.service.grpc.util.value.StringManager;
import org.spin.service.grpc.util.value.ValueManager;

import com.google.protobuf.Struct;
Expand Down Expand Up @@ -123,6 +124,11 @@ public static LookupItem.Builder convertLookupItemFromReferenceList(MRefList ref
}

builder.setId(refList.getAD_Ref_List_ID())
.setUuid(
StringManager.getValidString(
refList.getUUID()
)
)
.setTableName(I_AD_Ref_List.Table_Name)
;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@
import org.spin.grpc.service.BusinessData;
import org.spin.grpc.service.field.field_management.FieldManagementLogic;
import org.spin.model.MADAppRegistration;
import org.spin.service.grpc.util.value.NumberManager;
import org.spin.service.grpc.util.value.StringManager;
import org.spin.service.grpc.util.value.TimeManager;
import org.spin.service.grpc.util.value.ValueManager;
import org.spin.util.support.AppSupportHandler;
import org.spin.util.support.IAppSupport;
Expand Down Expand Up @@ -588,13 +590,13 @@ public static ListEntitiesResponse.Builder listFilePreview(ListFilePreviewReques
if(!Util.isEmpty(entry)) {
try {
if (row.isDate()) {
Timestamp dateValue = Timestamp.valueOf(entry);
Timestamp dateValue = TimeManager.getTimestampFromString(entry);
valueBuilder = ValueManager.getValueFromTimestamp(dateValue);
} else if (row.isNumber()) {
BigDecimal numberValue = null;
if (!Util.isEmpty(entry, true)) {
numberValue = new BigDecimal(entry);
if (row.isDivideBy100()) {
numberValue = NumberManager.getBigDecimalFromString(entry);
if (numberValue != null && row.isDivideBy100()) {
numberValue = numberValue.divide(
BigDecimal.valueOf(100)
);
Expand Down Expand Up @@ -679,6 +681,11 @@ public static ListLookupItemsResponse.Builder listImportProcesses(ListImportProc

builderItem.setTableName(I_AD_Process.Table_Name);
builderItem.setId(processDefinition.getAD_Process_ID());
builderItem.setUuid(
StringManager.getValidString(
processDefinition.getUUID()
)
);

builderList.addRecords(builderItem.build());
});
Expand Down
7 changes: 4 additions & 3 deletions src/main/proto/base_data_type.proto
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ message DocumentAction {
// Lookup Item
message LookupItem {
int32 id = 1;
string table_name = 2;
google.protobuf.Struct values = 3;
bool is_active = 4;
string uuid = 2;
string table_name = 3;
google.protobuf.Struct values = 4;
bool is_active = 5;
}

message ListLookupItemsRequest {
Expand Down

0 comments on commit ca0266a

Please sign in to comment.