Hi,
I recently added a field to the “Purchase Receipt Item” form to include the field from the linked child table Batch. the reason, I need to print receipt labels that include the expiry_date field.
I added a new filed to the above form and used the “Fetch From” function in the new field to return the date from the Batch Child Table (see below).
Once I rebooted the server the field is now visible on “new” receipts. However, the receipt will no longer save. And I get the above subject error. Before I added the new field the Purchase receipts were working perfectly fine. And opening previously saved receipts does not contain the new Expiry Date field.
Here is the last server error file:
[ERROR] 2021-03-30 19:53:45,300 | /home/frappe/frappe-bench/apps/frappe/frappe/app.py:
Site: site1.local
Form Dict: {
“action”: “Save”,
“cmd”: “frappe.desk.form.save.savedocs”,
“doc”: "{"owner":"****@********.com","idx":0,"docstatus":0,"naming_series":"MAT-PRE-.YYYY.-","supplier":"Alchem, Inc.","supplier_name"
}
Request Error
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 67, in application
response = frappe.api.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/api.py”, line 59, in handle
return frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 24, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 64, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1074, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 21, in savedocs
doc.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 273, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 296, in _save
self.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 224, in insert
self._validate_links()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 759, in _validate_links
result = d.get_invalid_links(is_submittable=self.meta.is_submittable)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 479, in get_invalid_links
‘name’, cache=True))
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 401, in get_value
order_by, cache=cache)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 445, in get_values
out = self._get_values_from_table(fields, filters, doctype, as_dict, debug, order_by, update)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 586, in _get_values_from_table
conditions, values = self.build_conditions(filters)
File “/home/frappe/frappe-bench/apps/frappe/frappe/database/database.py”, line 364, in build_conditions
for f in filters:
TypeError: ‘datetime.date’ object is not iterable
[ERROR] 2021-03-30 19:53:45,563 | /home/frappe/frappe-bench/apps/frappe/frappe/utils/error.py:
New Exception collected with id: 2021-03-30 19:53:45.302982-192.168.1.1-ef8
Can someone please point me to a possible solution?