inventree-manufacturing-costs 0.1.0__tar.gz → 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {inventree_manufacturing_costs-0.1.0/inventree_manufacturing_costs.egg-info → inventree_manufacturing_costs-0.1.1}/PKG-INFO +1 -1
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1/inventree_manufacturing_costs.egg-info}/PKG-INFO +1 -1
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/manufacturing_costs/__init__.py +1 -1
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/manufacturing_costs/models.py +10 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/manufacturing_costs/views.py +2 -1
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/LICENSE +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/MANIFEST.in +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/README.md +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/inventree_manufacturing_costs.egg-info/SOURCES.txt +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/inventree_manufacturing_costs.egg-info/dependency_links.txt +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/inventree_manufacturing_costs.egg-info/entry_points.txt +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/inventree_manufacturing_costs.egg-info/top_level.txt +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/manufacturing_costs/admin.py +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/manufacturing_costs/apps.py +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/manufacturing_costs/core.py +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/manufacturing_costs/migrations/0001_initial.py +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/manufacturing_costs/migrations/0002_remove_manufacturingcost_amortization_and_more.py +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/manufacturing_costs/migrations/0003_manufacturingcost_description.py +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/manufacturing_costs/migrations/0004_manufacturingcost_active_manufacturingcost_inherited.py +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/manufacturing_costs/migrations/__init__.py +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/manufacturing_costs/serializers.py +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/manufacturing_costs/static/.vite/manifest.json +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/manufacturing_costs/static/AdminPanel.js +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/manufacturing_costs/static/AdminPanel.js.map +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/manufacturing_costs/static/PartPanel.js +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/manufacturing_costs/static/PartPanel.js.map +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/manufacturing_costs/static/assets/index-BjwOiYns.js +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/manufacturing_costs/static/assets/index-BjwOiYns.js.map +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/pyproject.toml +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/setup.cfg +0 -0
- {inventree_manufacturing_costs-0.1.0 → inventree_manufacturing_costs-0.1.1}/setup.py +0 -0
|
@@ -24,6 +24,11 @@ class ManufacturingRate(models.Model):
|
|
|
24
24
|
"""String representation of the manufacturing rate."""
|
|
25
25
|
return self.name
|
|
26
26
|
|
|
27
|
+
@staticmethod
|
|
28
|
+
def get_api_url():
|
|
29
|
+
"""Return the API URL for this manufacturing rate."""
|
|
30
|
+
return "/plugin/manufacturing-costs/rate/"
|
|
31
|
+
|
|
27
32
|
name = models.CharField(
|
|
28
33
|
max_length=100,
|
|
29
34
|
unique=True,
|
|
@@ -69,6 +74,11 @@ class ManufacturingCost(models.Model):
|
|
|
69
74
|
self.updated = InvenTree.helpers.current_time()
|
|
70
75
|
super().save(*args, **kwargs)
|
|
71
76
|
|
|
77
|
+
@staticmethod
|
|
78
|
+
def api_url():
|
|
79
|
+
"""Return the API URL for this manufacturing cost."""
|
|
80
|
+
return "/plugin/manufacturing-costs/cost/"
|
|
81
|
+
|
|
72
82
|
active = models.BooleanField(
|
|
73
83
|
default=True,
|
|
74
84
|
verbose_name=_("Active"),
|
|
@@ -25,8 +25,8 @@ from .serializers import (
|
|
|
25
25
|
class ManufacturingRateMixin:
|
|
26
26
|
"""Mixin class for ManufacturingRate API endpoints."""
|
|
27
27
|
|
|
28
|
-
# TODO: Fix up the permissions and authentication for this mixin
|
|
29
28
|
permission_classes = [permissions.IsAuthenticated]
|
|
29
|
+
role_required = "part"
|
|
30
30
|
serializer_class = ManufacturingRateSerializer
|
|
31
31
|
queryset = ManufacturingRate.objects.all()
|
|
32
32
|
|
|
@@ -58,6 +58,7 @@ class ManufacturingCostMixin:
|
|
|
58
58
|
"""Mixin class for ManufacturingCost API endpoints."""
|
|
59
59
|
|
|
60
60
|
permission_classes = [permissions.IsAuthenticated]
|
|
61
|
+
role_required = "part"
|
|
61
62
|
serializer_class = ManufacturingCostSerializer
|
|
62
63
|
queryset = ManufacturingCost.objects.all()
|
|
63
64
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|