Compare commits

..

333 Commits
0.5.0 ... 0.5.1

Author SHA1 Message Date
Oliver
f948290b21 Merge pull request #2091 from inventree/0.5.1
0.5.1
2021-10-11 21:20:15 +11:00
Oliver
e44446793d Merge remote-tracking branch 'inventree/l10_crowdin' into 0.5.1
# Conflicts:
#	InvenTree/locale/de/LC_MESSAGES/django.po
#	InvenTree/locale/el/LC_MESSAGES/django.po
#	InvenTree/locale/es/LC_MESSAGES/django.po
#	InvenTree/locale/fr/LC_MESSAGES/django.po
#	InvenTree/locale/he/LC_MESSAGES/django.po
#	InvenTree/locale/id/LC_MESSAGES/django.po
#	InvenTree/locale/it/LC_MESSAGES/django.po
#	InvenTree/locale/ja/LC_MESSAGES/django.po
#	InvenTree/locale/ko/LC_MESSAGES/django.po
#	InvenTree/locale/nl/LC_MESSAGES/django.po
#	InvenTree/locale/no/LC_MESSAGES/django.po
#	InvenTree/locale/pl/LC_MESSAGES/django.po
#	InvenTree/locale/ru/LC_MESSAGES/django.po
#	InvenTree/locale/sv/LC_MESSAGES/django.po
#	InvenTree/locale/th/LC_MESSAGES/django.po
#	InvenTree/locale/tr/LC_MESSAGES/django.po
#	InvenTree/locale/vi/LC_MESSAGES/django.po
#	InvenTree/locale/zh/LC_MESSAGES/django.po
2021-10-11 21:02:06 +11:00
Oliver
cfde81d09f Merge remote-tracking branch 'inventree/l10' into 0.5.1
# Conflicts:
#	InvenTree/locale/de/LC_MESSAGES/django.po
#	InvenTree/locale/el/LC_MESSAGES/django.po
#	InvenTree/locale/es/LC_MESSAGES/django.po
#	InvenTree/locale/fr/LC_MESSAGES/django.po
#	InvenTree/locale/he/LC_MESSAGES/django.po
#	InvenTree/locale/id/LC_MESSAGES/django.po
#	InvenTree/locale/it/LC_MESSAGES/django.po
#	InvenTree/locale/ja/LC_MESSAGES/django.po
#	InvenTree/locale/ko/LC_MESSAGES/django.po
#	InvenTree/locale/nl/LC_MESSAGES/django.po
#	InvenTree/locale/no/LC_MESSAGES/django.po
#	InvenTree/locale/pl/LC_MESSAGES/django.po
#	InvenTree/locale/ru/LC_MESSAGES/django.po
#	InvenTree/locale/sv/LC_MESSAGES/django.po
#	InvenTree/locale/th/LC_MESSAGES/django.po
#	InvenTree/locale/tr/LC_MESSAGES/django.po
#	InvenTree/locale/vi/LC_MESSAGES/django.po
#	InvenTree/locale/zh/LC_MESSAGES/django.po
2021-10-11 21:00:08 +11:00
Oliver
4628bb8f08 Simplify version numbering scheme 2021-10-11 18:56:38 +11:00
github-actions[bot]
dc17e3998a updated translation base 2021-10-11 07:56:21 +00:00
Oliver
62ce278fb7 Fix: New translations django.po from Crowdin 2021-10-11 17:29:16 +11:00
Oliver
c125cc4b29 Fix: New translations django.po from Crowdin 2021-10-11 17:29:15 +11:00
Oliver
e9350ca0e4 Fix: New translations django.po from Crowdin 2021-10-11 17:29:13 +11:00
Oliver
004bb35245 Fix: New translations django.po from Crowdin 2021-10-11 17:29:12 +11:00
Oliver
b1f51afac1 Fix: New translations django.po from Crowdin 2021-10-11 17:29:11 +11:00
Oliver
f0d2a32990 Fix: New translations django.po from Crowdin 2021-10-11 17:29:09 +11:00
Oliver
fe06542498 Fix: New translations django.po from Crowdin 2021-10-11 17:29:08 +11:00
Oliver
20874ca68a Fix: New translations django.po from Crowdin 2021-10-11 17:29:07 +11:00
Oliver
e1b0dc3669 Fix: New translations django.po from Crowdin 2021-10-11 17:29:05 +11:00
Oliver
b56c0e3a56 Fix: New translations django.po from Crowdin 2021-10-11 17:29:04 +11:00
Oliver
181091ce2d Fix: New translations django.po from Crowdin 2021-10-11 17:29:02 +11:00
Oliver
51e822a1f5 Fix: New translations django.po from Crowdin 2021-10-11 17:29:01 +11:00
Oliver
b334b85363 Fix: New translations django.po from Crowdin 2021-10-11 17:28:59 +11:00
Oliver
f722c765b3 Fix: New translations django.po from Crowdin 2021-10-11 17:28:58 +11:00
Oliver
ce550cfcd0 Fix: New translations django.po from Crowdin 2021-10-11 17:28:57 +11:00
Oliver
0299dda74c Fix: New translations django.po from Crowdin 2021-10-11 17:28:55 +11:00
Oliver
4a701a7a3a Fix: New translations django.po from Crowdin 2021-10-11 17:28:54 +11:00
Oliver
76b0ed3243 Fix: New translations django.po from Crowdin 2021-10-11 17:28:53 +11:00
github-actions[bot]
5e8e900b04 updated translation base 2021-10-11 06:22:12 +00:00
Oliver
d874dc29b1 Fix: New translations django.po from Crowdin 2021-10-11 12:03:48 +11:00
Oliver
20ab5c7cf0 Fix: New translations django.po from Crowdin 2021-10-11 12:03:47 +11:00
Oliver
5d619cbd0e Fix: New translations django.po from Crowdin 2021-10-11 12:03:46 +11:00
Oliver
2755ae1b4c Fix: New translations django.po from Crowdin 2021-10-11 12:03:44 +11:00
Oliver
581a3ffb2a Fix: New translations django.po from Crowdin 2021-10-11 12:03:43 +11:00
Oliver
50a1fa42de Fix: New translations django.po from Crowdin 2021-10-11 12:03:42 +11:00
Oliver
681452db3d Fix: New translations django.po from Crowdin 2021-10-11 12:03:40 +11:00
Oliver
f7d66875c4 Fix: New translations django.po from Crowdin 2021-10-11 12:03:39 +11:00
Oliver
9952ff1eae Fix: New translations django.po from Crowdin 2021-10-11 12:03:38 +11:00
Oliver
7b417460e6 Fix: New translations django.po from Crowdin 2021-10-11 12:03:37 +11:00
Oliver
fb943638c0 Fix: New translations django.po from Crowdin 2021-10-11 12:03:35 +11:00
Oliver
1adf77be86 Fix: New translations django.po from Crowdin 2021-10-11 12:03:34 +11:00
Oliver
1235e3e149 Fix: New translations django.po from Crowdin 2021-10-11 12:03:33 +11:00
Oliver
af576d5e90 Fix: New translations django.po from Crowdin 2021-10-11 12:03:32 +11:00
Oliver
629dad5e07 Fix: New translations django.po from Crowdin 2021-10-11 12:03:30 +11:00
Oliver
710e0e2c3b Fix: New translations django.po from Crowdin 2021-10-11 12:03:29 +11:00
Oliver
32f13c6bef Fix: New translations django.po from Crowdin 2021-10-11 12:03:28 +11:00
Oliver
2da8c81537 Fix: New translations django.po from Crowdin 2021-10-11 12:03:26 +11:00
github-actions[bot]
94c25c93d6 updated translation base 2021-10-11 01:01:51 +00:00
github-actions[bot]
9e41eb23ac updated translation base 2021-10-11 00:43:52 +00:00
github-actions[bot]
99352f8f84 updated translation base 2021-10-11 00:25:33 +00:00
Oliver
bfb162c688 Merge pull request #2130 from SchrodingersGat/links-fix
Fix various documentation links

