From b317ffdf36ebb5834a779657bac9136a625f6034 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 19 Apr 2022 21:26:22 +0200 Subject: [PATCH 01/10] Added context variables of the build object --- docs/report/build.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/report/build.md b/docs/report/build.md index 2e86672..817a4e2 100644 --- a/docs/report/build.md +++ b/docs/report/build.md @@ -19,8 +19,19 @@ In addition to the default report context variables, the following context varia | --- | --- | | build | The [Build](./context_variables.md#build) object the report is being generated against | | part | The [Part](./context_variables.md#part) object that the build references | -| reference | The build order reference string | +| reference | The build order reference string. This is just the string that follors BO... | +| title | The full name of the build including the BO | | quantity | Build order quantity | +| build.title | The description of the build | +| build.status | The status of the build. 20 meand 'Production' | +| build.bom_items | A query set with all bom items fo the build | +bom_items that cen be looped using {%for line in build.bom_items %} Each bom_item line has further context variables. +| Variable | Description | +| --- | --- | +| line.reference | The reference designator of the component | +| line.sub_part | The part as this position | +| line.quantity | The number of components | +| line.sub_part.build_order_allocations | ... | From b6b759ef492f2fd388d1f8b0e82103d57bcc74ff Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 19 Apr 2022 21:28:09 +0200 Subject: [PATCH 02/10] Fixed typos --- docs/report/build.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/report/build.md b/docs/report/build.md index 817a4e2..aed3371 100644 --- a/docs/report/build.md +++ b/docs/report/build.md @@ -19,19 +19,19 @@ In addition to the default report context variables, the following context varia | --- | --- | | build | The [Build](./context_variables.md#build) object the report is being generated against | | part | The [Part](./context_variables.md#part) object that the build references | -| reference | The build order reference string. This is just the string that follors BO... | +| reference | The build order reference string. This is just the string that follows BO... | | title | The full name of the build including the BO | | quantity | Build order quantity | | build.title | The description of the build | -| build.status | The status of the build. 20 meand 'Production' | -| build.bom_items | A query set with all bom items fo the build | +| build.status | The status of the build. 20 means 'Production' | +| build.bom_items | A query set with all bom items for the build | -bom_items that cen be looped using {%for line in build.bom_items %} Each bom_item line has further context variables. +bom_items that can be looped using {%for line in build.bom_items %} Each bom_item line has further context variables. | Variable | Description | | --- | --- | | line.reference | The reference designator of the component | -| line.sub_part | The part as this position | +| line.sub_part | The part at this position | | line.quantity | The number of components | | line.sub_part.build_order_allocations | ... | From 974ac9788542c30592b12fc94b4e68199575a6f2 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 19 Apr 2022 21:46:01 +0200 Subject: [PATCH 03/10] Added an example --- docs/report/build.md | 66 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/docs/report/build.md b/docs/report/build.md index aed3371..e43bee1 100644 --- a/docs/report/build.md +++ b/docs/report/build.md @@ -35,3 +35,69 @@ bom_items that can be looped using {%for line in build.bom_items %} Each bom_ite | line.quantity | The number of components | | line.sub_part.build_order_allocations | ... | +A very simple example wihtout any html formatting: + +'''HTML +reference: {{reference }} +
+quantity: {{ quantity }} +
+title: {{ title }} +
+part: {{ part }} +
+build: {{ build }} +
+
+build.reference: {{ build.reference }} +
+build.title: {{ build.title }} +
+build.status: {{ build.status }} +
+------- +
+{% for line in build.bom_items %} +reference:: {{ line.reference }} +
+quantity:: {{ line.quantity }} +
+sub_part: {{ line.sub_part }} +
+sub_part.IPN: {{ line.sub_part.IPN }} +
+sub_part.name: {{ line.sub_part.name }} +
+sub_part.build_order_allocations: {{ line.sub_part.build_order_allocations}} +
+........ +
+{% endfor %} +''' + +This will result in: + +reference: 0001 +quantity: 10 +title: BO0001 +part: POP-000001-001 | Converter - A to B +build: BO0001 + +build.reference: 0001 +build.title: Description of the build +build.status: 20 +------- +reference:: U002 +quantity:: 1.00000 +sub_part: ANA-000001-001 | op701 - operation amplifier +sub_part.IPN: ANA-000001-001 +sub_part.name: op701 +sub_part.build_order_allocations: ]> +........ +reference:: U001 +quantity:: 2.00000 +sub_part: ANA-000002-001 | L7805 - LDO +sub_part.IPN: ANA-000002-001 +sub_part.name: L7805 +sub_part.build_order_allocations: ]> +........ From a19058bc37c7d95edb59584d012bdcb37ec005ee Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 19 Apr 2022 21:47:47 +0200 Subject: [PATCH 04/10] Update build.md --- docs/report/build.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/report/build.md b/docs/report/build.md index e43bee1..69cffa1 100644 --- a/docs/report/build.md +++ b/docs/report/build.md @@ -37,7 +37,7 @@ bom_items that can be looped using {%for line in build.bom_items %} Each bom_ite A very simple example wihtout any html formatting: -'''HTML +```html reference: {{reference }}
quantity: {{ quantity }} @@ -73,7 +73,7 @@ sub_part.build_order_allocations: {{ line.sub_part.build_order_allocations}} ........
{% endfor %} -''' +``` This will result in: From 561091325876753ad557b9a8f86fc58b9b45557d Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 19 Apr 2022 21:49:29 +0200 Subject: [PATCH 05/10] Fixed formatting --- docs/report/build.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/report/build.md b/docs/report/build.md index 69cffa1..1470070 100644 --- a/docs/report/build.md +++ b/docs/report/build.md @@ -77,6 +77,7 @@ sub_part.build_order_allocations: {{ line.sub_part.build_order_allocations}} This will result in: +```text reference: 0001 quantity: 10 title: BO0001 @@ -101,3 +102,4 @@ sub_part.IPN: ANA-000002-001 sub_part.name: L7805 sub_part.build_order_allocations: ]> ........ +``` From 02acd177b7f6b0e732b5d6e0579d477e38b586e4 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 20 Apr 2022 17:40:53 +0200 Subject: [PATCH 06/10] fixed format problems --- docs/report/build.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/report/build.md b/docs/report/build.md index 1470070..da12e42 100644 --- a/docs/report/build.md +++ b/docs/report/build.md @@ -26,7 +26,7 @@ In addition to the default report context variables, the following context varia | build.status | The status of the build. 20 means 'Production' | | build.bom_items | A query set with all bom items for the build | -bom_items that can be looped using {%for line in build.bom_items %} Each bom_item line has further context variables. +bom_items that can be looped using ```html {%for line in build.bom_items %}``` Each bom_item line has further context variables. | Variable | Description | | --- | --- | @@ -68,7 +68,7 @@ sub_part.IPN: {{ line.sub_part.IPN }}
sub_part.name: {{ line.sub_part.name }}
-sub_part.build_order_allocations: {{ line.sub_part.build_order_allocations}} +sub_part.build_order_allocations: {{ line.sub_part.build_order_allocations }}
........
From 5e8f3793ab4f4cb3aad3c6e7aa9d12454ab09ae7 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 20 Apr 2022 17:51:48 +0200 Subject: [PATCH 07/10] Fixed rendring issues --- docs/report/build.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/report/build.md b/docs/report/build.md index da12e42..7895147 100644 --- a/docs/report/build.md +++ b/docs/report/build.md @@ -26,7 +26,13 @@ In addition to the default report context variables, the following context varia | build.status | The status of the build. 20 means 'Production' | | build.bom_items | A query set with all bom items for the build | -bom_items that can be looped using ```html {%for line in build.bom_items %}``` Each bom_item line has further context variables. +bom_items that can be looped using + +```html +{%for line in build.bom_items %} +``` + +Each bom_item line has further context variables. | Variable | Description | | --- | --- | From 15cd9fbbbd6886decd9bbe3aecfb2b451b1d4a5d Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 20 Apr 2022 17:56:30 +0200 Subject: [PATCH 08/10] Update build.md --- docs/report/build.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/report/build.md b/docs/report/build.md index 7895147..e8199f4 100644 --- a/docs/report/build.md +++ b/docs/report/build.md @@ -30,6 +30,8 @@ bom_items that can be looped using ```html {%for line in build.bom_items %} +some code +{% endfor %} ``` Each bom_item line has further context variables. From 72a2b35921597c2c0808daece484d3a46d2a657d Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 20 Apr 2022 18:00:06 +0200 Subject: [PATCH 09/10] Update build.md --- docs/report/build.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/docs/report/build.md b/docs/report/build.md index e8199f4..f888a67 100644 --- a/docs/report/build.md +++ b/docs/report/build.md @@ -26,15 +26,7 @@ In addition to the default report context variables, the following context varia | build.status | The status of the build. 20 means 'Production' | | build.bom_items | A query set with all bom items for the build | -bom_items that can be looped using - -```html -{%for line in build.bom_items %} -some code -{% endfor %} -``` - -Each bom_item line has further context variables. +bom_items that can be looped. Each bom_item line has further context variables. | Variable | Description | | --- | --- | From f5ec802a767b371a46b8a394539bb1a1a47ef477 Mon Sep 17 00:00:00 2001 From: Michael Date: Wed, 20 Apr 2022 18:08:26 +0200 Subject: [PATCH 10/10] Update build.md --- docs/report/build.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/report/build.md b/docs/report/build.md index f888a67..b642b53 100644 --- a/docs/report/build.md +++ b/docs/report/build.md @@ -37,6 +37,7 @@ bom_items that can be looped. Each bom_item line has further context variables. A very simple example wihtout any html formatting: +{% raw %} ```html reference: {{reference }}
@@ -103,3 +104,4 @@ sub_part.name: L7805 sub_part.build_order_allocations: ]> ........ ``` +{% endraw %}