From 9d8ef5adbe4211c37bdbe9c9761b78cb998d1446 Mon Sep 17 00:00:00 2001
From: Vishal
Date: Mon, 9 Oct 2017 15:31:52 +0530
Subject: [PATCH] [new] Fixed Bounty Creation Issue
---
.../doctype/bounty/bounty.py | 5 +++--
.../doctype/bounty/templates/bounty.html | 1 +
.../doctype/bounty/templates/bounty_row.html | 21 +++++++++----------
3 files changed, 14 insertions(+), 13 deletions(-)
diff --git a/foundation/erpnext_foundation/doctype/bounty/bounty.py b/foundation/erpnext_foundation/doctype/bounty/bounty.py
index 9e2b8d6b..423c5114 100644
--- a/foundation/erpnext_foundation/doctype/bounty/bounty.py
+++ b/foundation/erpnext_foundation/doctype/bounty/bounty.py
@@ -37,6 +37,7 @@ class Bounty(WebsiteGenerator):
context.comment_list = get_comment_list(self.doctype, self.name)
context.can_edit = can_edit
+
def validate(self):
from frappe.utils.user import get_user_fullname
@@ -70,14 +71,14 @@ def get_list_context(context):
context.introduction = '''
'''
context.list_footer = '''
Bounty FAQ
'''
context.fmt_money = fmt_money
- context.get_paid_backers = get_paid_backers
+
def get_paid_backers(backers):
return [backer for backer in backers if backer.paid]
\ No newline at end of file
diff --git a/foundation/erpnext_foundation/doctype/bounty/templates/bounty.html b/foundation/erpnext_foundation/doctype/bounty/templates/bounty.html
index 36a25dc0..500bf36a 100644
--- a/foundation/erpnext_foundation/doctype/bounty/templates/bounty.html
+++ b/foundation/erpnext_foundation/doctype/bounty/templates/bounty.html
@@ -107,6 +107,7 @@
About this feature
{{doc.description}}
+ Created by {{doc.owner}}
Bounties FAQ
diff --git a/foundation/erpnext_foundation/doctype/bounty/templates/bounty_row.html b/foundation/erpnext_foundation/doctype/bounty/templates/bounty_row.html
index 04b90e94..94fc47de 100644
--- a/foundation/erpnext_foundation/doctype/bounty/templates/bounty_row.html
+++ b/foundation/erpnext_foundation/doctype/bounty/templates/bounty_row.html
@@ -13,19 +13,18 @@
{{ fmt_money(doc.goal, currency="USD") }}
{% if comments %}
- {{ comments }}
+ {{ comments }}
{% endif %}
- {% set paid_backers = get_paid_backers(doc.bounty_backer) %}
{% if paid_backers|len > 0 %}
-
- {{ paid_backers|len }}
- {% if paid_backers|len > 1 %}
- Backers
- {% else %}
- Backer
- {% endif %}
-
+
+ {{ paid_backers|len }}
+ {% if paid_backers|len > 1 %}
+ Backers
+ {% else %}
+ Backer
+ {% endif %}
+
{% endif %}
{{ html2text(doc.description[:200]) }}{% if doc.description|len > 200 %}...{% endif %}