(cherry picked from commit 49601d2b7e)
2021-10-11 11:24:16 +11:00
github-actions[bot]
12d3646da1 updated translation base 2021-10-11 00:00:43 +00:00
github-actions[bot]
a21e4560f1 updated translation base 2021-10-10 23:55:19 +00:00
Oliver
66c037b9f8 0.5 -> 0.5.1 2021-10-11 10:43:36 +11:00
Oliver
66d4b14ba4 Fix conflicts 2021-10-11 10:42:23 +11:00
github-actions[bot]
1c912088a2 updated translation base 2021-10-10 23:41:54 +00:00
Oliver
b6d966b3fd Fix: New translations django.po from Crowdin 2021-10-08 13:15:41 +11:00
Oliver
b60feea8cf Fix: New translations django.po from Crowdin 2021-10-08 13:15:40 +11:00
Oliver
c62042c836 Fix: New translations django.po from Crowdin 2021-10-08 13:15:38 +11:00
Oliver
6254182059 Fix: New translations django.po from Crowdin 2021-10-08 13:15:37 +11:00
Oliver
b234b18324 Fix: New translations django.po from Crowdin 2021-10-08 13:15:36 +11:00
Oliver
49162331d5 Fix: New translations django.po from Crowdin 2021-10-08 13:15:34 +11:00
Oliver
2aa0897a6f Fix: New translations django.po from Crowdin 2021-10-08 13:15:33 +11:00
Oliver
10abaae43d Fix: New translations django.po from Crowdin 2021-10-08 13:15:32 +11:00
Oliver
a18be6328f Fix: New translations django.po from Crowdin 2021-10-08 13:15:30 +11:00
Oliver
0db184fab6 Fix: New translations django.po from Crowdin 2021-10-08 13:15:29 +11:00
Oliver
533d16d3e1 Fix: New translations django.po from Crowdin 2021-10-08 13:15:27 +11:00
Oliver
8237e1a327 Fix: New translations django.po from Crowdin 2021-10-08 13:15:26 +11:00
Oliver
9c0b629cea Fix: New translations django.po from Crowdin 2021-10-08 13:15:24 +11:00
Oliver
6733c1e1ff Fix: New translations django.po from Crowdin 2021-10-08 13:15:23 +11:00
Oliver
ac48e36070 Fix: New translations django.po from Crowdin 2021-10-08 13:15:22 +11:00
Oliver
5755b615cb Fix: New translations django.po from Crowdin 2021-10-08 13:15:20 +11:00
Oliver
5e818f7bd8 Fix: New translations django.po from Crowdin 2021-10-08 13:15:19 +11:00
Oliver
71443bd003 Fix: New translations django.po from Crowdin 2021-10-08 13:15:17 +11:00
github-actions[bot]
793fe39fe7 updated translation base 2021-10-08 02:10:20 +00:00
Oliver
b0098d3ddc Fix: New translations django.po from Crowdin 2021-10-08 04:48:11 +11:00
Oliver
2b73e7b9ac Fix: New translations django.po from Crowdin 2021-10-08 03:43:05 +11:00
github-actions[bot]
a6f5a8107a updated translation base 2021-10-07 11:45:06 +00:00
Oliver
4c653f1ba1 Fix: New translations django.po from Crowdin 2021-10-07 14:02:14 +11:00
Oliver
60f6e58f55 Fix: New translations django.po from Crowdin 2021-10-07 14:02:13 +11:00
Oliver
ef3070075f Fix: New translations django.po from Crowdin 2021-10-07 14:02:11 +11:00
Oliver
358c41ba1a Fix: New translations django.po from Crowdin 2021-10-07 14:02:10 +11:00
Oliver
64b7e05aa9 Fix: New translations django.po from Crowdin 2021-10-07 14:02:09 +11:00
Oliver
682cc6474e Fix: New translations django.po from Crowdin 2021-10-07 14:02:07 +11:00
Oliver
6ff5a515f8 Fix: New translations django.po from Crowdin 2021-10-07 14:02:06 +11:00
Oliver
dd210d358e Fix: New translations django.po from Crowdin 2021-10-07 14:02:03 +11:00
Oliver
48495baeb4 Fix: New translations django.po from Crowdin 2021-10-07 14:02:02 +11:00
Oliver
f31aab99fa Fix: New translations django.po from Crowdin 2021-10-07 14:02:00 +11:00
Oliver
6349237608 Fix: New translations django.po from Crowdin 2021-10-07 14:01:59 +11:00
Oliver
4f25763d89 Fix: New translations django.po from Crowdin 2021-10-07 14:01:57 +11:00
Oliver
5e13712eca Fix: New translations django.po from Crowdin 2021-10-07 14:01:55 +11:00
Oliver
f55c241e94 Fix: New translations django.po from Crowdin 2021-10-07 14:01:54 +11:00
Oliver
3eefaa41ce Fix: New translations django.po from Crowdin 2021-10-07 14:01:52 +11:00
Oliver
72a4ba217e Fix: New translations django.po from Crowdin 2021-10-07 14:01:50 +11:00
Oliver
000ee58d37 Fix: New translations django.po from Crowdin 2021-10-07 14:01:48 +11:00
Oliver
f48a2c21d1 Fix: New translations django.po from Crowdin 2021-10-07 14:01:47 +11:00
github-actions[bot]
d3cdb34151 updated translation base 2021-10-07 02:55:56 +00:00
Oliver
fece2c8c94 Fix: New translations django.po from Crowdin 2021-10-07 12:23:11 +11:00
Oliver
59afb2b236 Fix: New translations django.po from Crowdin 2021-10-07 12:23:10 +11:00
Oliver
725644fc21 Fix: New translations django.po from Crowdin 2021-10-07 12:23:08 +11:00
Oliver
644574af8b Fix: New translations django.po from Crowdin 2021-10-07 12:23:06 +11:00
Oliver
d62576cb19 Fix: New translations django.po from Crowdin 2021-10-07 12:23:04 +11:00
Oliver
98e5c4889b Fix: New translations django.po from Crowdin 2021-10-07 12:23:03 +11:00
Oliver
24c92f07d1 Fix: New translations django.po from Crowdin 2021-10-07 12:23:02 +11:00
Oliver
951d05ae30 Fix: New translations django.po from Crowdin 2021-10-07 12:23:00 +11:00
Oliver
41b363916a Fix: New translations django.po from Crowdin 2021-10-07 12:22:58 +11:00
Oliver
c4edb35ca9 Fix: New translations django.po from Crowdin 2021-10-07 12:22:56 +11:00
Oliver
13646f4885 Fix: New translations django.po from Crowdin 2021-10-07 12:22:55 +11:00
Oliver
0b73d3e2a9 Fix: New translations django.po from Crowdin 2021-10-07 12:22:54 +11:00
Oliver
0af0055535 Fix: New translations django.po from Crowdin 2021-10-07 12:22:52 +11:00
Oliver
9cc993a2c3 Fix: New translations django.po from Crowdin 2021-10-07 12:22:51 +11:00
Oliver
f54a0e16a2 Fix: New translations django.po from Crowdin 2021-10-07 12:22:50 +11:00
Oliver
dc8cc3ca78 Fix: New translations django.po from Crowdin 2021-10-07 12:22:49 +11:00
Oliver
aa0bf05cd1 Fix: New translations django.po from Crowdin 2021-10-07 12:22:47 +11:00
Oliver
eef6e39ed1 Fix: New translations django.po from Crowdin 2021-10-07 12:22:46 +11:00
github-actions[bot]
638b478d1f updated translation base 2021-10-07 01:16:12 +00:00
Oliver
4efa8a5d3b Merge pull request #2118 from SchrodingersGat/bom-export-fix
Fix error on BOM export

(cherry picked from commit a69bcb9f18)
2021-10-07 12:15:11 +11:00
Oliver
5a8cf990a2 Fix: New translations django.po from Crowdin 2021-10-07 11:24:38 +11:00
Oliver
8c28dd2513 Fix: New translations django.po from Crowdin 2021-10-07 11:24:37 +11:00
Oliver
4961e90783 Fix: New translations django.po from Crowdin 2021-10-07 11:24:35 +11:00
Oliver
8a407b4f76 Fix: New translations django.po from Crowdin 2021-10-07 11:24:34 +11:00
Oliver
3cc3e0deb9 Fix: New translations django.po from Crowdin 2021-10-07 11:24:33 +11:00
Oliver
9bbda5129f Fix: New translations django.po from Crowdin 2021-10-07 11:24:30 +11:00
Oliver
2b68e19113 Fix: New translations django.po from Crowdin 2021-10-07 11:24:28 +11:00
Oliver
c071d5705d Fix: New translations django.po from Crowdin 2021-10-07 11:24:27 +11:00
Oliver
54723fac28 Fix: New translations django.po from Crowdin 2021-10-07 11:24:26 +11:00
Oliver
3b80737cab Fix: New translations django.po from Crowdin 2021-10-07 11:24:23 +11:00
Oliver
b49355a639 Fix: New translations django.po from Crowdin 2021-10-07 11:24:22 +11:00
Oliver
8e1d852958 Fix: New translations django.po from Crowdin 2021-10-07 11:24:20 +11:00
Oliver
256b09b9ab Fix: New translations django.po from Crowdin 2021-10-07 11:24:19 +11:00
Oliver
6afd184dd0 Fix: New translations django.po from Crowdin 2021-10-07 11:24:17 +11:00
Oliver
3294d259b5 Fix: New translations django.po from Crowdin 2021-10-07 11:24:16 +11:00
Oliver
63e11be783 Fix: New translations django.po from Crowdin 2021-10-07 11:24:15 +11:00
Oliver
42d1481d98 Fix: New translations django.po from Crowdin 2021-10-07 11:24:13 +11:00
Oliver
80b328c6f3 Fix: New translations django.po from Crowdin 2021-10-07 11:24:12 +11:00
github-actions[bot]
1273d93c8c updated translation base 2021-10-07 00:01:36 +00:00
Oliver
55fd2da123 Fix: New translations django.po from Crowdin 2021-10-06 22:47:57 +11:00
Oliver
589476f96e Fix: New translations django.po from Crowdin 2021-10-06 22:47:56 +11:00
Oliver
b5b3cb47e1 Fix: New translations django.po from Crowdin 2021-10-06 22:47:55 +11:00
Oliver
7ad1b9f8f1 Fix: New translations django.po from Crowdin 2021-10-06 22:47:53 +11:00
Oliver
e5474504b8 Fix: New translations django.po from Crowdin 2021-10-06 22:47:52 +11:00
Oliver
6d6e62c329 Fix: New translations django.po from Crowdin 2021-10-06 22:47:51 +11:00
Oliver
65ff7d7530 Fix: New translations django.po from Crowdin 2021-10-06 22:47:49 +11:00
Oliver
82066bc24e Fix: New translations django.po from Crowdin 2021-10-06 22:47:48 +11:00
Oliver
3587eda9f2 Fix: New translations django.po from Crowdin 2021-10-06 22:47:46 +11:00
Oliver
bd178ddf6b Fix: New translations django.po from Crowdin 2021-10-06 22:47:45 +11:00
Oliver
02960444e4 Fix: New translations django.po from Crowdin 2021-10-06 22:47:44 +11:00
Oliver
53af1b6b08 Fix: New translations django.po from Crowdin 2021-10-06 22:47:41 +11:00
Oliver
b68003a6c7 Fix: New translations django.po from Crowdin 2021-10-06 22:47:40 +11:00
Oliver
355cb39e18 Fix: New translations django.po from Crowdin 2021-10-06 22:47:39 +11:00
Oliver
f025dbef51 Fix: New translations django.po from Crowdin 2021-10-06 22:47:37 +11:00
Oliver
1c1f736401 Fix: New translations django.po from Crowdin 2021-10-06 22:47:36 +11:00
Oliver
f6a827462f Fix: New translations django.po from Crowdin 2021-10-06 22:47:35 +11:00
Oliver
22384ac27d Fix: New translations django.po from Crowdin 2021-10-06 22:47:33 +11:00
github-actions[bot]
db59f99f2d updated translation base 2021-10-06 11:41:52 +00:00
github-actions[bot]
7df5215404 updated translation base 2021-10-06 10:38:04 +00:00
Oliver
a19203d17d Fix: New translations django.po from Crowdin 2021-10-06 21:23:44 +11:00
Oliver
3192eea68f Fix: New translations django.po from Crowdin 2021-10-06 21:23:43 +11:00
Oliver
7e3192896e Fix: New translations django.po from Crowdin 2021-10-06 21:23:41 +11:00
Oliver
c5e67004bf Fix: New translations django.po from Crowdin 2021-10-06 21:23:40 +11:00
Oliver
9ed842b8d7 Fix: New translations django.po from Crowdin 2021-10-06 21:23:38 +11:00
Oliver
ffed4b4818 Fix: New translations django.po from Crowdin 2021-10-06 21:23:37 +11:00
Oliver
d698359417 Fix: New translations django.po from Crowdin 2021-10-06 21:23:34 +11:00
Oliver
eaf0156d20 Fix: New translations django.po from Crowdin 2021-10-06 21:23:33 +11:00
Oliver
a174106189 Fix: New translations django.po from Crowdin 2021-10-06 21:23:32 +11:00
Oliver
7e6653d964 Fix: New translations django.po from Crowdin 2021-10-06 21:23:30 +11:00
Oliver
9f1ce90b68 Fix: New translations django.po from Crowdin 2021-10-06 21:23:29 +11:00
Oliver
1be55ef078 Fix: New translations django.po from Crowdin 2021-10-06 21:23:28 +11:00
Oliver
32ee020d63 Fix: New translations django.po from Crowdin 2021-10-06 21:23:26 +11:00
Oliver
4a218c030e Fix: New translations django.po from Crowdin 2021-10-06 21:23:25 +11:00
Oliver
722e2d2716 Fix: New translations django.po from Crowdin 2021-10-06 21:23:24 +11:00
Oliver
400279e721 Fix: New translations django.po from Crowdin 2021-10-06 21:23:22 +11:00
Oliver
c6034030d6 Fix: New translations django.po from Crowdin 2021-10-06 21:23:21 +11:00
Oliver
4a5871c6fb Fix: New translations django.po from Crowdin 2021-10-06 21:23:20 +11:00
github-actions[bot]
6e47a1feb6 updated translation base 2021-10-06 10:05:12 +00:00
github-actions[bot]
88464ad640 updated translation base 2021-10-06 09:54:20 +00:00
github-actions[bot]
32556d660e updated translation base 2021-10-06 09:53:08 +00:00
Oliver
ca0caa3d2b Merge pull request #2112 from SchrodingersGat/docs-link-fix
Fix docs link for release versions

