inventree-manufacturing-costs 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: inventree-manufacturing-costs
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Capture part manufacturing costs
5
5
  Home-page: https://github.com/SchrodingersGat/inventree-manufacturing-costs
6
6
  Author: Oliver Walters
@@ -1,11 +1,11 @@
1
- inventree_manufacturing_costs-0.1.0.dist-info/licenses/LICENSE,sha256=4YPRs7DCPobmZTuCAvlCstDV6C-5y2i1h10ZoLJEVIQ,1113
2
- manufacturing_costs/__init__.py,sha256=AamVBjEe3jzcFGrwK_0mC4sI1NjzOOLvT9k7BvLzj7E,50
1
+ inventree_manufacturing_costs-0.1.1.dist-info/licenses/LICENSE,sha256=4YPRs7DCPobmZTuCAvlCstDV6C-5y2i1h10ZoLJEVIQ,1113
2
+ manufacturing_costs/__init__.py,sha256=rpBhIrvMnH5vq-Q-ndNtR3tTxKjdjVGgukQFUieqQeY,50
3
3
  manufacturing_costs/admin.py,sha256=bMGhhEY8hVv3i4uBL2ojxYJ_3zwyj1lvsoIQE2LA6yE,573
4
4
  manufacturing_costs/apps.py,sha256=unF9_8OIa3uFSXqg5V0Nvn9np1FRNhJ5YT6D27m3SBA,349
5
5
  manufacturing_costs/core.py,sha256=vlNKEQW351o4pRNokAMUi2QL51PyF5bX-1uNmd6ODNQ,3691
6
- manufacturing_costs/models.py,sha256=mGa2ZMqjb_k5Uzu2DH71fNDUX1CoC9ld-XQKnlBK-yk,4563
6
+ manufacturing_costs/models.py,sha256=3sgp1sjehzclZmJemwmX2EYbHIwShr7zcV94TA8CoRA,4869
7
7
  manufacturing_costs/serializers.py,sha256=2YwgJUt-ptw8wkHQekrVqLU5yKz6c-kBj701sqfRfpU,3824
8
- manufacturing_costs/views.py,sha256=zfuge8Ld6Ao-G9LRf4FbtNu1E3DzuoY19xElRjtK4IE,8049
8
+ manufacturing_costs/views.py,sha256=8lZf2V7FGRsChN1iZYiYKmPCFjRpo6kiuHK3ZmtUGmw,8034
9
9
  manufacturing_costs/migrations/0001_initial.py,sha256=yd-Jqj3I9tyA_2EgDtFwUIXigjasbalMv_VlLDv0G-k,5938
10
10
  manufacturing_costs/migrations/0002_remove_manufacturingcost_amortization_and_more.py,sha256=6ussQD7A-ermRPSC_0vhykVJTvPXIx-91GfyMv9vs8Y,1317
11
11
  manufacturing_costs/migrations/0003_manufacturingcost_description.py,sha256=IWpOnkF1MFEg1Y-89k0i9risrbkfOyt8padmsqgZek8,612
@@ -18,8 +18,8 @@ manufacturing_costs/static/PartPanel.js.map,sha256=QKi7esyDSTRziwR8YIucVIV5Drjdy
18
18
  manufacturing_costs/static/.vite/manifest.json,sha256=sPjDhV7inyCutMv5CdF4L1eJ-aAY9dluFawTqNn_fLs,469
19
19
  manufacturing_costs/static/assets/index-BjwOiYns.js,sha256=-kOOgzd0zZYg5BhUnvpmwWr3rsWaT0Jcb2eqqD2v39o,133966
20
20
  manufacturing_costs/static/assets/index-BjwOiYns.js.map,sha256=CbVdlj6F8RLHq_BC5pMKsDp-dIL2YKJKdOhklbGNNg4,261945
21
- inventree_manufacturing_costs-0.1.0.dist-info/METADATA,sha256=6RevFyqJEH1nVAAE9g26Y-GJkzgSJ4Iyaj7CaOEIU0w,4613
22
- inventree_manufacturing_costs-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
23
- inventree_manufacturing_costs-0.1.0.dist-info/entry_points.txt,sha256=17UEkeIVDI3oA1Z2mCotfEgBkVCmwjCsc5lYja9Wvgc,85
24
- inventree_manufacturing_costs-0.1.0.dist-info/top_level.txt,sha256=eKb1KtNZpbFJo_iKMuZSjmnfqdSmp0-C3_Iw79RO3NY,20
25
- inventree_manufacturing_costs-0.1.0.dist-info/RECORD,,
21
+ inventree_manufacturing_costs-0.1.1.dist-info/METADATA,sha256=7lWuSYZlQPyEIK-HRb7B5PLr-4WrTwb5twuKhAkb8bY,4613
22
+ inventree_manufacturing_costs-0.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
23
+ inventree_manufacturing_costs-0.1.1.dist-info/entry_points.txt,sha256=17UEkeIVDI3oA1Z2mCotfEgBkVCmwjCsc5lYja9Wvgc,85
24
+ inventree_manufacturing_costs-0.1.1.dist-info/top_level.txt,sha256=eKb1KtNZpbFJo_iKMuZSjmnfqdSmp0-C3_Iw79RO3NY,20
25
+ inventree_manufacturing_costs-0.1.1.dist-info/RECORD,,
@@ -1,3 +1,3 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
- PLUGIN_VERSION = "0.1.0"
3
+ PLUGIN_VERSION = "0.1.1"
@@ -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