2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-09 07:00:56 +00:00

Order responsible requirement (#6866)

* Add BUILDORDER_REQUIRE_RESPONSIBLE setting

- If set, build orders must specify a responsible owner

* Add responsible required setting to other order models:

- PurchaseOrder
- SalesOrder
- ReturnOrder

* Add unit test

* Adjust unit tests

* Settings updates:

- Only check settings for global and user settings
- Plugin settings are not defined at run-time

* typo fix

* More spelling fixes

* Specify responsible owner pk
This commit is contained in:
Oliver
2024-03-27 15:25:56 +11:00
committed by GitHub
parent 785b3b0e68
commit cd0d35047d
13 changed files with 152 additions and 41 deletions

View File

@ -446,7 +446,7 @@ class StockLocationTest(StockAPITestCase):
StockLocation.objects.rebuild()
with self.assertNumQueriesLessThan(10):
with self.assertNumQueriesLessThan(12):
response = self.get(reverse('api-location-tree'), expected_code=200)
self.assertEqual(len(response.data), StockLocation.objects.count())