(cherry picked from commit c2d33588d0)
2021-10-06 20:53:06 +11:00
Oliver
c312d95277 Fix: New translations django.po from Crowdin 2021-10-06 17:36:53 +11:00
Oliver
11a75cf5b8 Fix: New translations django.po from Crowdin 2021-10-06 17:36:52 +11:00
Oliver
6b1d44a61c Fix: New translations django.po from Crowdin 2021-10-06 17:36:51 +11:00
Oliver
5eca5be363 Fix: New translations django.po from Crowdin 2021-10-06 17:36:49 +11:00
Oliver
d47c14eef8 Fix: New translations django.po from Crowdin 2021-10-06 17:36:48 +11:00
Oliver
f8b9c0ea90 Fix: New translations django.po from Crowdin 2021-10-06 17:36:47 +11:00
Oliver
8a4404bd1b Fix: New translations django.po from Crowdin 2021-10-06 17:36:45 +11:00
Oliver
67f261820b Fix: New translations django.po from Crowdin 2021-10-06 17:36:44 +11:00
Oliver
e5ea5de7cb Fix: New translations django.po from Crowdin 2021-10-06 17:36:42 +11:00
Oliver
fd1f5c454b Fix: New translations django.po from Crowdin 2021-10-06 17:36:41 +11:00
Oliver
ea2d773311 Fix: New translations django.po from Crowdin 2021-10-06 17:36:40 +11:00
Oliver
27bb33a6c8 Fix: New translations django.po from Crowdin 2021-10-06 17:36:39 +11:00
Oliver
f4e50d2502 Fix: New translations django.po from Crowdin 2021-10-06 17:36:36 +11:00
Oliver
b5d2ad24cf Fix: New translations django.po from Crowdin 2021-10-06 17:36:35 +11:00
Oliver
48d9cd794c Fix: New translations django.po from Crowdin 2021-10-06 17:36:34 +11:00
Oliver
dbe181a21c Fix: New translations django.po from Crowdin 2021-10-06 17:36:32 +11:00
Oliver
c698bac9b6 Fix: New translations django.po from Crowdin 2021-10-06 17:36:31 +11:00
Oliver
00a38c22d1 Fix: New translations django.po from Crowdin 2021-10-06 17:36:30 +11:00
Oliver
f6bcee06cb Merge pull request #2108 from SchrodingersGat/sales-order-table-fixes
Bug fixes for SalesOrderLineItem table

(cherry picked from commit 6706d6c768)
2021-10-06 17:27:47 +11:00
github-actions[bot]
08394574ce updated translation base 2021-10-06 06:23:34 +00:00
Oliver
bf32343399 Fix: New translations django.po from Crowdin 2021-10-06 10:02:08 +11:00
Oliver
0e5a6f4ef3 Fix: New translations django.po from Crowdin 2021-10-06 10:02:06 +11:00
Oliver
832855c9d7 Fix: New translations django.po from Crowdin 2021-10-06 10:02:05 +11:00
Oliver
5252b0759b Fix: New translations django.po from Crowdin 2021-10-06 10:02:04 +11:00
Oliver
b5724787b1 Fix: New translations django.po from Crowdin 2021-10-06 10:02:02 +11:00
Oliver
3d7c60b4a4 Fix: New translations django.po from Crowdin 2021-10-06 10:02:01 +11:00
Oliver
fcd9dfa692 Fix: New translations django.po from Crowdin 2021-10-06 10:01:59 +11:00
Oliver
1b694fb0a3 Fix: New translations django.po from Crowdin 2021-10-06 10:01:58 +11:00
Oliver
b6a3803819 Fix: New translations django.po from Crowdin 2021-10-06 10:01:56 +11:00
Oliver
f449f92b32 Fix: New translations django.po from Crowdin 2021-10-06 10:01:55 +11:00
Oliver
65767255b3 Fix: New translations django.po from Crowdin 2021-10-06 10:01:54 +11:00
Oliver
f2a4feedbb Fix: New translations django.po from Crowdin 2021-10-06 10:01:52 +11:00
Oliver
85cf838e91 Fix: New translations django.po from Crowdin 2021-10-06 10:01:51 +11:00
Oliver
7b17cd20f6 Fix: New translations django.po from Crowdin 2021-10-06 10:01:50 +11:00
Oliver
51e6fb670c Fix: New translations django.po from Crowdin 2021-10-06 10:01:49 +11:00
Oliver
3a9955d1e9 Fix: New translations django.po from Crowdin 2021-10-06 10:01:47 +11:00
Oliver
4b485c4bce Fix: New translations django.po from Crowdin 2021-10-06 10:01:46 +11:00
Oliver
8334072438 Fix: New translations django.po from Crowdin 2021-10-06 10:01:45 +11:00
github-actions[bot]
4a74294123 updated translation base 2021-10-05 22:53:58 +00:00
Oliver
ef11985a59 Fix: New translations django.po from Crowdin 2021-10-05 19:20:18 +11:00
Oliver
a868ef7f1b Fix: New translations django.po from Crowdin 2021-10-05 18:10:16 +11:00
Oliver
b9144c9713 Fix: New translations django.po from Crowdin 2021-10-05 18:10:15 +11:00
Oliver
e338dafe4b Fix: New translations django.po from Crowdin 2021-10-05 18:10:14 +11:00
Oliver
ca10db8af0 Fix: New translations django.po from Crowdin 2021-10-05 18:10:12 +11:00
Oliver
a31f3ec1e4 Fix: New translations django.po from Crowdin 2021-10-05 18:10:11 +11:00
Oliver
f31b7902ca Fix: New translations django.po from Crowdin 2021-10-05 18:10:09 +11:00
Oliver
b633c1f79e Fix: New translations django.po from Crowdin 2021-10-05 18:10:08 +11:00
Oliver
2c226816ba Fix: New translations django.po from Crowdin 2021-10-05 18:10:07 +11:00
Oliver
3d52f2f6c1 Fix: New translations django.po from Crowdin 2021-10-05 18:10:05 +11:00
Oliver
a659583947 Fix: New translations django.po from Crowdin 2021-10-05 18:10:03 +11:00
Oliver
d9dff44a61 Fix: New translations django.po from Crowdin 2021-10-05 18:10:01 +11:00
Oliver
758698b666 Fix: New translations django.po from Crowdin 2021-10-05 18:09:59 +11:00
Oliver
a1f3c9876d Fix: New translations django.po from Crowdin 2021-10-05 18:09:58 +11:00
Oliver
a50029fdbe Fix: New translations django.po from Crowdin 2021-10-05 18:09:56 +11:00
Oliver
4906884578 Fix: New translations django.po from Crowdin 2021-10-05 18:09:55 +11:00
Oliver
135f945b35 Fix: New translations django.po from Crowdin 2021-10-05 18:09:54 +11:00
Oliver
eea7bcd42d Fix: New translations django.po from Crowdin 2021-10-05 18:09:52 +11:00
Oliver
0988953b74 Fix: New translations django.po from Crowdin 2021-10-05 18:09:51 +11:00
github-actions[bot]
e84cad1660 updated translation base 2021-10-05 07:03:31 +00:00
Oliver
5eef78abcf Fix: New translations django.po from Crowdin 2021-10-05 13:43:13 +11:00
Oliver
9de09b8ede Fix: New translations django.po from Crowdin 2021-10-05 13:43:12 +11:00
Oliver
bacccf9240 Fix: New translations django.po from Crowdin 2021-10-05 13:43:11 +11:00
Oliver
ebb2f0a771 Fix: New translations django.po from Crowdin 2021-10-05 13:43:09 +11:00
Oliver
056ce5646b Fix: New translations django.po from Crowdin 2021-10-05 13:43:08 +11:00
Oliver
b41518a86f Fix: New translations django.po from Crowdin 2021-10-05 13:43:06 +11:00
Oliver
4b081ea7f3 Fix: New translations django.po from Crowdin 2021-10-05 13:43:05 +11:00
Oliver
72372896a5 Fix: New translations django.po from Crowdin 2021-10-05 13:43:04 +11:00
Oliver
7e2d484988 Fix: New translations django.po from Crowdin 2021-10-05 13:43:02 +11:00
Oliver
dd46accdc0 Fix: New translations django.po from Crowdin 2021-10-05 13:43:01 +11:00
Oliver
104d6f96a3 Fix: New translations django.po from Crowdin 2021-10-05 13:42:59 +11:00
Oliver
28561597a0 Fix: New translations django.po from Crowdin 2021-10-05 13:42:58 +11:00
Oliver
af45be0713 Fix: New translations django.po from Crowdin 2021-10-05 13:42:56 +11:00
Oliver
eea9f816d2 Fix: New translations django.po from Crowdin 2021-10-05 13:42:55 +11:00
Oliver
3ce0433338 Fix: New translations django.po from Crowdin 2021-10-05 13:42:54 +11:00
Oliver
cadd922313 Fix: New translations django.po from Crowdin 2021-10-05 13:42:52 +11:00
Oliver
6a6bcb2451 Fix: New translations django.po from Crowdin 2021-10-05 13:42:51 +11:00
Oliver
7bf53989d1 Fix: New translations django.po from Crowdin 2021-10-05 13:42:50 +11:00
github-actions[bot]
86c8d86b67 updated translation base 2021-10-05 02:21:40 +00:00
github-actions[bot]
c567b7a84c updated translation base 2021-10-05 01:54:15 +00:00
Oliver
1132b6c51a Fixes for build output tables
- Only show "completed" builds in the "completed builds" table (should be obvious)
- Display "serial number" appropriately in build output allocation table

