diff --git a/foundation/erpnext_foundation/doctype/bounty/__init__.py b/foundation/erpnext_foundation/doctype/bounty/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/foundation/erpnext_foundation/doctype/bounty/bounty.js b/foundation/erpnext_foundation/doctype/bounty/bounty.js new file mode 100644 index 00000000..a0f97067 --- /dev/null +++ b/foundation/erpnext_foundation/doctype/bounty/bounty.js @@ -0,0 +1,8 @@ +// Copyright (c) 2017, EOSSF and contributors +// For license information, please see license.txt + +frappe.ui.form.on('Bounty', { + refresh: function(frm) { + + } +}); diff --git a/foundation/erpnext_foundation/doctype/bounty/bounty.json b/foundation/erpnext_foundation/doctype/bounty/bounty.json new file mode 100644 index 00000000..db9fc002 --- /dev/null +++ b/foundation/erpnext_foundation/doctype/bounty/bounty.json @@ -0,0 +1,425 @@ +{ + "allow_copy": 0, + "allow_guest_to_view": 1, + "allow_import": 0, + "allow_rename": 0, + "autoname": "BOUNTY.#####", + "beta": 1, + "creation": "2017-08-17 14:43:33.903126", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "", + "editable_grid": 1, + "engine": "InnoDB", + "fields": [ + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 1, + "collapsible": 0, + "columns": 0, + "fieldname": "feature_name", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 1, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Feature Name", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "github_issue", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "GitHub Issue", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "column_break_3", + "fieldtype": "Column Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "goal", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Goal", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 1, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "end_date", + "fieldtype": "Date", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "End Date", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "section_break_4", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "description", + "fieldtype": "Text Editor", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Description", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "section_break_6", + "fieldtype": "Section Break", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Backers", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "bounty_backer", + "fieldtype": "Table", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Bounty Backer", + "length": 0, + "no_copy": 0, + "options": "Bounty Backer", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "published", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Published", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "route", + "fieldtype": "Data", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Route", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "bounty_collected", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Bounty Collected", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + } + ], + "has_web_view": 1, + "hide_heading": 0, + "hide_toolbar": 0, + "idx": 0, + "image_view": 0, + "in_create": 0, + "is_published_field": "published", + "is_submittable": 0, + "issingle": 0, + "istable": 0, + "max_attachments": 0, + "modified": "2017-08-17 15:47:24.234653", + "modified_by": "Administrator", + "module": "ERPNext Foundation", + "name": "Bounty", + "name_case": "", + "owner": "Administrator", + "permissions": [ + { + "amend": 0, + "apply_user_permissions": 0, + "cancel": 0, + "create": 1, + "delete": 1, + "email": 1, + "export": 1, + "if_owner": 0, + "import": 0, + "permlevel": 0, + "print": 1, + "read": 1, + "report": 1, + "role": "System Manager", + "set_user_permissions": 0, + "share": 1, + "submit": 0, + "write": 1 + } + ], + "quick_entry": 0, + "read_only": 0, + "read_only_onload": 0, + "route": "bounty", + "show_name_in_global_search": 0, + "sort_field": "modified", + "sort_order": "DESC", + "title_field": "feature_name", + "track_changes": 1, + "track_seen": 0 +} \ No newline at end of file diff --git a/foundation/erpnext_foundation/doctype/bounty/bounty.py b/foundation/erpnext_foundation/doctype/bounty/bounty.py new file mode 100644 index 00000000..ada515e1 --- /dev/null +++ b/foundation/erpnext_foundation/doctype/bounty/bounty.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2017, EOSSF and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +import frappe +from frappe.website.website_generator import WebsiteGenerator +from frappe.website.utils import get_comment_list + +class Bounty(WebsiteGenerator): + def get_context(self, context): + context.no_cache = True + + def validate(self): + self.bounty_collected = sum([backer.amount for backer in self.bounty_backer if backer.paid]) + +def get_list_context(context): + context.allow_guest = True + context.no_cache = True + context.title = 'ERPNext Bounties' + context.no_breadcrumbs = True + context.order_by = 'creation desc' + context.introduction = '

ERPNext feature requests

' diff --git a/foundation/erpnext_foundation/doctype/bounty/templates/bounty.html b/foundation/erpnext_foundation/doctype/bounty/templates/bounty.html new file mode 100644 index 00000000..975ff35a --- /dev/null +++ b/foundation/erpnext_foundation/doctype/bounty/templates/bounty.html @@ -0,0 +1,27 @@ +{% extends "templates/web.html" %} + +{% block page_content %} +

{{ title }}

+{% set bounty_progress = ((doc.bounty_collected/doc.goal)*100) %} +
+
+ {{ doc.bounty_collected }} of {{ doc.goal }} +
+
+

+

{{ frappe.utils.fmt_money(doc.bounty_collected, currency="USD") }} + of {{ frappe.utils.fmt_money(doc.goal, currency="USD") }} + +

+

