J’envoie un PUT
resource/Sales%20Order/C202400271
avec des données
[docstatus] => 1
Ce qui fonctionnait sans problème jusqu’à maintenant
Le SalesOrder est formaté comme d’habitude, la commande se crée, mais impossible de valider le SalesOrder
Depuis quelques jours le site reçoit des erreurs de ce type :
(
[status_code] => 500
[success] =>
[headers] => Array
(
)
[data] =>
[errors] => Array
(
[exception] => TypeError: '>' not supported between instances of 'str' and 'datetime.date'
[exc_type] => TypeError
[_exc_source] => erpnext (app)
[exc] => ["Traceback (most recent call last):\n File \"apps/frappe/frappe/app.py\", line 114, in application\n response = frappe.api.handle(request)\n File \"apps/frappe/frappe/api/__init__.py\", line 49, in handle\n data = endpoint(**arguments)\n File \"apps/frappe/frappe/api/v1.py\", line 53, in update_doc\n doc.save()\n File \"apps/frappe/frappe/model/document.py\", line 338, in save\n return self._save(*args, **kwargs)\n File \"apps/frappe/frappe/model/document.py\", line 374, in _save\n self.run_before_save_methods()\n File \"apps/frappe/frappe/model/document.py\", line 1139, in run_before_save_methods\n self.run_method(\"validate\")\n File \"apps/frappe/frappe/model/document.py\", line 1010, in run_method\n out = Document.hook(fn)(self, *args, **kwargs)\n File \"apps/frappe/frappe/model/document.py\", line 1384, in composer\n return composed(self, method, *args, **kwargs)\n File \"apps/frappe/frappe/model/document.py\", line 1366, in runner\n add_to_return_value(self, fn(self, *args, **kwargs))\n File \"apps/frappe/frappe/model/document.py\", line 1007, in fn\n return method_object(*args, **kwargs)\n File \"apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py\", line 210, in validate\n self.validate_delivery_date()\n File \"apps/erpnext/erpnext/selling/doctype/sales_order/sales_order.py\", line 327, in validate_delivery_date\n max_delivery_date = max(delivery_date_list) if delivery_date_list else None\nTypeError: '>' not supported between instances of 'str' and 'datetime.date'\n"]
)
[content_type:protected] => application/json
)