(cherry picked from commit a3ba33cae8)
2021-10-05 12:53:17 +11:00
Oliver
b47c4075f8 Fix: New translations django.po from Crowdin 2021-10-05 12:41:34 +11:00
Oliver
27f4a2ca43 Fix: New translations django.po from Crowdin 2021-10-05 12:41:32 +11:00
Oliver
05b85533f6 Fix: New translations django.po from Crowdin 2021-10-05 12:41:31 +11:00
Oliver
f1b5aa16ff Fix: New translations django.po from Crowdin 2021-10-05 12:41:29 +11:00
Oliver
5d05d728be Fix: New translations django.po from Crowdin 2021-10-05 12:41:28 +11:00
Oliver
0c487488ff Fix: New translations django.po from Crowdin 2021-10-05 12:41:27 +11:00
Oliver
69815e6cc4 Fix: New translations django.po from Crowdin 2021-10-05 12:41:25 +11:00
Oliver
7600dbe720 Fix: New translations django.po from Crowdin 2021-10-05 12:41:24 +11:00
Oliver
a95d998056 Fix: New translations django.po from Crowdin 2021-10-05 12:41:23 +11:00
Oliver
9f51d9d4f9 Fix: New translations django.po from Crowdin 2021-10-05 12:41:22 +11:00
Oliver
50988f3c3c Fix: New translations django.po from Crowdin 2021-10-05 12:41:20 +11:00
Oliver
a5ce9b19b1 Fix: New translations django.po from Crowdin 2021-10-05 12:41:19 +11:00
Oliver
ecfde295de Fix: New translations django.po from Crowdin 2021-10-05 12:41:18 +11:00
Oliver
40f8a03846 Fix: New translations django.po from Crowdin 2021-10-05 12:41:15 +11:00
Oliver
ebcd9d0569 Fix: New translations django.po from Crowdin 2021-10-05 12:41:14 +11:00
Oliver
34a7540ae9 Fix: New translations django.po from Crowdin 2021-10-05 12:41:12 +11:00
Oliver
f3ced5f6ac Fix: New translations django.po from Crowdin 2021-10-05 12:41:11 +11:00
Oliver
9a23fcc243 Fix: New translations django.po from Crowdin 2021-10-05 12:41:10 +11:00
Oliver
10e3a5f5a9 Merge pull request #2100 from SchrodingersGat/barcode-field-fix
Fix for "barcode" field in purchase order receive serializer

(cherry picked from commit 5c26769999)
2021-10-05 12:34:46 +11:00
github-actions[bot]
95bf39c127 updated translation base 2021-10-05 01:33:19 +00:00
eeintech
f661a4f4ec Added migration file
(cherry picked from commit a735a3e15c)
2021-10-05 10:58:28 +11:00
eeintech
3d067b39b1 Fix plural name for Companies in Admin interface
(cherry picked from commit 6e31a8111b)
2021-10-05 10:58:22 +11:00
Oliver
b90838db9c Fix: New translations django.po from Crowdin 2021-10-05 10:43:56 +11:00
Oliver
4f7f9ae7bc Fix: New translations django.po from Crowdin 2021-10-05 10:43:55 +11:00
Oliver
08ef8642a0 Fix: New translations django.po from Crowdin 2021-10-05 10:43:53 +11:00
Oliver
1a2ad29b67 Fix: New translations django.po from Crowdin 2021-10-05 10:43:52 +11:00
Oliver
6682d60eb6 Fix: New translations django.po from Crowdin 2021-10-05 10:43:51 +11:00
Oliver
0a258f9cd0 Fix: New translations django.po from Crowdin 2021-10-05 10:43:49 +11:00
Oliver
7b027f96f6 Fix: New translations django.po from Crowdin 2021-10-05 10:43:48 +11:00
Oliver
58fb20949d Fix: New translations django.po from Crowdin 2021-10-05 10:43:47 +11:00
Oliver
4c72e29e61 Fix: New translations django.po from Crowdin 2021-10-05 10:43:46 +11:00
Oliver
8fe8dd0067 Fix: New translations django.po from Crowdin 2021-10-05 10:43:44 +11:00
Oliver
1ef31d0f2a Fix: New translations django.po from Crowdin 2021-10-05 10:43:43 +11:00
Oliver
da2e278f15 Fix: New translations django.po from Crowdin 2021-10-05 10:43:42 +11:00
Oliver
bf6bd514f2 Fix: New translations django.po from Crowdin 2021-10-05 10:43:41 +11:00
Oliver
0055f1331b Fix: New translations django.po from Crowdin 2021-10-05 10:43:39 +11:00
Oliver
e209eb5beb Fix: New translations django.po from Crowdin 2021-10-05 10:43:38 +11:00
Oliver
29afe328d1 Fix: New translations django.po from Crowdin 2021-10-05 10:43:37 +11:00
Oliver
c9ce2949db Fix: New translations django.po from Crowdin 2021-10-05 10:43:35 +11:00
Oliver
6a6b7f57ce Fix: New translations django.po from Crowdin 2021-10-05 10:43:34 +11:00
github-actions[bot]
d01686248b updated translation base 2021-10-04 23:41:41 +00:00
Oliver
094a63f751 Bump version number -> 0.5.1 2021-10-04 09:52:15 +11:00
github-actions[bot]
024552e4d0 updated translation base 2021-10-03 22:36:56 +00:00
Oliver
fdfc65ad4d Fix: New translations django.po from Crowdin 2021-10-03 01:38:15 +10:00
Oliver
f7a2f5927d Fix: New translations django.po from Crowdin 2021-10-03 01:38:13 +10:00
Oliver
378f87ee08 Fix: New translations django.po from Crowdin 2021-10-03 01:38:12 +10:00
Oliver
a48a013685 Fix: New translations django.po from Crowdin 2021-10-03 01:38:11 +10:00
Oliver
af421a7d35 Fix: New translations django.po from Crowdin 2021-10-03 01:38:10 +10:00
Oliver
f0ce58cfb9 Fix: New translations django.po from Crowdin 2021-10-03 01:38:08 +10:00
Oliver
fb1ae01262 Fix: New translations django.po from Crowdin 2021-10-03 01:38:05 +10:00
Oliver
d6ac20bb8a Fix: New translations django.po from Crowdin 2021-10-03 01:38:04 +10:00
Oliver
f0adb19dd7 Fix: New translations django.po from Crowdin 2021-10-03 01:38:03 +10:00
Oliver
c5c2b07a75 Fix: New translations django.po from Crowdin 2021-10-03 01:38:00 +10:00
Oliver
c4f33f478f Fix: New translations django.po from Crowdin 2021-10-03 01:37:59 +10:00
Oliver
9b95dd7961 Fix: New translations django.po from Crowdin 2021-10-03 01:37:58 +10:00
Oliver
610b1b62a4 Fix: New translations django.po from Crowdin 2021-10-03 01:37:56 +10:00
Oliver
2ad87a044c Fix: New translations django.po from Crowdin 2021-10-03 01:37:55 +10:00
Oliver
0b70ba756d Fix: New translations django.po from Crowdin 2021-10-03 01:37:54 +10:00
Oliver
b288072ac7 Fix: New translations django.po from Crowdin 2021-10-03 01:37:52 +10:00
Oliver
ae016b0fe6 Fix: New translations django.po from Crowdin 2021-10-03 01:37:51 +10:00
Oliver
6fc9e7868d Fix: New translations django.po from Crowdin 2021-10-03 01:37:49 +10:00
github-actions[bot]
a5e26ceeac updated translation base 2021-10-02 15:35:10 +00:00
Oliver
2fedc1267c Merge pull request #2090 from SchrodingersGat/po-api-fix
Fix for purchase order API