+

{{ doc.end_date }}

+ +Back this bounty + +

Discuss

+{% include 'templates/includes/comments/comments.html' %} + +{% endblock %} + + \ No newline at end of file diff --git a/foundation/erpnext_foundation/doctype/bounty/templates/bounty_row.html b/foundation/erpnext_foundation/doctype/bounty/templates/bounty_row.html new file mode 100644 index 00000000..c42a7bdf --- /dev/null +++ b/foundation/erpnext_foundation/doctype/bounty/templates/bounty_row.html @@ -0,0 +1,11 @@ +
+ +

{{ doc.feature_name }}

+

+ {{ frappe.format(doc.goal) }} + {{ doc.end_date }} + {{ doc.bounty_backer }} Backers +

+

{{ html2text(doc.description[:200]) }}{% if doc.description|len > 200 %}...{% endif %}

+
+
\ No newline at end of file diff --git a/foundation/erpnext_foundation/doctype/bounty/test_bounty.js b/foundation/erpnext_foundation/doctype/bounty/test_bounty.js new file mode 100644 index 00000000..6b429b96 --- /dev/null +++ b/foundation/erpnext_foundation/doctype/bounty/test_bounty.js @@ -0,0 +1,23 @@ +/* eslint-disable */ +// rename this file from _test_[name] to test_[name] to activate +// and remove above this line + +QUnit.test("test: Bounty", function (assert) { + let done = assert.async(); + + // number of asserts + assert.expect(1); + + frappe.run_serially([ + // insert a new Bounty + () => frappe.tests.make('Bounty', [ + // values to be set + {key: 'value'} + ]), + () => { + assert.equal(cur_frm.doc.key, 'value'); + }, + () => done() + ]); + +}); diff --git a/foundation/erpnext_foundation/doctype/bounty/test_bounty.py b/foundation/erpnext_foundation/doctype/bounty/test_bounty.py new file mode 100644 index 00000000..0f925c53 --- /dev/null +++ b/foundation/erpnext_foundation/doctype/bounty/test_bounty.py @@ -0,0 +1,10 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2017, EOSSF and Contributors +# See license.txt +from __future__ import unicode_literals + +import frappe +import unittest + +class TestBounty(unittest.TestCase): + pass diff --git a/foundation/erpnext_foundation/doctype/bounty_backer/__init__.py b/foundation/erpnext_foundation/doctype/bounty_backer/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/foundation/erpnext_foundation/doctype/bounty_backer/bounty_backer.json b/foundation/erpnext_foundation/doctype/bounty_backer/bounty_backer.json new file mode 100644 index 00000000..eb559d5e --- /dev/null +++ b/foundation/erpnext_foundation/doctype/bounty_backer/bounty_backer.json @@ -0,0 +1,193 @@ +{ + "allow_copy": 0, + "allow_guest_to_view": 0, + "allow_import": 0, + "allow_rename": 0, + "beta": 0, + "creation": "2017-08-17 14:46:40.983106", + "custom": 0, + "docstatus": 0, + "doctype": "DocType", + "document_type": "", + "editable_grid": 1, + "engine": "InnoDB", + "fields": [ + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "user", + "fieldtype": "Link", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "User", + "length": 0, + "no_copy": 0, + "options": "User", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "full_name", + "fieldtype": "Read Only", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Full Name", + "length": 0, + "no_copy": 0, + "options": "", + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "amount", + "fieldtype": "Currency", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Amount", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "paid", + "fieldtype": "Check", + "hidden": 0, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 1, + "in_standard_filter": 0, + "label": "Paid", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + }, + { + "allow_bulk_edit": 0, + "allow_on_submit": 0, + "bold": 0, + "collapsible": 0, + "columns": 0, + "fieldname": "bounty_name", + "fieldtype": "Read Only", + "hidden": 1, + "ignore_user_permissions": 0, + "ignore_xss_filter": 0, + "in_filter": 0, + "in_global_search": 0, + "in_list_view": 0, + "in_standard_filter": 0, + "label": "Bounty Name", + "length": 0, + "no_copy": 0, + "permlevel": 0, + "precision": "", + "print_hide": 0, + "print_hide_if_no_value": 0, + "read_only": 0, + "remember_last_selected_value": 0, + "report_hide": 0, + "reqd": 0, + "search_index": 0, + "set_only_once": 0, + "unique": 0 + } + ], + "has_web_view": 0, + "hide_heading": 0, + "hide_toolbar": 0, + "idx": 0, + "image_view": 0, + "in_create": 0, + "is_submittable": 0, + "issingle": 0, + "istable": 1, + "max_attachments": 0, + "modified": "2017-08-17 17:26:35.968048", + "modified_by": "faris@erpnext.com", + "module": "ERPNext Foundation", + "name": "Bounty Backer", + "name_case": "", + "owner": "Administrator", + "permissions": [], + "quick_entry": 1, + "read_only": 0, + "read_only_onload": 0, + "show_name_in_global_search": 0, + "sort_field": "modified", + "sort_order": "DESC", + "track_changes": 1, + "track_seen": 0 +} \ No newline at end of file diff --git a/foundation/erpnext_foundation/doctype/bounty_backer/bounty_backer.py b/foundation/erpnext_foundation/doctype/bounty_backer/bounty_backer.py new file mode 100644 index 00000000..526858a8 --- /dev/null +++ b/foundation/erpnext_foundation/doctype/bounty_backer/bounty_backer.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# Copyright (c) 2017, EOSSF and contributors +# For license information, please see license.txt + +from __future__ import unicode_literals +import frappe +from frappe.model.document import Document + +class BountyBacker(Document): + def validate(self): + self.parenttype = 'Bounty' + self.parentfield = 'bounty_backer' + self.parent = self.bounty_name + + doc = frappe.get_doc('Bounty', self.bounty_name) + self.idx = len(doc.bounty_backer) + + def on_payment_authorized(self, *args, **kwargs): + self.db_set('paid', 1) + doc = frappe.get_doc('Bounty', self.bounty_name) + doc.save() + diff --git a/foundation/erpnext_foundation/web_form/back_this_bounty/__init__.py b/foundation/erpnext_foundation/web_form/back_this_bounty/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/foundation/erpnext_foundation/web_form/back_this_bounty/back_this_bounty.js b/foundation/erpnext_foundation/web_form/back_this_bounty/back_this_bounty.js new file mode 100644 index 00000000..7373ba61 --- /dev/null +++ b/foundation/erpnext_foundation/web_form/back_this_bounty/back_this_bounty.js @@ -0,0 +1,15 @@ +frappe.ready(function() { + var bounty_name = getParameterByName('bounty'); + $('input[data-fieldname="bounty_name"]').val(bounty_name); + $('[data-fieldname="user"]').val(frappe.session.user); + + function getParameterByName(name) { + var url = window.location.href; + name = name.replace(/[\[\]]/g, "\\$&"); + var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), + results = regex.exec(url); + if (!results) return null; + if (!results[2]) return ''; + return decodeURIComponent(results[2].replace(/\+/g, " ")); + } +}) \ No newline at end of file diff --git a/foundation/erpnext_foundation/web_form/back_this_bounty/back_this_bounty.json b/foundation/erpnext_foundation/web_form/back_this_bounty/back_this_bounty.json new file mode 100644 index 00000000..0d9907d8 --- /dev/null +++ b/foundation/erpnext_foundation/web_form/back_this_bounty/back_this_bounty.json @@ -0,0 +1,68 @@ +{ + "accept_payment": 1, + "allow_comments": 0, + "allow_delete": 0, + "allow_edit": 0, + "allow_incomplete": 0, + "allow_multiple": 0, + "allow_print": 0, + "amount": 0.0, + "amount_based_on_field": 1, + "amount_field": "amount", + "creation": "2017-08-17 16:11:44.935590", + "currency": "INR", + "doc_type": "Bounty Backer", + "docstatus": 0, + "doctype": "Web Form", + "idx": 0, + "introduction_text": "", + "is_standard": 1, + "login_required": 1, + "max_attachment_size": 0, + "modified": "2017-08-18 08:18:03.166262", + "modified_by": "faris@erpnext.com", + "module": "ERPNext Foundation", + "name": "back-this-bounty", + "owner": "faris@erpnext.com", + "payment_button_label": "Pay now", + "payment_gateway": "Razorpay", + "published": 1, + "route": "bounty/back-this-bounty", + "show_sidebar": 1, + "sidebar_items": [], + "success_url": "/bounty", + "title": "Back this bounty", + "web_form_fields": [ + { + "fieldname": "bounty_name", + "fieldtype": "Data", + "hidden": 0, + "label": "Bounty Name", + "max_length": 0, + "max_value": 0, + "read_only": 1, + "reqd": 0 + }, + { + "fieldname": "user", + "fieldtype": "Link", + "hidden": 0, + "label": "User", + "max_length": 0, + "max_value": 0, + "options": "User", + "read_only": 1, + "reqd": 0 + }, + { + "fieldname": "amount", + "fieldtype": "Int", + "hidden": 0, + "label": "Amount", + "max_length": 0, + "max_value": 0, + "read_only": 0, + "reqd": 0 + } + ] +} \ No newline at end of file diff --git a/foundation/erpnext_foundation/web_form/back_this_bounty/back_this_bounty.py b/foundation/erpnext_foundation/web_form/back_this_bounty/back_this_bounty.py new file mode 100644 index 00000000..d0064bde --- /dev/null +++ b/foundation/erpnext_foundation/web_form/back_this_bounty/back_this_bounty.py @@ -0,0 +1,8 @@ +from __future__ import unicode_literals + +import frappe + +def get_context(context): + print(context) + context.no_breadcrumbs = 1 + context.user = 'faris@erpnext.com'