mirror of
				https://github.com/inventree/InvenTree.git
				synced 2025-10-31 13:15:43 +00:00 
			
		
		
		
	Merge branch 'inventree:master' into matmair/issue2788
This commit is contained in:
		| @@ -11,7 +11,7 @@ from django_filters import rest_framework as rest_filters | ||||
| from rest_framework import filters | ||||
| from rest_framework import generics | ||||
|  | ||||
| from django.conf.urls import url, include | ||||
| from django.urls import include, re_path | ||||
| from django.db.models import Q | ||||
|  | ||||
| from InvenTree.helpers import str2bool | ||||
| @@ -390,42 +390,42 @@ class SupplierPriceBreakDetail(generics.RetrieveUpdateDestroyAPIView): | ||||
|  | ||||
| manufacturer_part_api_urls = [ | ||||
|  | ||||
|     url(r'^parameter/', include([ | ||||
|         url(r'^(?P<pk>\d+)/', ManufacturerPartParameterDetail.as_view(), name='api-manufacturer-part-parameter-detail'), | ||||
|     re_path(r'^parameter/', include([ | ||||
|         re_path(r'^(?P<pk>\d+)/', ManufacturerPartParameterDetail.as_view(), name='api-manufacturer-part-parameter-detail'), | ||||
|  | ||||
|         # Catch anything else | ||||
|         url(r'^.*$', ManufacturerPartParameterList.as_view(), name='api-manufacturer-part-parameter-list'), | ||||
|         re_path(r'^.*$', ManufacturerPartParameterList.as_view(), name='api-manufacturer-part-parameter-list'), | ||||
|     ])), | ||||
|  | ||||
|     url(r'^(?P<pk>\d+)/?', ManufacturerPartDetail.as_view(), name='api-manufacturer-part-detail'), | ||||
|     re_path(r'^(?P<pk>\d+)/?', ManufacturerPartDetail.as_view(), name='api-manufacturer-part-detail'), | ||||
|  | ||||
|     # Catch anything else | ||||
|     url(r'^.*$', ManufacturerPartList.as_view(), name='api-manufacturer-part-list'), | ||||
|     re_path(r'^.*$', ManufacturerPartList.as_view(), name='api-manufacturer-part-list'), | ||||
| ] | ||||
|  | ||||
|  | ||||
| supplier_part_api_urls = [ | ||||
|  | ||||
|     url(r'^(?P<pk>\d+)/?', SupplierPartDetail.as_view(), name='api-supplier-part-detail'), | ||||
|     re_path(r'^(?P<pk>\d+)/?', SupplierPartDetail.as_view(), name='api-supplier-part-detail'), | ||||
|  | ||||
|     # Catch anything else | ||||
|     url(r'^.*$', SupplierPartList.as_view(), name='api-supplier-part-list'), | ||||
|     re_path(r'^.*$', SupplierPartList.as_view(), name='api-supplier-part-list'), | ||||
| ] | ||||
|  | ||||
|  | ||||
| company_api_urls = [ | ||||
|     url(r'^part/manufacturer/', include(manufacturer_part_api_urls)), | ||||
|     re_path(r'^part/manufacturer/', include(manufacturer_part_api_urls)), | ||||
|  | ||||
|     url(r'^part/', include(supplier_part_api_urls)), | ||||
|     re_path(r'^part/', include(supplier_part_api_urls)), | ||||
|  | ||||
|     # Supplier price breaks | ||||
|     url(r'^price-break/', include([ | ||||
|     re_path(r'^price-break/', include([ | ||||
|  | ||||
|         url(r'^(?P<pk>\d+)/?', SupplierPriceBreakDetail.as_view(), name='api-part-supplier-price-detail'), | ||||
|         url(r'^.*$', SupplierPriceBreakList.as_view(), name='api-part-supplier-price-list'), | ||||
|         re_path(r'^(?P<pk>\d+)/?', SupplierPriceBreakDetail.as_view(), name='api-part-supplier-price-detail'), | ||||
|         re_path(r'^.*$', SupplierPriceBreakList.as_view(), name='api-part-supplier-price-list'), | ||||
|     ])), | ||||
|  | ||||
|     url(r'^(?P<pk>\d+)/?', CompanyDetail.as_view(), name='api-company-detail'), | ||||
|     re_path(r'^(?P<pk>\d+)/?', CompanyDetail.as_view(), name='api-company-detail'), | ||||
|  | ||||
|     url(r'^.*$', CompanyList.as_view(), name='api-company-list'), | ||||
|     re_path(r'^.*$', CompanyList.as_view(), name='api-company-list'), | ||||
| ] | ||||
|   | ||||
| @@ -8,7 +8,7 @@ from __future__ import unicode_literals | ||||
| from InvenTree.forms import HelperForm | ||||
| from InvenTree.fields import RoundingDecimalFormField | ||||
|  | ||||
| from django.utils.translation import ugettext_lazy as _ | ||||
| from django.utils.translation import gettext_lazy as _ | ||||
| import django.forms | ||||
|  | ||||
| from .models import Company | ||||
|   | ||||
| @@ -7,7 +7,7 @@ from __future__ import unicode_literals | ||||
|  | ||||
| import os | ||||
|  | ||||
| from django.utils.translation import ugettext_lazy as _ | ||||
| from django.utils.translation import gettext_lazy as _ | ||||
| from django.core.validators import MinValueValidator | ||||
| from django.core.exceptions import ValidationError | ||||
|  | ||||
| @@ -634,7 +634,7 @@ class SupplierPart(models.Model): | ||||
|     get_price = common.models.get_price | ||||
|  | ||||
|     def open_orders(self): | ||||
|         """ Return a database query for PO line items for this SupplierPart, | ||||
|         """ Return a database query for PurchaseOrder line items for this SupplierPart, | ||||
|         limited to purchase orders that are open / outstanding. | ||||
|         """ | ||||
|  | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
| JSON serializers for Company app | ||||
| """ | ||||
|  | ||||
| from django.utils.translation import ugettext_lazy as _ | ||||
| from django.utils.translation import gettext_lazy as _ | ||||
|  | ||||
| from rest_framework import serializers | ||||
|  | ||||
|   | ||||
| @@ -2,37 +2,37 @@ | ||||
| URL lookup for Company app | ||||
| """ | ||||
|  | ||||
| from django.conf.urls import url, include | ||||
| from django.urls import include, re_path | ||||
|  | ||||
| from . import views | ||||
|  | ||||
|  | ||||
| company_detail_urls = [ | ||||
|  | ||||
|     url(r'^thumb-download/', views.CompanyImageDownloadFromURL.as_view(), name='company-image-download'), | ||||
|     re_path(r'^thumb-download/', views.CompanyImageDownloadFromURL.as_view(), name='company-image-download'), | ||||
|  | ||||
|     # Any other URL | ||||
|     url(r'^.*$', views.CompanyDetail.as_view(), name='company-detail'), | ||||
|     re_path(r'^.*$', views.CompanyDetail.as_view(), name='company-detail'), | ||||
| ] | ||||
|  | ||||
|  | ||||
| company_urls = [ | ||||
|  | ||||
|     url(r'^(?P<pk>\d+)/', include(company_detail_urls)), | ||||
|     re_path(r'^(?P<pk>\d+)/', include(company_detail_urls)), | ||||
|  | ||||
|     url(r'suppliers/', views.CompanyIndex.as_view(), name='supplier-index'), | ||||
|     url(r'manufacturers/', views.CompanyIndex.as_view(), name='manufacturer-index'), | ||||
|     url(r'customers/', views.CompanyIndex.as_view(), name='customer-index'), | ||||
|     re_path(r'suppliers/', views.CompanyIndex.as_view(), name='supplier-index'), | ||||
|     re_path(r'manufacturers/', views.CompanyIndex.as_view(), name='manufacturer-index'), | ||||
|     re_path(r'customers/', views.CompanyIndex.as_view(), name='customer-index'), | ||||
|  | ||||
|     # Redirect any other patterns to the 'company' index which displays all companies | ||||
|     url(r'^.*$', views.CompanyIndex.as_view(), name='company-index'), | ||||
|     re_path(r'^.*$', views.CompanyIndex.as_view(), name='company-index'), | ||||
| ] | ||||
|  | ||||
| manufacturer_part_urls = [ | ||||
|  | ||||
|     url(r'^(?P<pk>\d+)/', views.ManufacturerPartDetail.as_view(template_name='company/manufacturer_part.html'), name='manufacturer-part-detail'), | ||||
|     re_path(r'^(?P<pk>\d+)/', views.ManufacturerPartDetail.as_view(template_name='company/manufacturer_part.html'), name='manufacturer-part-detail'), | ||||
| ] | ||||
|  | ||||
| supplier_part_urls = [ | ||||
|     url(r'^(?P<pk>\d+)/', views.SupplierPartDetail.as_view(template_name='company/supplier_part.html'), name='supplier-part-detail'), | ||||
|     re_path(r'^(?P<pk>\d+)/', views.SupplierPartDetail.as_view(template_name='company/supplier_part.html'), name='supplier-part-detail'), | ||||
| ] | ||||
|   | ||||
| @@ -6,7 +6,7 @@ Django views for interacting with Company app | ||||
| # -*- coding: utf-8 -*- | ||||
| from __future__ import unicode_literals | ||||
|  | ||||
| from django.utils.translation import ugettext_lazy as _ | ||||
| from django.utils.translation import gettext_lazy as _ | ||||
| from django.views.generic import DetailView, ListView | ||||
|  | ||||
| from django.urls import reverse | ||||
|   | ||||
		Reference in New Issue
	
	Block a user