(cherry picked from commit b7ff50ca87)
2021-10-03 01:33:54 +10:00
github-actions[bot]
4893cd527f updated translation base 2021-09-30 22:48:24 +00:00
github-actions[bot]
f2050f7cab updated translation base 2021-09-30 12:16:50 +00:00
github-actions[bot]
1ef1fdc6e6 updated translation base 2021-09-30 00:47:58 +00:00
github-actions[bot]
7f93b37437 updated translation base 2021-09-29 23:44:17 +00:00
github-actions[bot]
d56da99c0d updated translation base 2021-09-28 00:58:41 +00:00
github-actions[bot]
71b3dd3e76 updated translation base 2021-09-27 23:30:47 +00:00
github-actions[bot]
dcdb2add28 updated translation base 2021-09-27 04:34:36 +00:00
github-actions[bot]
7522a80f96 updated translation base 2021-09-24 02:37:15 +00:00
github-actions[bot]
5efba2dad0 updated translation base 2021-09-23 11:53:15 +00:00
github-actions[bot]
d943020d56 updated translation base 2021-09-21 23:36:06 +00:00
github-actions[bot]
a41db6ae28 updated translation base 2021-09-21 23:08:30 +00:00
github-actions[bot]
11d2d5588f updated translation base 2021-09-17 12:36:18 +00:00
github-actions[bot]
7f09ad2b38 updated translation base 2021-09-17 11:49:36 +00:00
github-actions[bot]
ebc95cb326 updated translation base 2021-09-14 01:00:20 +00:00
github-actions[bot]
2018229dc5 updated translation base 2021-09-14 00:01:42 +00:00
github-actions[bot]
224b372eae updated translation base 2021-09-13 10:30:31 +00:00
github-actions[bot]
7d286cf4b8 updated translation base 2021-09-13 10:04:22 +00:00
36 changed files with 29241 additions and 25821 deletions

View File

@@ -274,7 +274,9 @@ def send_email(subject, body, recipients, from_email=None):
offload_task(
'django.core.mail.send_mail',
subject, body,
subject,
body,
from_email,
recipients,
fail_silently=False,
)

View File

@@ -8,8 +8,9 @@ import re
import common.models
INVENTREE_SW_VERSION = "0.5.0"
INVENTREE_SW_VERSION = "0.5.1"
# InvenTree API version
INVENTREE_API_VERSION = 12
"""
@@ -96,16 +97,14 @@ def inventreeDocsVersion():
Return the version string matching the latest documentation.
Development -> "latest"
Release -> "major.minor"
Release -> "major.minor.sub" e.g. "0.5.2"
"""
if isInvenTreeDevelopmentVersion():
return "latest"
else:
major, minor, patch = inventreeVersionTuple()
return f"{major}.{minor}"
return INVENTREE_SW_VERSION
def isInvenTreeUpToDate():

View File

