Explorar o código

Ajdusted the report XML template

Signed-off-by: Stan Janssen <stan.janssen@elaad.nl>
Stan Janssen %!s(int64=4) %!d(string=hai) anos
pai
achega
8e3d39e089
Modificáronse 1 ficheiros con 5 adicións e 3 borrados
  1. 5 3
      openleadr/templates/parts/oadrReportDescription.xml

+ 5 - 3
openleadr/templates/parts/oadrReportDescription.xml

@@ -1,8 +1,10 @@
-<oadr:oadrReportDescription xmlns:emix="http://docs.oasis-open.org/ns/emix/2011/06">
+<oadr:oadrReportDescription xmlns:emix="http://docs.oasis-open.org/ns/emix/2011/06" xmlns:power="http://docs.oasis-open.org/ns/emix/2011/06/power">
   <ei:rID>{{ report_description.r_id }}</ei:rID>
-  {% if report_description.report_subject %}
+  {% if report_description.report_subject and report_description.report_subject.end_device_asset.mrid %}
   <ei:reportSubject>
-    <ei:resourceID>{{ report_description.report_subject.resource_id }}</ei:resourceID>
+    <power:endDeviceAsset>
+      <power:mrid>{{ report_description.report_subject.end_device_asset.mrid }}</power:mrid>
+    </power:endDeviceAsset>
   </ei:reportSubject>
   {% endif %}