diff --git a/entity/Productprice_entity/Productprice_entity.aod b/entity/Productprice_entity/Productprice_entity.aod index c4538d9a766987b6821dfecf5a329eb3006f1458..dc37cf42d11f1287d3bf2100ec9b93cef76e1ccf 100644 --- a/entity/Productprice_entity/Productprice_entity.aod +++ b/entity/Productprice_entity/Productprice_entity.aod @@ -4,6 +4,7 @@ <title>Prices</title> <majorModelMode>DISTRIBUTED</majorModelMode> <documentation>%aditoprj%/entity/Productprice_entity/documentation.adoc</documentation> + <afterOperatingState>%aditoprj%/entity/Productprice_entity/afterOperatingState.js</afterOperatingState> <recordContainer>db</recordContainer> <entityFields> <entityField> @@ -18,6 +19,7 @@ <title>Currency</title> <consumer>KeywordCurrencies</consumer> <mandatory v="true" /> + <valueProcess>%aditoprj%/entity/Productprice_entity/entityfields/currency/valueProcess.js</valueProcess> <displayValueProcess>%aditoprj%/entity/Productprice_entity/entityfields/currency/displayValueProcess.js</displayValueProcess> </entityField> <entityField> @@ -48,7 +50,7 @@ <consumer>Products</consumer> <linkedContext>Product</linkedContext> <mandatory v="true" /> - <state>AUTO</state> + <state>READONLY</state> <valueProcess>%aditoprj%/entity/Productprice_entity/entityfields/product_id/valueProcess.js</valueProcess> <displayValueProcess>%aditoprj%/entity/Productprice_entity/entityfields/product_id/displayValueProcess.js</displayValueProcess> </entityField> @@ -93,6 +95,7 @@ <state>AUTO</state> <stateProcess>%aditoprj%/entity/Productprice_entity/entityfields/pricelist/stateProcess.js</stateProcess> <titleProcess>%aditoprj%/entity/Productprice_entity/entityfields/pricelist/titleProcess.js</titleProcess> + <valueProcess>%aditoprj%/entity/Productprice_entity/entityfields/pricelist/valueProcess.js</valueProcess> <displayValueProcess>%aditoprj%/entity/Productprice_entity/entityfields/pricelist/displayValueProcess.js</displayValueProcess> <onValidation>%aditoprj%/entity/Productprice_entity/entityfields/pricelist/onValidation.js</onValidation> </entityField> diff --git a/entity/Productprice_entity/afterOperatingState.js b/entity/Productprice_entity/afterOperatingState.js new file mode 100644 index 0000000000000000000000000000000000000000..5541dfea336535d08d4b6e9f3cd236dd3634fb12 --- /dev/null +++ b/entity/Productprice_entity/afterOperatingState.js @@ -0,0 +1,7 @@ +import("system.neon"); +import("system.vars"); + +if(vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_VIEW) +{ + neon.refresh(); +} diff --git a/entity/Productprice_entity/entityfields/currency/valueProcess.js b/entity/Productprice_entity/entityfields/currency/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..081cebb3e478a2c2c0b001db3ac3baab9dba0caa --- /dev/null +++ b/entity/Productprice_entity/entityfields/currency/valueProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); + +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +{ + result.string("EUR"); +} \ No newline at end of file diff --git a/entity/Productprice_entity/entityfields/pricelist/valueProcess.js b/entity/Productprice_entity/entityfields/pricelist/valueProcess.js new file mode 100644 index 0000000000000000000000000000000000000000..f9c9524cedcd93dab192369848c72be7cfdd2329 --- /dev/null +++ b/entity/Productprice_entity/entityfields/pricelist/valueProcess.js @@ -0,0 +1,8 @@ +import("system.result"); +import("system.neon"); +import("system.vars"); + +if (vars.get("$sys.recordstate") == neon.OPERATINGSTATE_NEW) +{ + result.string("02553fc7-4611-4914-8ff5-0b7c4e7531c9"); +} \ No newline at end of file