I have added a custom docfield, type “Data”, to the Sales Order doctype. I have checked “Is Virtual”, “In List View” and “Read Only” (just in case it is required). In the “Options” field, I have put a simple line of code: “frappe.utils.now_datetime() - self.creation”
This is the code used in the documentation example.
When I navigate to the Sales Order List View, I get the error: ‘pymysql.err.OperationalError: (1054, “Unknown column ‘tabSales Order.carrier’ in ‘field list’”)’
I have tried the other documented method of extending the SalesOrder class through hooks.py but I get the same result.
Is a virtual field expected to be visible in the List View?
Thank you, avc!
I’ve already customised the list view indicator and added a button. I had completely missed the formatters. I think that should work for what I want to do. I should have asked my second question in a separate post because now I cannot mark your answer as the solution when ankush provided the solution to the original question.