GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Notes have disappeared from Sales|Purchase Order API listing, but not individual page · Issue #8672 · inventree/InvenTree

Notes have disappeared from Sales|Purchase Order API listing, but not individual page #8672

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
Notes have disappeared from Sales|Purchase Order API listing, but not individual page#8672
Copy link
Labels
bugIdentifies a bug which needs to be addressedinactiveIndicates lack of activityquestionThis is a question

Description

@miggland
miggland
opened on Dec 16, 2024
Issue body actions

Please verify that this bug has NOT been raised before.

  • I checked and didn't find a similar issue

Describe the bug*

I have not been using InvenTree too much the last few months, but now one of my scripts interacting with the API has failed with a new error, which has not present last time I ran it. Unfortunately, I can't determine on which last version I last ran the script successfully.

Steps to Reproduce

The error appears when using the demo also. Using the python API wrapper:
(I added the note to the SalesOrder with pk=11 in the demo server).

>>> so = SalesOrder(api, pk=11)
>>> so.notes
'This order has notes'
>>> so.reference
'SO0025'
>>> so_alt = SalesOrder.list(api, reference=so.reference)[0]
>>> so_alt.reference
'SO0025'
>>> so_alt.notes
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/martin/repos/inventree-forks/inventree-python/inventree/base.py", line 353, in __getattr__
    return super().__getattribute__(name)
AttributeError: 'SalesOrder' object has no attribute 'notes'

With PurchaseOrder, the same thing happens:

>>> po = PurchaseOrder(api, pk=12)
>>> po.notes
"Don't forget to send them an invoice!\n\n### Important Order Information:\n\n`This supplier does not accept money as payment - only barter in kind. Last time we placed an order, we paid with seventeen ducklings. The supplier has indicated that they still are in possession of a suffient quantity of ducklings. A new type of payment must be determined.`"
>>> po.reference
'PO0012'
>>> po_alt = PurchaseOrder.list(api, reference=po.reference)[0]
>>> po_alt.notes
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/martin/repos/inventree-forks/inventree-python/inventree/base.py", line 353, in __getattr__
    return super().__getattribute__(name)
AttributeError: 'PurchaseOrder' object has no attribute 'notes'

As you see:

  1. The note is available when getting a SalesOrder or PurchaseOrder by pk.
  2. The note is not available when getting a SalesOrder or PurchaseOrder through the list() method.

Getting directly from the API at https://demo.inventree.org/api/order/so/:

[
  ...
  {
    "pk": 11,
    "creation_date": "2024-11-08",
    "target_date": "2025-02-20",
    "description": "Another order for widgets",
    "line_items": 2,
    "completed_lines": 0,
    "link": "",
    "project_code": 5,
    "project_code_label": "PRO-ZEN",
    "project_code_detail": {
      "pk": 5,
      "code": "PRO-ZEN",
      "description": "Project Zenith",
      "responsible": null,
      "responsible_detail": null
    },
    "reference": "SO0025",
    "responsible": null,
    "responsible_detail": null,
    "contact": null,
    "contact_detail": null,
    "address": null,
    "address_detail": null,
    "status": 15,
    "status_text": "In Progress",
    "status_custom_key": 15,
    "barcode_hash": "",
    "overdue": false,
    "customer": 34,
    "customer_reference": "CE-1234-XYZ",
    "shipment_date": null,
    "total_price": "739.800000",
    "order_currency": "CNY",
    "shipments_count": 2,
    "completed_shipments_count": 0
  },
...
]

Getting from https://demo.inventree.org/api/order/so/11/:

{
  "pk": 11,
  "creation_date": "2024-11-08",
  "target_date": "2025-02-20",
  "description": "Another order for widgets",
  "line_items": 2,
  "completed_lines": 0,
  "link": "",
  "project_code": 5,
  "project_code_label": "PRO-ZEN",
  "project_code_detail": {
    "pk": 5,
    "code": "PRO-ZEN",
    "description": "Project Zenith",
    "responsible": null,
    "responsible_detail": null
  },
  "reference": "SO0025",
  "responsible": null,
  "responsible_detail": null,
  "contact": null,
  "contact_detail": null,
  "address": null,
  "address_detail": null,
  "status": 15,
  "status_text": "In Progress",
  "status_custom_key": 15,
  "notes": "This order has notes",
  "barcode_hash": "",
  "overdue": false,
  "customer": 34,
  "customer_reference": "CE-1234-XYZ",
  "shipment_date": null,
  "total_price": "739.800000",
  "order_currency": "CNY",
  "shipments_count": 2,
  "completed_shipments_count": 0
}

A diff:

$ diff so_fromlist.txt so_frompk.txt 
27a28
> "notes": "This order has notes",

For PurchaseOrder, same story.

Expected behaviour

The information should be the same, regardless of method used.

Deployment Method

  • Docker
  • Package
  • Bare metal
  • Other - added info in Steps to Reproduce

Version Information

Demo server,

Version Information:

InvenTree-Version: 0.17.0 dev
Django Version: 4.2.17
Commit Hash: 88ab593
Commit Date: 16-12-2024

Database: postgresql
Debug-Mode: False
Deployed using Docker: True
Platform: Linux-5.15.0-100-generic-x86_64-with
Installer: DOC

Active plugins: False

Please verify if you can reproduce this bug on the demo site.

  • I can reproduce this bug on the demo site.

Relevant log output

Activity

  1. miggland
    added
    bugIdentifies a bug which needs to be addressed
    questionThis is a question
    triage:not-checkedItem was not checked by the core team
    on Dec 16, 2024
  2. github-actions commented on Feb 15, 2025

    @github-actions
    github-actionsBot
    on Feb 15, 2025 – with GitHub Actions
    Contributor
    More actions

    This issue seems stale. Please react to show this is still important.

  3. github-actions
    added
    inactiveIndicates lack of activity
    on Feb 15, 2025
  4. github-actions
    closed this as not plannedon Feb 22, 2025
  5. matmair
    removed
    triage:not-checkedItem was not checked by the core team
    on Sep 28, 2025
  6. JJSteh commented on Jan 6, 2026

    @JJSteh
    JJSteh
    on Jan 6, 2026
    More actions

    I currently have this issue as well.

    InvenTree-Version: 1.1.7
    Django Version: 4.2.26
    Commit Hash: 2f9cf5f
    Commit Date: 2025-12-17
    Commit Branch: null
    Database: django.db.backends.postgresql
    Debug-Mode: False
    Deployed using Docker: True
    Platform: Linux-6.12.57+deb13-amd64-x86_64-with-glibc2.41
    Installer: DOC

  7. SchrodingersGat commented on Jan 17, 2026

    @SchrodingersGat
    SchrodingersGat
    on Jan 17, 2026
    Member
    More actions

    As the "notes" fields can be rather large markdown text, they do not appear in the "list" views, and are only returned for detail views.

    This is done to reduce network overhead / query time. And, given that the "notes" field is only accessed in the detail page of the UI it seems a reasonable compromise.

    May I ask what is the exact issue you are experiencing - why you need the notes field in the LIST API endpoint?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIdentifies a bug which needs to be addressedinactiveIndicates lack of activityquestionThis is a question

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.