Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Remove create_order_note from model
Jon Lawrence413357105c20
diff --git a/saleor/checkout/core.py b/saleor/checkout/core.pyindex f32a4a16ce..db9a72428f 100644--- a/saleor/checkout/core.py+++ b/saleor/checkout/core.py@@ -342,7 +342,7 @@ class Checkout:increase_voucher_usage(voucher)if self.note is not None:- order.create_order_note(note=self.note, user=self.user) # add a note from the user to the order+ order.notes.create(user=self.user, content=self.note)return orderdiff --git a/saleor/checkout/forms.py b/saleor/checkout/forms.pyindex 3d0ce1a7d0..27744ed04e 100644--- a/saleor/checkout/forms.py+++ b/saleor/checkout/forms.py@@ -118,5 +118,5 @@ class AnonymousUserBillingForm(forms.Form):class NoteForm(forms.Form):""" Form to add a note to an order as it is created for shop staff to see """- note = forms.CharField(widget=forms.Textarea, max_length=250, required=False)+ note = forms.CharField(max_length=250, required=False)diff --git a/saleor/checkout/views/summary.py b/saleor/checkout/views/summary.pyindex f105ff949b..8506bb79a5 100644--- a/saleor/checkout/views/summary.py+++ b/saleor/checkout/views/summary.py@@ -6,7 +6,7 @@ from satchless.item import InsufficientStockfrom ..forms import (AnonymousUserBillingForm, BillingAddressesForm,- BillingWithoutShippingAddressForm)+ BillingWithoutShippingAddressForm, NoteForm)from ...userprofile.forms import get_address_formfrom ...userprofile.models import Addressfrom ...order import OrderStatusdiff --git a/saleor/order/models.py b/saleor/order/models.pyindex a5469ac87c..6bb9f10666 100644--- a/saleor/order/models.py+++ b/saleor/order/models.py@@ -151,10 +151,6 @@ class Order(models.Model, ItemSet):status = self.statusself.history.create(status=status, comment=comment, user=user)- def create_order_note(self, note='', user=None):- if note != '':- self.notes.create(user=user, content=note)-def is_shipping_required(self):return any(group.is_shipping_required() for group in self.groups.all())diff --git a/templates/checkout/summary.html b/templates/checkout/summary.htmlindex d4943119a3..f6894a0f24 100644--- a/templates/checkout/summary.html+++ b/templates/checkout/summary.html@@ -1,5 +1,6 @@{% extends "checkout/details.html" %}{% load i18n %}+{% load bootstrap_form from bootstrap3 %}{% block forms %}<form method="post" novalidate>