From 7b9c618658c60de0f9fc580703d658311aa298a0 Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 2 Nov 2023 07:40:40 +0100 Subject: [PATCH] Addec context variables for contacts to docs (#5834) * Corrected report mixin example * Remove unused file * Added context variables for company and address * Repair link in file * Repair link in file * Repair link in file * Removed blank * Added context variables for contacts to docs * Typo in link * Update .pre-commit-config.yaml Revert version * Delete InvenTree/order/migrations/0099_auto_20231101_1747.py * Delete InvenTree/part/migrations/0119_auto_20231101_1747.py --------- Co-authored-by: Oliver --- InvenTree/company/.models.py.swp | Bin 16384 -> 0 bytes docs/docs/report/context_variables.md | 13 +++++++++++++ docs/docs/report/purchase_order.md | 1 + 3 files changed, 14 insertions(+) delete mode 100644 InvenTree/company/.models.py.swp diff --git a/InvenTree/company/.models.py.swp b/InvenTree/company/.models.py.swp deleted file mode 100644 index 3108f0257b9bc0271005898a3bae9012f07c1252..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmeHNTZ|k>6)ghc;b4f8ACLf57QxIqechujpgux zKw@ z-(151--1iNC zgmS<`bMlwxB@uY381KmUO5AoTN+mv4Ic7w6g{D6Y}7rcDr z+y8t{{!cF-czNfw?nh|v|B^R*`B&!T{&e%zFwij2Fwij2Fwij2Fwij2Fwij2Fwij2 zFz`RgfO)>Z0MA}FH@bNKAMXFJy_Jw>fnNeY0KN=-2~fac;11xgZz1F-z{i0Hf%gLh zxUrXz-vK`c9tR!+G;k4E0TzKfffsNy{T%QM;H$tX;CA4tI|%tK@EPFKz%S@(l1a@KfMhz}JCCfQNyP0Ed8mz}tbh0nfjQkiP+c0DcYp3iuxIUEn*w5Lf~t z;JG&v@_XP(U<6#pyAUq{F9Lr8o&vrG2;jZIZNP6|PslfcZQum37r1&mA)f*Aa3J_!%$)J_;NH4g&W8dw{1=Uw8ue2G9ob_1?Fqyxn4@*zXzKp9!T~6Ymxl7S1?rL-We%HHvwo zOsOIfO!Jg(2|cn?5Ztshp_%P1a@`)7z*4;nEz4Plw)mKdtaY(N&52&C zvJGr##8woSOvtHWC$%jF4=xbf4L%B)aw+nmIT?&ke8H&Kxn@ZQeh_B^k#j{6w34~t zp@j`v71(i#rb*Y45Co>Xq>_^7$#$IJJ*F<*D0w0DYX>nG1|jd({Y_=GE3%{la9^K8MOeh^YmNWLCHYWx5K%GTRNN&-GL?sS(`>c$iT|mexK7 zgR>0>vKa5yw5((@Vv750wWh6m*0tIYe8xb1oSPBMUQD#@6pC?Q#KgHj@P1p zi6f-y`3FC_$ssNj{bd>vmpXiqx9dgqq`6Yo#TAivsL3lS)6D<%%h$SjD-vngb?sMz z0%NoH8n%pf36VX6m9Y*Ly3i(F2(d*)c{Rdo@MW?kmDJrCT zBc>mu%ia;=yfGg}+OV#(X3ozVqe#`L?|hY$&asJ9FmP$ic0tN(`}z*A~k{Y0PuRHL{%jqu6D> zd)v^%hdXqm8h3VVH0N3cbw2~sR3wGuQ$Z9o*F}EbY{c;4!fVE&ZN#r6+-(~}Bd?5r zI3{H=J8V{#^+?U{Fd^=82p0U+;XA`VUJIlkPbb3M{wMx_0VBv+tKt3$ON!01c9d?L zD@-y|kx8)T{{IWO7yk`l?*DQ7ZI2tczrPAR4m<{Y9(WJ%N8I0k8#oE91MdJ#+iRwM zb2JPz3^WWh3^WWh3^WWh3^WWh3^WWh4E(nln63kbniFbXKow>Z@?jp44G%Q6)k>ccm;>k_7ekqyB!h zy=cvtit)U*fT`^Hy1$(mF!&C~@iZhgwkv)lh<#{LbZJ_Dx! diff --git a/docs/docs/report/context_variables.md b/docs/docs/report/context_variables.md index 610f8e4cda..0765d68036 100644 --- a/docs/docs/report/context_variables.md +++ b/docs/docs/report/context_variables.md @@ -191,6 +191,19 @@ Each part object has access to a lot of context variables about the part. The fo | postal_city | City name | | country | Country name | +#### Contact + +Contacts are added to companies. Actually the company has no link to the contacts. +You can search the company object of the contact. + +| Variable | Description | +|----------|-------------| +| company | Company object where the contact belongs to | +| name | First and second name of the contact | +| phone | Phone number | +| email | Email address | +| role | Role of the contact | + #### SupplierPart | Variable | Description | diff --git a/docs/docs/report/purchase_order.md b/docs/docs/report/purchase_order.md index c8d0f773b3..331290b708 100644 --- a/docs/docs/report/purchase_order.md +++ b/docs/docs/report/purchase_order.md @@ -28,6 +28,7 @@ In addition to the default report context variables, the following variables are | order.target_date | The date when the order should arrive | | order.if_overdue | Boolean value that tells if the target date has passed | | order.currency | The currency code associated with this order, e.g. 'AUD' | +| order.contact | The [contact](./context_variables.md#contact) object associated with this order | #### Lines