diff --git a/entity/Offer_entity/Offer_entity.aod b/entity/Offer_entity/Offer_entity.aod index 89c126aae63a6c4ca813d6384d10c1c3c19d27df..c9a551b7de0a31bce14caead59279587d9069ff0 100644 --- a/entity/Offer_entity/Offer_entity.aod +++ b/entity/Offer_entity/Offer_entity.aod @@ -1125,6 +1125,20 @@ <iconId>VAADIN:CURLY_BRACKETS</iconId> <stateProcess>%aditoprj%/entity/Offer_entity/entityfields/openadminview/stateProcess.js</stateProcess> </entityActionField> + <entityConsumer> + <name>Orders</name> + <dependency> + <name>dependency</name> + <entityName>Order_entity</entityName> + <fieldName>#PROVIDER</fieldName> + </dependency> + <children> + <entityParameter> + <name>OfferId_param</name> + <valueProcess>%aditoprj%/entity/Offer_entity/entityfields/orders/children/offerid_param/valueProcess.js</valueProcess> + </entityParameter> + </children> + </entityConsumer> </entityFields> <recordContainers> <dbRecordContainer> diff --git a/entity/Offer_entity/entityfields/orders/children/offerid_param/valueProcess.js b/entity/Offer_entity/entityfields/orders/children/offerid_param/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..2f6bb2c4c74e8f1938df1bc834592a2d18865e02 --- /dev/null +++ b/entity/Offer_entity/entityfields/orders/children/offerid_param/valueProcess.js @@ -0,0 +1,4 @@ +import("system.vars"); +import("system.result"); + +result.string(vars.get("$field.OFFERID")); diff --git a/entity/Order_entity/Order_entity.aod b/entity/Order_entity/Order_entity.aod index f9d3dd60f06a287133e98358fda08d724f3316c6..ea20792d664c1f6d3213eaeb1ef3dc411bfc94c2 100644 --- a/entity/Order_entity/Order_entity.aod +++ b/entity/Order_entity/Order_entity.aod @@ -35,6 +35,12 @@ <fieldName>Orders</fieldName> <isConsumer v="false" /> </entityDependency> + <entityDependency> + <name>b9cdee36-bfa3-4682-9a1d-26996dd6a5c2</name> + <entityName>Offer_entity</entityName> + <fieldName>Orders</fieldName> + <isConsumer v="false" /> + </entityDependency> </dependencies> </entityProvider> <entityField> diff --git a/entity/Order_entity/recordcontainers/db/conditionProcess.js b/entity/Order_entity/recordcontainers/db/conditionProcess.js index 572d8249ded4490fb35322640e28b49764831b3f..a2241cff99281d0737ccb5e721f5807f80e792e7 100644 --- a/entity/Order_entity/recordcontainers/db/conditionProcess.js +++ b/entity/Order_entity/recordcontainers/db/conditionProcess.js @@ -7,7 +7,10 @@ var cond = newWhere(); if(vars.exists("$param.ContactId_param") && vars.get("$param.ContactId_param")) cond.andIfSet("SALESORDER.CONTACT_ID", "$param.ContactId_param"); -else { +else if(vars.exists("$param.OfferId_param") && vars.get("$param.OfferId_param")) + cond.andIfSet("SALESORDER.OFFER_ID", "$param.OfferId_param"); +else +{ cond.andIfSet("SALESORDER.OBJECT_ROWID", "$param.ObjectRowId_param") .andIfSet("SALESORDER.OBJECT_TYPE", "$param.ObjectType_param"); } diff --git a/neonView/OfferMain_view/OfferMain_view.aod b/neonView/OfferMain_view/OfferMain_view.aod index 2010f32c7d27ac1e66b86c24284e11fed94dc821..e573ae5340a0cbfe9340e2a195c03adade11762f 100644 --- a/neonView/OfferMain_view/OfferMain_view.aod +++ b/neonView/OfferMain_view/OfferMain_view.aod @@ -24,6 +24,11 @@ <entityField>Products</entityField> <view>ProductFilter_view</view> </neonViewReference> + <neonViewReference> + <name>e44fbc18-387e-41f3-acbc-41a9e65e2d38</name> + <entityField>Orders</entityField> + <view>OrderFilter_view</view> + </neonViewReference> <neonViewReference> <name>e6b12eed-d67e-467c-9302-f6340f901235</name> <entityField>#ENTITY</entityField>