@@ -292,6 +292,7 @@ loadStockTable($("#build-stock-table"), {
location_detail: true,
part_detail: true,
build: {{ build.id }},
is_building: false,
},
groupByField: 'location',
buttons: [

View File

@@ -0,0 +1,17 @@
# Generated by Django 3.2.5 on 2021-10-04 20:41
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('company', '0040_alter_company_currency'),
]
operations = [
migrations.AlterModelOptions(
name='company',
options={'ordering': ['name'], 'verbose_name_plural': 'Companies'},
),
]

View File

@@ -94,6 +94,7 @@ class Company(models.Model):
constraints = [
UniqueConstraint(fields=['name', 'email'], name='unique_name_email_pair')
]
verbose_name_plural = "Companies"
name = models.CharField(max_length=100, blank=False,
help_text=_('Company name'),

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -8,11 +8,13 @@ from __future__ import unicode_literals
from django.utils.translation import ugettext_lazy as _
from django.conf.urls import url, include
from django.db import transaction
from django.core.exceptions import ValidationError as DjangoValidationError
from django_filters import rest_framework as rest_filters
from rest_framework import generics
from rest_framework import filters, status
from rest_framework.response import Response
from rest_framework import serializers
from rest_framework.serializers import ValidationError
@@ -243,11 +245,12 @@ class POReceive(generics.CreateAPIView):
pk = self.kwargs.get('pk', None)
if pk is None:
return None
else:
order = PurchaseOrder.objects.get(pk=self.kwargs['pk'])
return order
try:
order = PurchaseOrder.objects.get(pk=pk)
except (PurchaseOrder.DoesNotExist, ValueError):
raise ValidationError(_("Matching purchase order does not exist"))
return order
def create(self, request, *args, **kwargs):
@@ -259,9 +262,14 @@ class POReceive(generics.CreateAPIView):
serializer.is_valid(raise_exception=True)
# Receive the line items
self.receive_items(serializer)
try:
self.receive_items(serializer)
except DjangoValidationError as exc:
# Re-throw a django error as a DRF error
raise ValidationError(detail=serializers.as_serializer_error(exc))
headers = self.get_success_headers(serializer.data)
return Response(serializer.data, status=status.HTTP_201_CREATED, headers=headers)
@transaction.atomic

View File

@@ -418,16 +418,24 @@ class PurchaseOrder(Order):
barcode = ''
if not self.status == PurchaseOrderStatus.PLACED:
raise ValidationError({"status": _("Lines can only be received against an order marked as 'Placed'")})
raise ValidationError(
"Lines can only be received against an order marked as 'PLACED'"
)
try:
if not (quantity % 1 == 0):
raise ValidationError({"quantity": _("Quantity must be an integer")})
raise ValidationError({
"quantity": _("Quantity must be an integer")
})
if quantity < 0:
raise ValidationError({"quantity": _("Quantity must be a positive number")})
raise ValidationError({
"quantity": _("Quantity must be a positive number")
})
quantity = int(quantity)
except (ValueError, TypeError):
raise ValidationError({"quantity": _("Invalid quantity provided")})
raise ValidationError({
"quantity": _("Invalid quantity provided")
})
# Create a new stock item
if line.part and quantity > 0:

View File

@@ -235,6 +235,7 @@ class POLineItemReceiveSerializer(serializers.Serializer):
help_text=_('Unique identifier field'),
default='',
required=False,
allow_blank=True,
)
def validate_barcode(self, barcode):
@@ -494,7 +495,7 @@ class SOLineItemSerializer(InvenTreeModelSerializer):
order_detail = SalesOrderSerializer(source='order', many=False, read_only=True)
part_detail = PartBriefSerializer(source='part', many=False, read_only=True)
allocations = SalesOrderAllocationSerializer(many=True, read_only=True)
allocations = SalesOrderAllocationSerializer(many=True, read_only=True, location_detail=True)
quantity = serializers.FloatField()

View File

@@ -158,467 +158,38 @@
$("#so-lines-table").bootstrapTable("refresh");
}
$("#new-so-line").click(function() {
$("#new-so-line").click(function() {
constructForm('{% url "api-so-line-list" %}', {
fields: {
order: {
value: {{ order.pk }},
hidden: true,
},
part: {},
quantity: {},
reference: {},
sale_price: {},
sale_price_currency: {},
notes: {},
},
method: 'POST',
title: '{% trans "Add Line Item" %}',
onSuccess: reloadTable,
});
});
{% if order.status == SalesOrderStatus.PENDING %}
function showAllocationSubTable(index, row, element) {
// Construct a table showing stock items which have been allocated against this line item
var html = `<div class='sub-table'><table class='table table-striped table-condensed' id='allocation-table-${row.pk}'></table></div>`;
element.html(html);
var lineItem = row;
var table = $(`#allocation-table-${row.pk}`);
table.bootstrapTable({
data: row.allocations,
showHeader: false,
columns: [
{
width: '50%',
field: 'allocated',
title: '{% trans "Quantity" %}',
formatter: function(value, row, index, field) {
var text = '';
if (row.serial != null && row.quantity == 1) {
text = `{% trans "Serial Number" %}: ${row.serial}`;
} else {
text = `{% trans "Quantity" %}: ${row.quantity}`;
}
return renderLink(text, `/stock/item/${row.item}/`);
},
},
{
field: 'location',
title: 'Location',
formatter: function(value, row, index, field) {
return renderLink(row.location_path, `/stock/location/${row.location}/`);
},
},
{
field: 'po'
},
{
field: 'buttons',
title: '{% trans "Actions" %}',
formatter: function(value, row, index, field) {
var html = "<div class='btn-group float-right' role='group'>";
var pk = row.pk;
{% if order.status == SalesOrderStatus.PENDING %}
html += makeIconButton('fa-edit icon-blue', 'button-allocation-edit', pk, '{% trans "Edit stock allocation" %}');
html += makeIconButton('fa-trash-alt icon-red', 'button-allocation-delete', pk, '{% trans "Delete stock allocation" %}');
{% endif %}
html += "</div>";
return html;
},
},
],
});
table.find(".button-allocation-edit").click(function() {
var pk = $(this).attr('pk');
launchModalForm(`/order/sales-order/allocation/${pk}/edit/`, {
success: reloadTable,
});
});
table.find(".button-allocation-delete").click(function() {
var pk = $(this).attr('pk');
launchModalForm(`/order/sales-order/allocation/${pk}/delete/`, {
success: reloadTable,
});
});
}
{% endif %}
function showFulfilledSubTable(index, row, element) {
// Construct a table showing stock items which have been fulfilled against this line item
var id = `fulfilled-table-${row.pk}`;
var html = `<div class='sub-table'><table class='table table-striped table-condensed' id='${id}'></table></div>`;
element.html(html);
var lineItem = row;
$(`#${id}`).bootstrapTable({
url: "{% url 'api-stock-list' %}",
queryParams: {
part: row.part,
sales_order: {{ order.id }},
},
showHeader: false,
columns: [
{
field: 'pk',
visible: false,
},
{
field: 'stock',
formatter: function(value, row) {
var text = '';
if (row.serial && row.quantity == 1) {
text = `{% trans "Serial Number" %}: ${row.serial}`;
} else {
text = `{% trans "Quantity" %}: ${row.quantity}`;
}
return renderLink(text, `/stock/item/${row.pk}/`);
},
},
{
field: 'po'
},
],
});
}
$("#so-lines-table").inventreeTable({
formatNoMatches: function() { return "{% trans 'No matching line items' %}"; },
queryParams: {
order: {{ order.id }},
part_detail: true,
allocations: true,
},
sidePagination: 'server',
uniqueId: 'pk',
url: "{% url 'api-so-line-list' %}",
onPostBody: setupCallbacks,
{% if order.status == SalesOrderStatus.PENDING or order.status == SalesOrderStatus.SHIPPED %}
detailViewByClick: true,
detailView: true,
detailFilter: function(index, row) {
{% if order.status == SalesOrderStatus.PENDING %}
return row.allocated > 0;
{% else %}
return row.fulfilled > 0;
{% endif %}
},
{% if order.status == SalesOrderStatus.PENDING %}
detailFormatter: showAllocationSubTable,
{% else %}
detailFormatter: showFulfilledSubTable,
{% endif %}
{% endif %}
showFooter: true,
columns: [
{
field: 'pk',
title: '{% trans "ID" %}',
visible: false,
switchable: false,
},
{
sortable: true,
sortName: 'part__name',
field: 'part',
title: '{% trans "Part" %}',
formatter: function(value, row, index, field) {
if (row.part) {
return imageHoverIcon(row.part_detail.thumbnail) + renderLink(row.part_detail.full_name, `/part/${value}/`);
} else {
return '-';
}
},
footerFormatter: function() {
return '{% trans "Total" %}'
},
},
{
sortable: true,
field: 'reference',
title: '{% trans "Reference" %}'
},
{
sortable: true,
field: 'quantity',
title: '{% trans "Quantity" %}',
footerFormatter: function(data) {
return data.map(function (row) {
return +row['quantity']
}).reduce(function (sum, i) {
return sum + i
}, 0)
},
},
{
sortable: true,
field: 'sale_price',
title: '{% trans "Unit Price" %}',
formatter: function(value, row) {
return row.sale_price_string || row.sale_price;
}
},
{
sortable: true,
title: '{% trans "Total price" %}',
formatter: function(value, row) {
var total = row.sale_price * row.quantity;
var formatter = new Intl.NumberFormat('en-US', {style: 'currency', currency: row.sale_price_currency});
return formatter.format(total)
},
footerFormatter: function(data) {
var total = data.map(function (row) {
return +row['sale_price']*row['quantity']
}).reduce(function (sum, i) {
return sum + i
}, 0)
var currency = (data.slice(-1)[0] && data.slice(-1)[0].sale_price_currency) || 'USD';
var formatter = new Intl.NumberFormat('en-US', {style: 'currency', currency: currency});
return formatter.format(total)
}
},
{
field: 'allocated',
{% if order.status == SalesOrderStatus.PENDING %}
title: '{% trans "Allocated" %}',
{% else %}
title: '{% trans "Fulfilled" %}',
{% endif %}
formatter: function(value, row, index, field) {
{% if order.status == SalesOrderStatus.PENDING %}
var quantity = row.allocated;
{% else %}
var quantity = row.fulfilled;
{% endif %}
return makeProgressBar(quantity, row.quantity, {
id: `order-line-progress-${row.pk}`,
});
},
sorter: function(valA, valB, rowA, rowB) {
{% if order.status == SalesOrderStatus.PENDING %}
var A = rowA.allocated;
var B = rowB.allocated;
{% else %}
var A = rowA.fulfilled;
var B = rowB.fulfilled;
{% endif %}
if (A == 0 && B == 0) {
return (rowA.quantity > rowB.quantity) ? 1 : -1;
}
var progressA = parseFloat(A) / rowA.quantity;
var progressB = parseFloat(B) / rowB.quantity;
return (progressA < progressB) ? 1 : -1;
}
},
{
field: 'notes',
title: '{% trans "Notes" %}',
},
{
field: 'po',
title: '{% trans "PO" %}',
formatter: function(value, row, index, field) {
var po_name = "";
if (row.allocated) {
row.allocations.forEach(function(allocation) {
if (allocation.po != po_name) {
if (po_name) {
po_name = "-";
} else {
po_name = allocation.po
}
}
})
}
return `<div>` + po_name + `</div>`;
}
},
{% if order.status == SalesOrderStatus.PENDING %}
{
field: 'buttons',
formatter: function(value, row, index, field) {
var html = `<div class='btn-group float-right' role='group'>`;
var pk = row.pk;
if (row.part) {
var part = row.part_detail;
if (part.trackable) {
html += makeIconButton('fa-hashtag icon-green', 'button-add-by-sn', pk, '{% trans "Allocate serial numbers" %}');
}
html += makeIconButton('fa-sign-in-alt icon-green', 'button-add', pk, '{% trans "Allocate stock" %}');
if (part.purchaseable) {
html += makeIconButton('fa-shopping-cart', 'button-buy', row.part, '{% trans "Purchase stock" %}');
}
if (part.assembly) {
html += makeIconButton('fa-tools', 'button-build', row.part, '{% trans "Build stock" %}');
}
html += makeIconButton('fa-dollar-sign icon-green', 'button-price', pk, '{% trans "Calculate price" %}');
}
html += makeIconButton('fa-edit icon-blue', 'button-edit', pk, '{% trans "Edit line item" %}');
html += makeIconButton('fa-trash-alt icon-red', 'button-delete', pk, '{% trans "Delete line item " %}');
html += `</div>`;
return html;
}
},
{% endif %}
],
});
function setupCallbacks() {
var table = $("#so-lines-table");
// Set up callbacks for the row buttons
table.find(".button-edit").click(function() {
var pk = $(this).attr('pk');
constructForm(`/api/order/so-line/${pk}/`, {
constructForm('{% url "api-so-line-list" %}', {
fields: {
order: {
value: {{ order.pk }},
hidden: true,
},
part: {},
quantity: {},
reference: {},
sale_price: {},
sale_price_currency: {},
notes: {},
},
title: '{% trans "Edit Line Item" %}',
method: 'POST',
title: '{% trans "Add Line Item" %}',
onSuccess: reloadTable,
});
});
table.find(".button-delete").click(function() {
var pk = $(this).attr('pk');
constructForm(`/api/order/so-line/${pk}/`, {
method: 'DELETE',
title: '{% trans "Delete Line Item" %}',
onSuccess: reloadTable,
});
});
table.find(".button-add-by-sn").click(function() {
var pk = $(this).attr('pk');
inventreeGet(`/api/order/so-line/${pk}/`, {},
{
success: function(response) {
launchModalForm('{% url "so-assign-serials" %}', {
success: reloadTable,
data: {
line: pk,
part: response.part,
}
});
}
}
);
});
table.find(".button-add").click(function() {
var pk = $(this).attr('pk');
launchModalForm(`/order/sales-order/allocation/new/`, {
success: reloadTable,
data: {
line: pk,
},
});
});
table.find(".button-build").click(function() {
var pk = $(this).attr('pk');
// Extract the row data from the table!
var idx = $(this).closest('tr').attr('data-index');
var row = table.bootstrapTable('getData')[idx];
var quantity = 1;
if (row.allocated < row.quantity) {
quantity = row.quantity - row.allocated;
loadSalesOrderLineItemTable(
'#so-lines-table',
{
order: {{ order.pk }},
status: {{ order.status }},
}
launchModalForm(`/build/new/`, {
follow: true,
data: {
part: pk,
sales_order: {{ order.id }},
quantity: quantity,
},
});
});
table.find(".button-buy").click(function() {
var pk = $(this).attr('pk');
launchModalForm("{% url 'order-parts' %}", {
data: {
parts: [pk],
},
});
});
$(".button-price").click(function() {
var pk = $(this).attr('pk');
var idx = $(this).closest('tr').attr('data-index');
var row = table.bootstrapTable('getData')[idx];
launchModalForm(
"{% url 'line-pricing' %}",
{
submit_text: '{% trans "Calculate price" %}',
data: {
line_item: pk,
quantity: row.quantity,
},
buttons: [{name: 'update_price',
title: '{% trans "Update Unit Price" %}'},],
success: reloadTable,
}
);
});
);
attachNavCallbacks({
name: 'sales-order',
default: 'order-items'
});
}
{% endblock %}

View File

@@ -401,25 +401,45 @@ class PurchaseOrderReceiveTest(OrderTest):
self.assertEqual(line_1.received, 0)
self.assertEqual(line_2.received, 50)
valid_data = {
'items': [
{
'line_item': 1,
'quantity': 50,
'barcode': 'MY-UNIQUE-BARCODE-123',
},
{
'line_item': 2,
'quantity': 200,
'location': 2, # Explicit location
'barcode': 'MY-UNIQUE-BARCODE-456',
}
],
'location': 1, # Default location
}
# Before posting "valid" data, we will mark the purchase order as "pending"
# In this case we do expect an error!
order = PurchaseOrder.objects.get(pk=1)
order.status = PurchaseOrderStatus.PENDING
order.save()
response = self.post(
self.url,
valid_data,
expected_code=400
)
self.assertIn('can only be received against', str(response.data))
# Now, set the PO back to "PLACED" so the items can be received
order.status = PurchaseOrderStatus.PLACED
order.save()
# Receive two separate line items against this order
self.post(
self.url,
{
'items': [
{
'line_item': 1,
'quantity': 50,
'barcode': 'MY-UNIQUE-BARCODE-123',
},
{
'line_item': 2,
'quantity': 200,
'location': 2, # Explicit location
'barcode': 'MY-UNIQUE-BARCODE-456',
}
],
'location': 1, # Default location
},
valid_data,
expected_code=201,
)

View File

@@ -189,12 +189,15 @@ def ExportBom(part, fmt='csv', cascade=False, max_levels=None, parameter_data=Fa
# Process manufacturer part
for manufacturer_idx, manufacturer_part in enumerate(manufacturer_parts):
if manufacturer_part:
if manufacturer_part and manufacturer_part.manufacturer:
manufacturer_name = manufacturer_part.manufacturer.name
else:
manufacturer_name = ''
manufacturer_mpn = manufacturer_part.MPN
if manufacturer_part:
manufacturer_mpn = manufacturer_part.MPN
else:
manufacturer_mpn = ''
# Generate column names for this manufacturer
k_man = manufacturer_headers[0] + "_" + str(manufacturer_idx)
@@ -210,12 +213,15 @@ def ExportBom(part, fmt='csv', cascade=False, max_levels=None, parameter_data=Fa
# Process supplier parts
for supplier_idx, supplier_part in enumerate(manufacturer_part.supplier_parts.all()):
if supplier_part.supplier:
if supplier_part.supplier and supplier_part.supplier:
supplier_name = supplier_part.supplier.name
else:
supplier_name = ''
supplier_sku = supplier_part.SKU
if supplier_part:
supplier_sku = supplier_part.SKU
else:
supplier_sku = ''
# Generate column names for this supplier
k_sup = str(supplier_headers[0]) + "_" + str(manufacturer_idx) + "_" + str(supplier_idx)

View File

@@ -64,6 +64,7 @@ class StockItemSerializerBrief(InvenTreeModelSerializer):
'location',
'location_name',
'quantity',
'serial',
]

View File

@@ -83,7 +83,7 @@
<tr>
<td><span class='fas fa-mobile-alt'></span></td>
<td>{% trans "Mobile App" %}</td>
<td><a href="https://inventree.readthedocs.io/en/latest/app/app">https://inventree.readthedocs.io/en/latest/app/app</a></td>
<td><a href="{% inventree_docs_url %}/app/app">{% inventree_docs_url %}/app/app</a></td>
</tr>
<tr>
<td><span class='fas fa-bug'></span></td>

View File

@@ -42,6 +42,9 @@ function buildFormFields() {
part_detail: true,
}
},
sales_order: {
hidden: true,
},
batch: {},
target_date: {},
take_from: {},
@@ -76,23 +79,32 @@ function newBuildOrder(options={}) {
var fields = buildFormFields();
// Specify the target part
if (options.part) {
fields.part.value = options.part;
}
// Specify the desired quantity
if (options.quantity) {
fields.quantity.value = options.quantity;
}
// Specify the parent build order
if (options.parent) {
fields.parent.value = options.parent;
}
// Specify a parent sales order
if (options.sales_order) {
fields.sales_order.value = options.sales_order;
}
constructForm(`/api/build/`, {
fields: fields,
follow: true,
method: 'POST',
title: '{% trans "Create Build Order" %}'
title: '{% trans "Create Build Order" %}',
onSuccess: options.onSuccess,
});
}
@@ -623,8 +635,15 @@ function loadBuildOutputAllocationTable(buildInfo, output, options={}) {
var url = '';
if (row.serial && row.quantity == 1) {
text = `{% trans "Serial Number" %}: ${row.serial}`;
var serial = row.serial;
if (row.stock_item_detail) {
serial = row.stock_item_detail.serial;
}
if (serial && row.quantity == 1) {
text = `{% trans "Serial Number" %}: ${serial}`;
} else {
text = `{% trans "Quantity" %}: ${row.quantity}`;
}

View File

@@ -23,6 +23,7 @@
loadPurchaseOrderLineItemTable,
loadPurchaseOrderTable,
loadSalesOrderAllocationTable,
loadSalesOrderLineItemTable,
loadSalesOrderTable,
newPurchaseOrderFromOrderWizard,
newSupplierPartFromOrderWizard,
@@ -827,3 +828,575 @@ function loadSalesOrderAllocationTable(table, options={}) {
]
});
}
/**
* Display an "allocations" sub table, showing stock items allocated againt a sales order
* @param {*} index
* @param {*} row
* @param {*} element
*/
function showAllocationSubTable(index, row, element, options) {
// Construct a sub-table element
var html = `
<div class='sub-table'>
<table class='table table-striped table-condensed' id='allocation-table-${row.pk}'>
</table>
</div>`;
element.html(html);
var table = $(`#allocation-table-${row.pk}`);
// Is the parent SalesOrder pending?
var pending = options.status == {{ SalesOrderStatus.PENDING }};
// Function to reload the allocation table
function reloadTable() {
table.bootstrapTable('refresh');
}
function setupCallbacks() {
// Add callbacks for 'edit' buttons
table.find('.button-allocation-edit').click(function() {
var pk = $(this).attr('pk');
// TODO: Migrate to API forms
launchModalForm(`/order/sales-order/allocation/${pk}/edit/`, {
success: reloadTable,
});
});
// Add callbacks for 'delete' buttons
table.find('.button-allocation-delete').click(function() {
var pk = $(this).attr('pk');
// TODO: Migrate to API forms
launchModalForm(`/order/sales-order/allocation/${pk}/delete/`, {
success: reloadTable,
});
});
}
table.bootstrapTable({
onPostBody: setupCallbacks,
data: row.allocations,
showHeader: false,
columns: [
{
field: 'allocated',
title: '{% trans "Quantity" %}',
formatter: function(value, row, index, field) {
var text = '';
if (row.serial != null && row.quantity == 1) {
text = `{% trans "Serial Number" %}: ${row.serial}`;
} else {
text = `{% trans "Quantity" %}: ${row.quantity}`;
}
return renderLink(text, `/stock/item/${row.item}/`);
},
},
{
field: 'location',
title: '{% trans "Location" %}',
formatter: function(value, row, index, field) {
// Location specified
if (row.location) {
return renderLink(
row.location_detail.pathstring || '{% trans "Location" %}',
`/stock/location/${row.location}/`
);
} else {
return `<i>{% trans "Stock location not specified" %}`;
}
},
},
// TODO: ?? What is 'po' field all about?
/*
{
field: 'po'
},
*/
{
field: 'buttons',
title: '{% trans "Actions" %}',
formatter: function(value, row, index, field) {
var html = `<div class='btn-group float-right' role='group'>`;
var pk = row.pk;
if (pending) {
html += makeIconButton('fa-edit icon-blue', 'button-allocation-edit', pk, '{% trans "Edit stock allocation" %}');
html += makeIconButton('fa-trash-alt icon-red', 'button-allocation-delete', pk, '{% trans "Delete stock allocation" %}');
}
html += '</div>';
return html;
},
},
],
});
}
/**
* Display a "fulfilled" sub table, showing stock items fulfilled against a purchase order
*/
function showFulfilledSubTable(index, row, element, options) {
// Construct a table showing stock items which have been fulfilled against this line item
if (!options.order) {
return 'ERROR: Order ID not supplied';
}
var id = `fulfilled-table-${row.pk}`;
var html = `
<div class='sub-table'>
<table class='table table-striped table-condensed' id='${id}'>
</table>
</div>`;
element.html(html);
$(`#${id}`).bootstrapTable({
url: '{% url "api-stock-list" %}',
queryParams: {
part: row.part,
sales_order: options.order,
},
showHeader: false,
columns: [
{
field: 'pk',
visible: false,
},
{
field: 'stock',
formatter: function(value, row) {
var text = '';
if (row.serial && row.quantity == 1) {
text = `{% trans "Serial Number" %}: ${row.serial}`;
} else {
text = `{% trans "Quantity" %}: ${row.quantity}`;
}
return renderLink(text, `/stock/item/${row.pk}/`);
},
},
/*
{
field: 'po'
},
*/
],
});
}
/**
* Load a table displaying line items for a particular SalesOrder
*
* @param {String} table : HTML ID tag e.g. '#table'
* @param {Object} options : object which contains:
* - order {integer} : pk of the SalesOrder
* - status: {integer} : status code for the order
*/
function loadSalesOrderLineItemTable(table, options={}) {
options.params = options.params || {};
if (!options.order) {
console.log('ERROR: function called without order ID');
return;
}
if (!options.status) {
console.log('ERROR: function called without order status');
return;
}
options.params.order = options.order;
options.params.part_detail = true;
options.params.allocations = true;
var filters = loadTableFilters('salesorderlineitem');
for (var key in options.params) {
filters[key] = options.params[key];
}
options.url = options.url || '{% url "api-so-line-list" %}';
var filter_target = options.filter_target || '#filter-list-sales-order-lines';
setupFilterList('salesorderlineitems', $(table), filter_target);
// Is the order pending?
var pending = options.status == {{ SalesOrderStatus.PENDING }};
// Has the order shipped?
var shipped = options.status == {{ SalesOrderStatus.SHIPPED }};
// Show detail view if the PurchaseOrder is PENDING or SHIPPED
var show_detail = pending || shipped;
// Table columns to display
var columns = [
/*
{
checkbox: true,
visible: true,
switchable: false,
},
*/
{
sortable: true,
sortName: 'part__name',
field: 'part',
title: '{% trans "Part" %}',
switchable: false,
formatter: function(value, row, index, field) {
if (row.part) {
return imageHoverIcon(row.part_detail.thumbnail) + renderLink(row.part_detail.full_name, `/part/${value}/`);
} else {
return '-';
}
},
footerFormatter: function() {
return '{% trans "Total" %}';
},
},
{
sortable: true,
field: 'reference',
title: '{% trans "Reference" %}',
switchable: false,
},
{
sortable: true,
field: 'quantity',
title: '{% trans "Quantity" %}',
footerFormatter: function(data) {
return data.map(function(row) {
return +row['quantity'];
}).reduce(function(sum, i) {
return sum + i;
}, 0);
},
switchable: false,
},
{
sortable: true,
field: 'sale_price',
title: '{% trans "Unit Price" %}',
formatter: function(value, row) {
return row.sale_price_string || row.sale_price;
}
},
{
sortable: true,
title: '{% trans "Total price" %}',
formatter: function(value, row) {
var total = row.sale_price * row.quantity;
var formatter = new Intl.NumberFormat(
'en-US',
{
style: 'currency',
currency: row.sale_price_currency
}
);
return formatter.format(total);
},
footerFormatter: function(data) {
var total = data.map(function(row) {
return +row['sale_price'] * row['quantity'];
}).reduce(function(sum, i) {
return sum + i;
}, 0);
var currency = (data.slice(-1)[0] && data.slice(-1)[0].sale_price_currency) || 'USD';
var formatter = new Intl.NumberFormat(
'en-US',
{
style: 'currency',
currency: currency
}
);
return formatter.format(total);
}
},
{
field: 'stock',
title: '{% trans "In Stock" %}',
formatter: function(value, row) {
return row.part_detail.stock;
},
},
{
field: 'allocated',
title: pending ? '{% trans "Allocated" %}' : '{% trans "Fulfilled" %}',
switchable: false,
formatter: function(value, row, index, field) {
var quantity = pending ? row.allocated : row.fulfilled;
return makeProgressBar(quantity, row.quantity, {
id: `order-line-progress-${row.pk}`,
});
},
sorter: function(valA, valB, rowA, rowB) {
var A = pending ? rowA.allocated : rowA.fulfilled;
var B = pending ? rowB.allocated : rowB.fulfilled;
if (A == 0 && B == 0) {
return (rowA.quantity > rowB.quantity) ? 1 : -1;
}
var progressA = parseFloat(A) / rowA.quantity;
var progressB = parseFloat(B) / rowB.quantity;
return (progressA < progressB) ? 1 : -1;
}
},
{
field: 'notes',
title: '{% trans "Notes" %}',
},
// TODO: Re-introduce the "PO" field, once it is fixed
/*
{
field: 'po',
title: '{% trans "PO" %}',
formatter: function(value, row, index, field) {
var po_name = "";
if (row.allocated) {
row.allocations.forEach(function(allocation) {
if (allocation.po != po_name) {
if (po_name) {
po_name = "-";
} else {
po_name = allocation.po
}
}
})
}
return `<div>` + po_name + `</div>`;
}
},
*/
];
if (pending) {
columns.push({
field: 'buttons',
formatter: function(value, row, index, field) {
var html = `<div class='btn-group float-right' role='group'>`;
var pk = row.pk;
if (row.part) {
var part = row.part_detail;
if (part.trackable) {
html += makeIconButton('fa-hashtag icon-green', 'button-add-by-sn', pk, '{% trans "Allocate serial numbers" %}');
}
html += makeIconButton('fa-sign-in-alt icon-green', 'button-add', pk, '{% trans "Allocate stock" %}');
if (part.purchaseable) {
html += makeIconButton('fa-shopping-cart', 'button-buy', row.part, '{% trans "Purchase stock" %}');
}
if (part.assembly) {
html += makeIconButton('fa-tools', 'button-build', row.part, '{% trans "Build stock" %}');
}
html += makeIconButton('fa-dollar-sign icon-green', 'button-price', pk, '{% trans "Calculate price" %}');
}
html += makeIconButton('fa-edit icon-blue', 'button-edit', pk, '{% trans "Edit line item" %}');
html += makeIconButton('fa-trash-alt icon-red', 'button-delete', pk, '{% trans "Delete line item " %}');
html += `</div>`;
return html;
}
});
} else {
// Remove the "in stock" column
delete columns['stock'];
}
function reloadTable() {
$(table).bootstrapTable('refresh');
}
// Configure callback functions once the table is loaded
function setupCallbacks() {
// Callback for editing line items
$(table).find('.button-edit').click(function() {
var pk = $(this).attr('pk');
constructForm(`/api/order/so-line/${pk}/`, {
fields: {
quantity: {},
reference: {},
sale_price: {},
sale_price_currency: {},
notes: {},
},
title: '{% trans "Edit Line Item" %}',
onSuccess: reloadTable,
});
});
// Callback for deleting line items
$(table).find('.button-delete').click(function() {
var pk = $(this).attr('pk');
constructForm(`/api/order/so-line/${pk}/`, {
method: 'DELETE',
title: '{% trans "Delete Line Item" %}',
onSuccess: reloadTable,
});
});
// Callback for allocating stock items by serial number
$(table).find('.button-add-by-sn').click(function() {
var pk = $(this).attr('pk');
// TODO: Migrate this form to the API forms
inventreeGet(`/api/order/so-line/${pk}/`, {},
{
success: function(response) {
launchModalForm('{% url "so-assign-serials" %}', {
success: reloadTable,
data: {
line: pk,
part: response.part,
}
});
}
}
);
});
// Callback for allocation stock items to the order
$(table).find('.button-add').click(function() {
var pk = $(this).attr('pk');
// TODO: Migrate this form to the API forms
launchModalForm(`/order/sales-order/allocation/new/`, {
success: reloadTable,
data: {
line: pk,
},
});
});
// Callback for creating a new build
$(table).find('.button-build').click(function() {
var pk = $(this).attr('pk');
// Extract the row data from the table!
var idx = $(this).closest('tr').attr('data-index');
var row = $(table).bootstrapTable('getData')[idx];
var quantity = 1;
if (row.allocated < row.quantity) {
quantity = row.quantity - row.allocated;
}
// Create a new build order
newBuildOrder({
part: pk,
sales_order: options.order,
quantity: quantity,
success: reloadTable
});
});
// Callback for purchasing parts
$(table).find('.button-buy').click(function() {
var pk = $(this).attr('pk');
launchModalForm('{% url "order-parts" %}', {
data: {
parts: [
pk
],
},
});
});
// Callback for displaying price
$(table).find('.button-price').click(function() {
var pk = $(this).attr('pk');
var idx = $(this).closest('tr').attr('data-index');
var row = $(table).bootstrapTable('getData')[idx];
launchModalForm(
'{% url "line-pricing" %}',
{
submit_text: '{% trans "Calculate price" %}',
data: {
line_item: pk,
quantity: row.quantity,
},
buttons: [
{
name: 'update_price',
title: '{% trans "Update Unit Price" %}'
},
],
success: reloadTable,
}
);
});
}
$(table).inventreeTable({
onPostBody: setupCallbacks,
name: 'salesorderlineitems',
sidePagination: 'server',
formatNoMatches: function() {
return '{% trans "No matching line items" %}';
},
queryParams: filters,
original: options.params,
url: options.url,
showFooter: true,
uniqueId: 'pk',
detailView: show_detail,
detailViewByClick: show_detail,
detailFilter: function(index, row) {
if (pending) {
// Order is pending
return row.allocated > 0;
} else {
return row.fulfilled > 0;
}
},
detailFormatter: function(index, row, element) {
if (pending) {
return showAllocationSubTable(index, row, element, options);
} else {
return showFulfilledSubTable(index, row, element, options);
}
},
columns: columns,
});
}

View File

@@ -51,7 +51,7 @@
<td><span class='fas fa-tasks'></span></td>
<td>{% trans "Background Worker" %}</td>
<td>
<a href='https://inventree.readthedocs.io/en/latest/admin/tasks'>
<a href='{% inventree_docs_url %}/admin/tasks'>
<span class='label label-red'>{% trans "Background worker not running" %}</span>
</a>
</td>
@@ -62,7 +62,7 @@
<td><span class='fas fa-envelope'></span></td>
<td>{% trans "Email Settings" %}</td>
<td>
<a href='https://inventree.readthedocs.io/en/latest/admin/email'>
<a href='{% inventree_docs_url %}/admin/email'>
<span class='label label-yellow'>{% trans "Email settings not configured" %}</span>
</a>
</td>

View File

@@ -9,6 +9,7 @@ import sys
import re
import os
import argparse
import requests
if __name__ == '__main__':
@@ -16,9 +17,14 @@ if __name__ == '__main__':
version_file = os.path.join(here, '..', 'InvenTree', 'InvenTree', 'version.py')
version = None
with open(version_file, 'r') as f:
results = re.findall(r'INVENTREE_SW_VERSION = "(.*)"', f.read())
text = f.read()
# Extract the InvenTree software version
results = re.findall(r'INVENTREE_SW_VERSION = "(.*)"', text)
if not len(results) == 1:
print(f"Could not find INVENTREE_SW_VERSION in {version_file}")
@@ -26,6 +32,8 @@ if __name__ == '__main__':
version = results[0]
print(f"InvenTree Version: '{version}'")
parser = argparse.ArgumentParser()
parser.add_argument('-t', '--tag', help='Compare against specified version tag', action='store')
parser.add_argument('-r', '--release', help='Check that this is a release version', action='store_true')
@@ -57,6 +65,8 @@ if __name__ == '__main__':
e.g. "0.5 dev"
"""
print(f"Checking development branch")
pattern = "^\d+(\.\d+)+ dev$"
result = re.match(pattern, version)
@@ -71,6 +81,8 @@ if __name__ == '__main__':
e.g. "0.5.1"
"""
print(f"Checking release branch")
pattern = "^\d+(\.\d+)+$"
result = re.match(pattern, version)
@@ -84,4 +96,4 @@ if __name__ == '__main__':
print(f"Release tag '{args.tag}' does not match INVENTREE_SW_VERSION '{version}'")
sys.exit(1)
sys.exit(0)
sys.exit(0)