python 3 fix (#13127)

This commit is contained in:
Faris Ansari 2018-02-28 12:53:34 +05:30 committed by GitHub
parent 11a5f78d3e
commit 72d8509b3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 6 deletions

View File

@ -9,9 +9,9 @@
{% } %}
</h4>
<h5 class="text-center">
{%= dateutil.str_to_user(filters.from_date) %}
{%= frappe.datetime.str_to_user(filters.from_date) %}
{%= __("to") %}
{%= dateutil.str_to_user(filters.to_date) %}
{%= frappe.datetime.str_to_user(filters.to_date) %}
</h5>
<hr>
<table class="table table-bordered">
@ -29,7 +29,7 @@
{% for(var i=0, l=data.length; i<l; i++) { %}
<tr>
{% if(data[i].posting_date) { %}
<td>{%= dateutil.str_to_user(data[i].posting_date) %}</td>
<td>{%= frappe.datetime.str_to_user(data[i].posting_date) %}</td>
<td>{%= data[i].voucher_type %}
<br>{%= data[i].voucher_no %}</td>
<td>
@ -58,7 +58,7 @@
<td style="text-align: right">
{%= data[i].account && format_currency(data[i].credit, filters.presentation_currency) %}
</td>
{% } %}
{% } %}
<td style="text-align: right">
{%= format_currency(data[i].balance, filters.presentation_currency) %}
</td>
@ -66,4 +66,4 @@
{% } %}
</tbody>
</table>
<p class="text-right text-muted">Printed On {%= dateutil.str_to_user(dateutil.get_datetime_as_string()) %}</p>
<p class="text-right text-muted">Printed On {%= frappe.datetime.str_to_user(frappe.datetime.get_datetime_as_string()) %}</p>

View File

@ -50,7 +50,7 @@ class Task(NestedSet):
clear(self.doctype, self.name)
def validate_progress(self):
if self.progress > 100:
if (self.progress or 0) > 100:
frappe.throw(_("Progress % for a task cannot be more than 100."))
def update_depends_on(self):