Merge branch 'master' into develop
This commit is contained in:
commit
95e6ccd419
@ -2,7 +2,7 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
import frappe
|
import frappe
|
||||||
|
|
||||||
__version__ = '7.1.10'
|
__version__ = '7.1.11'
|
||||||
|
|
||||||
def get_default_company(user=None):
|
def get_default_company(user=None):
|
||||||
'''Get default company for user'''
|
'''Get default company for user'''
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
@ -58,6 +59,7 @@
|
|||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 1,
|
"reqd": 1,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
@ -84,6 +86,7 @@
|
|||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
@ -109,6 +112,7 @@
|
|||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
@ -119,7 +123,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 0,
|
"columns": 2,
|
||||||
"fieldname": "total_amount",
|
"fieldname": "total_amount",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -135,6 +139,7 @@
|
|||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
@ -145,7 +150,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 3,
|
"columns": 2,
|
||||||
"fieldname": "outstanding_amount",
|
"fieldname": "outstanding_amount",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -161,6 +166,7 @@
|
|||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
@ -171,7 +177,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
"columns": 3,
|
"columns": 2,
|
||||||
"fieldname": "allocated_amount",
|
"fieldname": "allocated_amount",
|
||||||
"fieldtype": "Float",
|
"fieldtype": "Float",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -187,6 +193,7 @@
|
|||||||
"print_hide": 0,
|
"print_hide": 0,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
@ -213,6 +220,7 @@
|
|||||||
"print_hide": 1,
|
"print_hide": 1,
|
||||||
"print_hide_if_no_value": 0,
|
"print_hide_if_no_value": 0,
|
||||||
"read_only": 1,
|
"read_only": 1,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
"report_hide": 0,
|
"report_hide": 0,
|
||||||
"reqd": 0,
|
"reqd": 0,
|
||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
@ -230,7 +238,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 1,
|
"istable": 1,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-08-26 01:59:04.697274",
|
"modified": "2016-11-14 12:28:51.822341",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Accounts",
|
"module": "Accounts",
|
||||||
"name": "Payment Entry Reference",
|
"name": "Payment Entry Reference",
|
||||||
|
@ -4,7 +4,6 @@ def get_data():
|
|||||||
return {
|
return {
|
||||||
'fieldname': 'purchase_invoice',
|
'fieldname': 'purchase_invoice',
|
||||||
'non_standard_fieldnames': {
|
'non_standard_fieldnames': {
|
||||||
'Delivery Note': 'against_sales_invoice',
|
|
||||||
'Journal Entry': 'reference_name',
|
'Journal Entry': 'reference_name',
|
||||||
'Payment Entry': 'reference_name',
|
'Payment Entry': 'reference_name',
|
||||||
'Payment Request': 'reference_name',
|
'Payment Request': 'reference_name',
|
||||||
@ -12,8 +11,8 @@ def get_data():
|
|||||||
'Purchase Invoice': 'return_against'
|
'Purchase Invoice': 'return_against'
|
||||||
},
|
},
|
||||||
'internal_links': {
|
'internal_links': {
|
||||||
'Purchase Order': ['items', 'sales_order'],
|
'Purchase Order': ['items', 'purchase_order'],
|
||||||
'Purchase Receipt': ['items', 'delivery_note'],
|
'Purchase Receipt': ['items', 'purchase_receipt'],
|
||||||
},
|
},
|
||||||
'transactions': [
|
'transactions': [
|
||||||
{
|
{
|
||||||
|
@ -88,6 +88,9 @@ class ReceivablePayableReport(object):
|
|||||||
|
|
||||||
future_vouchers = self.get_entries_after(self.filters.report_date, args.get("party_type"))
|
future_vouchers = self.get_entries_after(self.filters.report_date, args.get("party_type"))
|
||||||
|
|
||||||
|
if not self.filters.get("company"):
|
||||||
|
self.filters["company"] = frappe.db.get_single_value('Global Defaults', 'default_company')
|
||||||
|
|
||||||
company_currency = frappe.db.get_value("Company", self.filters.get("company"), "default_currency")
|
company_currency = frappe.db.get_value("Company", self.filters.get("company"), "default_currency")
|
||||||
|
|
||||||
data = []
|
data = []
|
||||||
|
@ -23,20 +23,19 @@ frappe.ui.form.on("Opportunity", {
|
|||||||
refresh: function(frm) {
|
refresh: function(frm) {
|
||||||
var doc = frm.doc;
|
var doc = frm.doc;
|
||||||
frm.events.enquiry_from(frm);
|
frm.events.enquiry_from(frm);
|
||||||
|
|
||||||
if(doc.status!=="Lost") {
|
if(doc.status!=="Lost") {
|
||||||
if(doc.with_items){
|
if(doc.with_items){
|
||||||
frm.add_custom_button(__('Supplier Quotation'),
|
frm.add_custom_button(__('Supplier Quotation'),
|
||||||
function() {
|
function() {
|
||||||
frm.trigger("make_supplier_quotation")
|
frm.trigger("make_supplier_quotation")
|
||||||
}, __("Make"));
|
}, __("Make"));
|
||||||
|
|
||||||
frm.add_custom_button(__('Quotation'),
|
|
||||||
cur_frm.cscript.create_quotation, __("Make"));
|
|
||||||
|
|
||||||
frm.page.set_inner_btn_group_as_primary(__("Make"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
frm.add_custom_button(__('Quotation'),
|
||||||
|
cur_frm.cscript.create_quotation, __("Make"));
|
||||||
|
|
||||||
|
frm.page.set_inner_btn_group_as_primary(__("Make"));
|
||||||
|
|
||||||
if(doc.status!=="Quotation") {
|
if(doc.status!=="Quotation") {
|
||||||
frm.add_custom_button(__('Lost'),
|
frm.add_custom_button(__('Lost'),
|
||||||
cur_frm.cscript['Declare Opportunity Lost']);
|
cur_frm.cscript['Declare Opportunity Lost']);
|
||||||
@ -61,9 +60,10 @@ erpnext.crm.Opportunity = frappe.ui.form.Controller.extend({
|
|||||||
this.frm.doc.enquiry_from = "Lead";
|
this.frm.doc.enquiry_from = "Lead";
|
||||||
|
|
||||||
if(!this.frm.doc.status)
|
if(!this.frm.doc.status)
|
||||||
set_multiple(cdt, cdn, { status:'Draft' });
|
set_multiple(this.frm.doc.doctype, this.frm.doc.name, { status:'Open' });
|
||||||
if(!this.frm.doc.company && frappe.defaults.get_user_default("Company"))
|
if(!this.frm.doc.company && frappe.defaults.get_user_default("Company"))
|
||||||
set_multiple(cdt, cdn, { company:frappe.defaults.get_user_default("Company") });
|
set_multiple(this.frm.doc.doctype, this.frm.doc.name,
|
||||||
|
{ company:frappe.defaults.get_user_default("Company") });
|
||||||
|
|
||||||
this.setup_queries();
|
this.setup_queries();
|
||||||
},
|
},
|
||||||
|
@ -39,6 +39,9 @@ class Opportunity(TransactionBase):
|
|||||||
|
|
||||||
if not self.title:
|
if not self.title:
|
||||||
self.title = self.customer_name
|
self.title = self.customer_name
|
||||||
|
|
||||||
|
if not self.with_items:
|
||||||
|
self.items = []
|
||||||
|
|
||||||
|
|
||||||
def make_new_lead_if_required(self):
|
def make_new_lead_if_required(self):
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"allow_rename": 0,
|
"allow_rename": 1,
|
||||||
"autoname": "field:expense_type",
|
"autoname": "field:expense_type",
|
||||||
"beta": 0,
|
"beta": 0,
|
||||||
"creation": "2012-03-27 14:35:55",
|
"creation": "2012-03-27 14:35:55",
|
||||||
@ -10,11 +10,13 @@
|
|||||||
"doctype": "DocType",
|
"doctype": "DocType",
|
||||||
"document_type": "Setup",
|
"document_type": "Setup",
|
||||||
"editable_grid": 0,
|
"editable_grid": 0,
|
||||||
|
"engine": "InnoDB",
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
"fieldname": "expense_type",
|
"fieldname": "expense_type",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -41,6 +43,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
"fieldname": "description",
|
"fieldname": "description",
|
||||||
"fieldtype": "Small Text",
|
"fieldtype": "Small Text",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -68,6 +71,7 @@
|
|||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
"fieldname": "accounts",
|
"fieldname": "accounts",
|
||||||
"fieldtype": "Table",
|
"fieldtype": "Table",
|
||||||
"hidden": 0,
|
"hidden": 0,
|
||||||
@ -102,7 +106,7 @@
|
|||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-07-18 12:36:10.096252",
|
"modified": "2016-11-07 11:54:10.936716",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "HR",
|
"module": "HR",
|
||||||
"name": "Expense Claim Type",
|
"name": "Expense Claim Type",
|
||||||
@ -118,6 +122,7 @@
|
|||||||
"export": 0,
|
"export": 0,
|
||||||
"if_owner": 0,
|
"if_owner": 0,
|
||||||
"import": 0,
|
"import": 0,
|
||||||
|
"is_custom": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
@ -138,6 +143,7 @@
|
|||||||
"export": 0,
|
"export": 0,
|
||||||
"if_owner": 0,
|
"if_owner": 0,
|
||||||
"import": 0,
|
"import": 0,
|
||||||
|
"is_custom": 0,
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 0,
|
"print": 0,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
|
@ -14,6 +14,4 @@ def execute():
|
|||||||
employee.prefered_contact_email = "User ID"
|
employee.prefered_contact_email = "User ID"
|
||||||
employee.prefered_email = employee.user_id
|
employee.prefered_email = employee.user_id
|
||||||
|
|
||||||
employee.flags.ignore_mandatory = True
|
employee.db_update()
|
||||||
employee.flags.ignore_validate = True
|
|
||||||
employee.save()
|
|
@ -10,7 +10,7 @@ def get_data():
|
|||||||
'items': ['Student Log', 'Student Group', 'Student Attendance']
|
'items': ['Student Log', 'Student Group', 'Student Attendance']
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'items': ['Program Enrollment', 'Fees', 'Assessment', 'Guardian']
|
'items': ['Program Enrollment', 'Fees', 'Assessment']
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -68,7 +68,7 @@ def setup_complete(args=None):
|
|||||||
frappe.message_log.pop()
|
frappe.message_log.pop()
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def create_fiscal_year_and_company(args):
|
def create_fiscal_year_and_company(args):
|
||||||
if (args.get('fy_start_date')):
|
if (args.get('fy_start_date')):
|
||||||
curr_fiscal_year = get_fy_details(args.get('fy_start_date'), args.get('fy_end_date'))
|
curr_fiscal_year = get_fy_details(args.get('fy_start_date'), args.get('fy_end_date'))
|
||||||
@ -244,12 +244,12 @@ def get_fy_details(fy_start_date, fy_end_date):
|
|||||||
else:
|
else:
|
||||||
fy = cstr(start_year) + '-' + cstr(start_year + 1)
|
fy = cstr(start_year) + '-' + cstr(start_year + 1)
|
||||||
return fy
|
return fy
|
||||||
|
|
||||||
def create_sales_tax(args):
|
def create_sales_tax(args):
|
||||||
country_wise_tax = get_country_wise_tax(args.get("country"))
|
country_wise_tax = get_country_wise_tax(args.get("country"))
|
||||||
if country_wise_tax and len(country_wise_tax) > 0:
|
if country_wise_tax and len(country_wise_tax) > 0:
|
||||||
for sales_tax, tax_data in country_wise_tax.items():
|
for sales_tax, tax_data in country_wise_tax.items():
|
||||||
make_tax_account_and_template(args.get("company_name").strip(),
|
make_tax_account_and_template(args.get("company_name").strip(),
|
||||||
tax_data.get('account_name'), tax_data.get('tax_rate'), sales_tax)
|
tax_data.get('account_name'), tax_data.get('tax_rate'), sales_tax)
|
||||||
|
|
||||||
def get_country_wise_tax(country):
|
def get_country_wise_tax(country):
|
||||||
@ -267,7 +267,7 @@ def create_taxes(args):
|
|||||||
account_name = args.get("tax_" + str(i))
|
account_name = args.get("tax_" + str(i))
|
||||||
|
|
||||||
make_tax_account_and_template(args.get("company_name").strip(), account_name, tax_rate)
|
make_tax_account_and_template(args.get("company_name").strip(), account_name, tax_rate)
|
||||||
|
|
||||||
def make_tax_account_and_template(company, account_name, tax_rate, template_name=None):
|
def make_tax_account_and_template(company, account_name, tax_rate, template_name=None):
|
||||||
try:
|
try:
|
||||||
account = make_tax_account(company, account_name, tax_rate)
|
account = make_tax_account(company, account_name, tax_rate)
|
||||||
@ -280,14 +280,14 @@ def make_tax_account_and_template(company, account_name, tax_rate, template_name
|
|||||||
raise
|
raise
|
||||||
except RootNotEditable, e:
|
except RootNotEditable, e:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def get_tax_account_group(company):
|
def get_tax_account_group(company):
|
||||||
tax_group = frappe.db.get_value("Account",
|
tax_group = frappe.db.get_value("Account",
|
||||||
{"account_name": "Duties and Taxes", "is_group": 1, "company": company})
|
{"account_name": "Duties and Taxes", "is_group": 1, "company": company})
|
||||||
if not tax_group:
|
if not tax_group:
|
||||||
tax_group = frappe.db.get_value("Account", {"is_group": 1, "root_type": "Liability",
|
tax_group = frappe.db.get_value("Account", {"is_group": 1, "root_type": "Liability",
|
||||||
"account_type": "Tax", "company": company})
|
"account_type": "Tax", "company": company})
|
||||||
|
|
||||||
return tax_group
|
return tax_group
|
||||||
|
|
||||||
def make_tax_account(company, account_name, tax_rate):
|
def make_tax_account(company, account_name, tax_rate):
|
||||||
@ -308,7 +308,7 @@ def make_tax_account(company, account_name, tax_rate):
|
|||||||
def make_sales_and_purchase_tax_templates(account, template_name=None):
|
def make_sales_and_purchase_tax_templates(account, template_name=None):
|
||||||
if not template_name:
|
if not template_name:
|
||||||
template_name = account.name
|
template_name = account.name
|
||||||
|
|
||||||
sales_tax_template = {
|
sales_tax_template = {
|
||||||
"doctype": "Sales Taxes and Charges Template",
|
"doctype": "Sales Taxes and Charges Template",
|
||||||
"title": template_name,
|
"title": template_name,
|
||||||
@ -548,35 +548,50 @@ def create_academic_term():
|
|||||||
academic_term = frappe.new_doc("Academic Term")
|
academic_term = frappe.new_doc("Academic Term")
|
||||||
academic_term.academic_year = y
|
academic_term.academic_year = y
|
||||||
academic_term.term_name = t
|
academic_term.term_name = t
|
||||||
academic_term.save()
|
try:
|
||||||
|
academic_term.save()
|
||||||
|
except frappe.DuplicateEntryError:
|
||||||
|
pass
|
||||||
|
|
||||||
def create_academic_year():
|
def create_academic_year():
|
||||||
ac = ["2013-14", "2014-15", "2015-16", "2016-17", "2017-18"]
|
ac = ["2013-14", "2014-15", "2015-16", "2016-17", "2017-18"]
|
||||||
for d in ac:
|
for d in ac:
|
||||||
academic_year = frappe.new_doc("Academic Year")
|
academic_year = frappe.new_doc("Academic Year")
|
||||||
academic_year.academic_year_name = d
|
academic_year.academic_year_name = d
|
||||||
academic_year.save()
|
try:
|
||||||
|
academic_year.save()
|
||||||
|
except frappe.DuplicateEntryError:
|
||||||
|
pass
|
||||||
|
|
||||||
def create_program(args):
|
def create_program(args):
|
||||||
for i in xrange(1,6):
|
for i in xrange(1,6):
|
||||||
if args.get("program_" + str(i)):
|
if args.get("program_" + str(i)):
|
||||||
program = frappe.new_doc("Program")
|
program = frappe.new_doc("Program")
|
||||||
program.program_name = args.get("program_" + str(i))
|
program.program_name = args.get("program_" + str(i))
|
||||||
program.save()
|
try:
|
||||||
|
program.save()
|
||||||
|
except frappe.DuplicateEntryError:
|
||||||
|
pass
|
||||||
|
|
||||||
def create_course(args):
|
def create_course(args):
|
||||||
for i in xrange(1,6):
|
for i in xrange(1,6):
|
||||||
if args.get("course_" + str(i)):
|
if args.get("course_" + str(i)):
|
||||||
course = frappe.new_doc("Course")
|
course = frappe.new_doc("Course")
|
||||||
course.course_name = args.get("course_" + str(i))
|
course.course_name = args.get("course_" + str(i))
|
||||||
course.save()
|
try:
|
||||||
|
course.save()
|
||||||
|
except frappe.DuplicateEntryError:
|
||||||
|
pass
|
||||||
|
|
||||||
def create_instructor(args):
|
def create_instructor(args):
|
||||||
for i in xrange(1,6):
|
for i in xrange(1,6):
|
||||||
if args.get("instructor_" + str(i)):
|
if args.get("instructor_" + str(i)):
|
||||||
instructor = frappe.new_doc("Instructor")
|
instructor = frappe.new_doc("Instructor")
|
||||||
instructor.instructor_name = args.get("instructor_" + str(i))
|
instructor.instructor_name = args.get("instructor_" + str(i))
|
||||||
instructor.save()
|
try:
|
||||||
|
instructor.save()
|
||||||
|
except frappe.DuplicateEntryError:
|
||||||
|
pass
|
||||||
|
|
||||||
def create_room(args):
|
def create_room(args):
|
||||||
for i in xrange(1,6):
|
for i in xrange(1,6):
|
||||||
@ -584,6 +599,9 @@ def create_room(args):
|
|||||||
room = frappe.new_doc("Room")
|
room = frappe.new_doc("Room")
|
||||||
room.room_name = args.get("room_" + str(i))
|
room.room_name = args.get("room_" + str(i))
|
||||||
room.seating_capacity = args.get("room_capacity_" + str(i))
|
room.seating_capacity = args.get("room_capacity_" + str(i))
|
||||||
room.save()
|
try:
|
||||||
|
room.save()
|
||||||
|
except frappe.DuplicateEntryError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@ -103,4 +103,5 @@ def update_contact(doc, method):
|
|||||||
for key in ("first_name", "last_name", "phone"):
|
for key in ("first_name", "last_name", "phone"):
|
||||||
if doc.get(key):
|
if doc.get(key):
|
||||||
contact.set(key, doc.get(key))
|
contact.set(key, doc.get(key))
|
||||||
|
contact.flags.ignore_mandatory = True
|
||||||
contact.save(ignore_permissions=True)
|
contact.save(ignore_permissions=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user