mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 11:19:09 +00:00
[fix] Codacy issue
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on('Chapter', {
|
frappe.ui.form.on('Chapter', {
|
||||||
refresh: function(frm) {
|
refresh: function() {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -5,20 +5,11 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
from frappe.website.website_generator import WebsiteGenerator
|
from frappe.website.website_generator import WebsiteGenerator
|
||||||
from frappe.model.document import Document
|
|
||||||
from frappe import _
|
|
||||||
|
|
||||||
class Chapter(WebsiteGenerator):
|
class Chapter(WebsiteGenerator):
|
||||||
def get_context(self, context):
|
def get_context(self, context):
|
||||||
context.no_cache = True
|
context.no_cache = True
|
||||||
|
|
||||||
def validate(self):
|
|
||||||
chapter_head = self.chapter_head
|
|
||||||
chapter = frappe.get_all('Chapter', filters={'published': True}, fields=['chapter_head'])
|
|
||||||
|
|
||||||
# if chapter_head in [d.chapter_head for d in chapter]:
|
|
||||||
# frappe.throw(_('You are not allow to create more than one Chapter'))
|
|
||||||
|
|
||||||
def enable(self):
|
def enable(self):
|
||||||
chapter = frappe.get_doc('Chapter', frappe.form_dict.name)
|
chapter = frappe.get_doc('Chapter', frappe.form_dict.name)
|
||||||
chapter.append('members', dict(enable=self.value))
|
chapter.append('members', dict(enable=self.value))
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
# See license.txt
|
# See license.txt
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
class TestChapter(unittest.TestCase):
|
class TestChapter(unittest.TestCase):
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
class ChapterMember(Document):
|
class ChapterMember(Document):
|
||||||
|
|||||||
@@ -3,10 +3,8 @@
|
|||||||
|
|
||||||
frappe.ui.form.on('Chapter Message', {
|
frappe.ui.form.on('Chapter Message', {
|
||||||
onload: function(frm){
|
onload: function(frm){
|
||||||
console.log("here" + frappe.session.user)
|
frappe.db.get_value('Chapter', {chapter_head: frappe.session.user}, 'name', function(data) {
|
||||||
chapter_head = frappe.session.user
|
frm.set_value('chapter', data.name);
|
||||||
frappe.db.get_value('Chapter', {chapter_head: chapter_head}, 'name', function(data) {
|
});
|
||||||
frm.set_value('chapter', data.name);
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
frappe.ui.form.on('Donor', {
|
frappe.ui.form.on('Donor', {
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
frappe.dynamic_link = {doc: frm.doc, fieldname: 'name', doctype: 'Donor'}
|
frappe.dynamic_link = {doc: frm.doc, fieldname: 'name', doctype: 'Donor'};
|
||||||
|
|
||||||
frm.toggle_display(['address_html','contact_html'], !frm.doc.__islocal);
|
frm.toggle_display(['address_html','contact_html'], !frm.doc.__islocal);
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,8 @@
|
|||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from frappe.contacts.address_and_contact import load_address_and_contact, delete_contact_and_address
|
from frappe.contacts.address_and_contact import load_address_and_contact
|
||||||
|
|
||||||
class Donor(Document):
|
class Donor(Document):
|
||||||
def onload(self):
|
def onload(self):
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
# See license.txt
|
# See license.txt
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
class TestDonor(unittest.TestCase):
|
class TestDonor(unittest.TestCase):
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on('Donor Type', {
|
frappe.ui.form.on('Donor Type', {
|
||||||
refresh: function(frm) {
|
refresh: function() {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
class DonorType(Document):
|
class DonorType(Document):
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# See license.txt
|
# See license.txt
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
class TestDonorType(unittest.TestCase):
|
class TestDonorType(unittest.TestCase):
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
frappe.ui.form.on('Grant Application', {
|
frappe.ui.form.on('Grant Application', {
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
frappe.dynamic_link = {doc: frm.doc, fieldname: 'name', doctype: 'Grant Application'}
|
frappe.dynamic_link = {doc: frm.doc, fieldname: 'name', doctype: 'Grant Application'};
|
||||||
|
|
||||||
frm.toggle_display(['address_html','contact_html'], !frm.doc.__islocal);
|
frm.toggle_display(['address_html','contact_html'], !frm.doc.__islocal);
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from frappe.contacts.address_and_contact import load_address_and_contact, delete_contact_and_address
|
from frappe.contacts.address_and_contact import load_address_and_contact
|
||||||
|
|
||||||
class GrantApplication(Document):
|
class GrantApplication(Document):
|
||||||
def onload(self):
|
def onload(self):
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
frappe.listview_settings['Grant Application'] = {
|
frappe.listview_settings['Grant Application'] = {
|
||||||
add_fields: ["grant_application_name", "image"],
|
add_fields: ["grant_application_name", "image"],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
# See license.txt
|
# See license.txt
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
class TestGrantApplication(unittest.TestCase):
|
class TestGrantApplication(unittest.TestCase):
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
frappe.ui.form.on('Member', {
|
frappe.ui.form.on('Member', {
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
|
|
||||||
frappe.dynamic_link = {doc: frm.doc, fieldname: 'name', doctype: 'Member'}
|
frappe.dynamic_link = {doc: frm.doc, fieldname: 'name', doctype: 'Member'};
|
||||||
|
|
||||||
frm.toggle_display(['address_html','contact_html'], !frm.doc.__islocal);
|
frm.toggle_display(['address_html','contact_html'], !frm.doc.__islocal);
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,8 @@
|
|||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from frappe.contacts.address_and_contact import load_address_and_contact, delete_contact_and_address
|
from frappe.contacts.address_and_contact import load_address_and_contact
|
||||||
|
|
||||||
class Member(Document):
|
class Member(Document):
|
||||||
def onload(self):
|
def onload(self):
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
frappe.listview_settings['Member'] = {
|
frappe.listview_settings['Member'] = {
|
||||||
add_fields: ["member_name", "member_type", "image"],
|
add_fields: ["member_name", "member_type", "image"],
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
# See license.txt
|
# See license.txt
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
class TestMember(unittest.TestCase):
|
class TestMember(unittest.TestCase):
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
# See license.txt
|
# See license.txt
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
class TestMembership(unittest.TestCase):
|
class TestMembership(unittest.TestCase):
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on('Membership Type', {
|
frappe.ui.form.on('Membership Type', {
|
||||||
refresh: function(frm) {
|
refresh: function() {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
# See license.txt
|
# See license.txt
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
class TestMembershipType(unittest.TestCase):
|
class TestMembershipType(unittest.TestCase):
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
# See license.txt
|
# See license.txt
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
class TestVolunteer(unittest.TestCase):
|
class TestVolunteer(unittest.TestCase):
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
frappe.ui.form.on('Volunteer', {
|
frappe.ui.form.on('Volunteer', {
|
||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
|
|
||||||
frappe.dynamic_link = {doc: frm.doc, fieldname: 'name', doctype: 'Volunteer'}
|
frappe.dynamic_link = {doc: frm.doc, fieldname: 'name', doctype: 'Volunteer'};
|
||||||
|
|
||||||
frm.toggle_display(['address_html','contact_html'], !frm.doc.__islocal);
|
frm.toggle_display(['address_html','contact_html'], !frm.doc.__islocal);
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,8 @@
|
|||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
from frappe.contacts.address_and_contact import load_address_and_contact, delete_contact_and_address
|
from frappe.contacts.address_and_contact import load_address_and_contact
|
||||||
|
|
||||||
class Volunteer(Document):
|
class Volunteer(Document):
|
||||||
def onload(self):
|
def onload(self):
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
# See license.txt
|
# See license.txt
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
class TestVolunteerAvailability(unittest.TestCase):
|
class TestVolunteerAvailability(unittest.TestCase):
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on('Volunteer Availability', {
|
frappe.ui.form.on('Volunteer Availability', {
|
||||||
refresh: function(frm) {
|
refresh: function() {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
class VolunteerAvailability(Document):
|
class VolunteerAvailability(Document):
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
class VolunteerSkills(Document):
|
class VolunteerSkills(Document):
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
# See license.txt
|
# See license.txt
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
import frappe
|
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
class TestVolunteerType(unittest.TestCase):
|
class TestVolunteerType(unittest.TestCase):
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
// For license information, please see license.txt
|
// For license information, please see license.txt
|
||||||
|
|
||||||
frappe.ui.form.on('Volunteer Type', {
|
frappe.ui.form.on('Volunteer Type', {
|
||||||
refresh: function(frm) {
|
refresh: function() {
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
# For license information, please see license.txt
|
# For license information, please see license.txt
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
|
||||||
from frappe.model.document import Document
|
from frappe.model.document import Document
|
||||||
|
|
||||||
class VolunteerType(Document):
|
class VolunteerType(Document):
|
||||||
|
|||||||
Reference in New Issue
Block a user