Issues originating due to sql_mode='STRICT_ALL_TABLES'

Fixes frappe/frappe-bench#18
Merge pull request #1883 from anandpdoshi/anand-july-3

Issues originating due to sql_mode='STRICT_ALL_TABLES'