GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Notes have disappeared from Sales|Purchase Order API listing, but not individual page · Issue #8672 · inventree/InvenTree Closed as not planned Closed as not planned Copy link DescriptionPlease verify that this bug has NOT been raised before.
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 ReproduceThe error appears when using the demo also. Using the python API wrapper: >>> 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 >>> 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:
Getting directly from the API at [ ... { "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 {
"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: For Expected behaviourThe information should be the same, regardless of method used. Deployment Method
Version InformationDemo server, Version Information:InvenTree-Version: 0.17.0 dev Database: postgresql Active plugins: False Please verify if you can reproduce this bug on the demo site.
Relevant log outputActivity
|
| 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. |