Version 12 Delivery Note error

I have upgraded erpnext from version 11 to 12
and getting following error when i click get item from sales order
ProgrammingError: (1064, u"You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ‘CUST-00006’‘) and coalesce(shipping_city, ‘’) in (’‘, ‘‘USA’’) and coalesce(bill’ at line 3")

any ideas what may be the possible cause