From a2c3f0e574fa10ac422207667862dd7b4b21783b Mon Sep 17 00:00:00 2001 From: Johannes Hoermann <j.hoermann@adito.de> Date: Thu, 18 Jul 2019 12:45:02 +0200 Subject: [PATCH] Product searchfields --- entity/Product_entity/Product_entity.aod | 10 +++ .../Productprice_entity.aod | 10 +++ .../afterOperatingState.js | 2 +- .../Prod2prodFilter_view.aod | 73 +++++++++---------- 4 files changed, 57 insertions(+), 38 deletions(-) diff --git a/entity/Product_entity/Product_entity.aod b/entity/Product_entity/Product_entity.aod index f77bcde6d66..a40f3fa42cd 100644 --- a/entity/Product_entity/Product_entity.aod +++ b/entity/Product_entity/Product_entity.aod @@ -4,6 +4,9 @@ <majorModelMode>DISTRIBUTED</majorModelMode> <documentation>%aditoprj%/entity/Product_entity/documentation.adoc</documentation> <title>Product</title> + <siblings> + <element>Productprice_entity</element> + </siblings> <contentTitleProcess>%aditoprj%/entity/Product_entity/contentTitleProcess.js</contentTitleProcess> <afterUiInit>%aditoprj%/entity/Product_entity/afterUiInit.js</afterUiInit> <iconId>VAADIN:HAMMER</iconId> @@ -481,14 +484,17 @@ <dbRecordFieldMapping> <name>ADVERTISING.value</name> <recordfield>PRODUCT.ADVERTISING</recordfield> + <isFilterable v="true" /> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>GROUPCODEID.value</name> <recordfield>PRODUCT.GROUPCODEID</recordfield> + <isFilterable v="true" /> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>MINSTOCK.value</name> <recordfield>PRODUCT.MINSTOCK</recordfield> + <isFilterable v="true" /> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>PRODUCTCODE.value</name> @@ -501,6 +507,7 @@ <dbRecordFieldMapping> <name>PRODUCTNAME.value</name> <recordfield>PRODUCT.PRODUCTNAME</recordfield> + <isFilterable v="true" /> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>STANDARD.value</name> @@ -509,14 +516,17 @@ <dbRecordFieldMapping> <name>STATUS.value</name> <recordfield>PRODUCT.STATUS</recordfield> + <isFilterable v="true" /> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>UNIT.value</name> <recordfield>PRODUCT.UNIT</recordfield> + <isFilterable v="true" /> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>CONTACT_ID.value</name> <recordfield>PRODUCT.CONTACT_ID</recordfield> + <isFilterable v="true" /> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>GROUPCODEID.displayValue</name> diff --git a/entity/Productprice_entity/Productprice_entity.aod b/entity/Productprice_entity/Productprice_entity.aod index dfb9105616a..5b222a4fa79 100644 --- a/entity/Productprice_entity/Productprice_entity.aod +++ b/entity/Productprice_entity/Productprice_entity.aod @@ -245,22 +245,27 @@ <dbRecordFieldMapping> <name>BUYSELL.value</name> <recordfield>PRODUCTPRICE.BUYSELL</recordfield> + <isFilterable v="true" /> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>CURRENCY.value</name> <recordfield>PRODUCTPRICE.CURRENCY</recordfield> + <isFilterable v="true" /> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>FROMQUANTITY.value</name> <recordfield>PRODUCTPRICE.FROMQUANTITY</recordfield> + <isFilterable v="true" /> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>PRICE.value</name> <recordfield>PRODUCTPRICE.PRICE</recordfield> + <isFilterable v="true" /> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>PRICELIST.value</name> <recordfield>PRODUCTPRICE.PRICELIST</recordfield> + <isFilterable v="true" /> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>PRODUCTPRICEID.value</name> @@ -269,22 +274,27 @@ <dbRecordFieldMapping> <name>PRODUCT_ID.value</name> <recordfield>PRODUCTPRICE.PRODUCT_ID</recordfield> + <isFilterable v="true" /> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>CONTACT_ID.value</name> <recordfield>PRODUCTPRICE.CONTACT_ID</recordfield> + <isFilterable v="true" /> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>VALID_FROM.value</name> <recordfield>PRODUCTPRICE.VALID_FROM</recordfield> + <isFilterable v="true" /> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>VALID_TO.value</name> <recordfield>PRODUCTPRICE.VALID_TO</recordfield> + <isFilterable v="true" /> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>VAT.value</name> <recordfield>PRODUCTPRICE.VAT</recordfield> + <isFilterable v="true" /> </dbRecordFieldMapping> <dbRecordFieldMapping> <name>CURRENCY.displayValue</name> diff --git a/entity/Productprice_entity/afterOperatingState.js b/entity/Productprice_entity/afterOperatingState.js index 5541dfea336..6d4cd75413c 100644 --- a/entity/Productprice_entity/afterOperatingState.js +++ b/entity/Productprice_entity/afterOperatingState.js @@ -1,7 +1,7 @@ import("system.neon"); import("system.vars"); -if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_VIEW) +if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_VIEW && vars.get("$local.value")) // local.value is previous operationgstate or null. This fixes not working Filter { neon.refresh(); } diff --git a/neonView/Prod2prodFilter_view/Prod2prodFilter_view.aod b/neonView/Prod2prodFilter_view/Prod2prodFilter_view.aod index ce988ce1ef2..8a462a1a27f 100644 --- a/neonView/Prod2prodFilter_view/Prod2prodFilter_view.aod +++ b/neonView/Prod2prodFilter_view/Prod2prodFilter_view.aod @@ -1,37 +1,36 @@ -<?xml version="1.0" encoding="UTF-8"?> -<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> - <name>Prod2prodFilter_view</name> - <majorModelMode>DISTRIBUTED</majorModelMode> - <filterable v="true" /> - <layout> - <boxLayout> - <name>layout</name> - </boxLayout> - </layout> - <children> - <treeTableViewTemplate> - <name>PartlistTree</name> - <parentField>DEST_ID</parentField> - <favoriteActionGroup1>alter</favoriteActionGroup1> - <entityField>#ENTITY</entityField> - <columns> - <neonTableColumn> - <name>43d3c9b0-21ab-4996-8d24-af74a5ee1e1a</name> - <entityField>PRODUCTCODE</entityField> - </neonTableColumn> - <neonTableColumn> - <name>4a80fcac-b962-4af6-93c4-d2f5626fb623</name> - <entityField>QUANTITY</entityField> - </neonTableColumn> - <neonTableColumn> - <name>2382a57f-7bf9-4057-8c3c-51819a06620f</name> - <entityField>OPTIONAL</entityField> - </neonTableColumn> - <neonTableColumn> - <name>3ce55692-e3ff-4448-b7df-9cc121ca47dc</name> - <entityField>TAKEPRICE</entityField> - </neonTableColumn> - </columns> - </treeTableViewTemplate> - </children> -</neonView> +<?xml version="1.0" encoding="UTF-8"?> +<neonView xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.1" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/neonView/1.1.1"> + <name>Prod2prodFilter_view</name> + <majorModelMode>DISTRIBUTED</majorModelMode> + <layout> + <boxLayout> + <name>layout</name> + </boxLayout> + </layout> + <children> + <treeTableViewTemplate> + <name>PartlistTree</name> + <parentField>DEST_ID</parentField> + <favoriteActionGroup1>alter</favoriteActionGroup1> + <entityField>#ENTITY</entityField> + <columns> + <neonTableColumn> + <name>43d3c9b0-21ab-4996-8d24-af74a5ee1e1a</name> + <entityField>PRODUCTCODE</entityField> + </neonTableColumn> + <neonTableColumn> + <name>4a80fcac-b962-4af6-93c4-d2f5626fb623</name> + <entityField>QUANTITY</entityField> + </neonTableColumn> + <neonTableColumn> + <name>2382a57f-7bf9-4057-8c3c-51819a06620f</name> + <entityField>OPTIONAL</entityField> + </neonTableColumn> + <neonTableColumn> + <name>3ce55692-e3ff-4448-b7df-9cc121ca47dc</name> + <entityField>TAKEPRICE</entityField> + </neonTableColumn> + </columns> + </treeTableViewTemplate> + </children> +</neonView> -- GitLab