Merge pull request #6924 from nabinhait/hotfix
Fixed multiple minor issues
This commit is contained in:
commit
47c8d5fd56
@ -23,20 +23,19 @@ frappe.ui.form.on("Opportunity", {
|
||||
refresh: function(frm) {
|
||||
var doc = frm.doc;
|
||||
frm.events.enquiry_from(frm);
|
||||
|
||||
if(doc.status!=="Lost") {
|
||||
if(doc.with_items){
|
||||
frm.add_custom_button(__('Supplier Quotation'),
|
||||
function() {
|
||||
frm.trigger("make_supplier_quotation")
|
||||
}, __("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") {
|
||||
frm.add_custom_button(__('Lost'),
|
||||
cur_frm.cscript['Declare Opportunity Lost']);
|
||||
|
@ -39,6 +39,9 @@ class Opportunity(TransactionBase):
|
||||
|
||||
if not self.title:
|
||||
self.title = self.customer_name
|
||||
|
||||
if not self.with_items:
|
||||
self.items = []
|
||||
|
||||
|
||||
def make_new_lead_if_required(self):
|
||||
|
@ -14,6 +14,4 @@ def execute():
|
||||
employee.prefered_contact_email = "User ID"
|
||||
employee.prefered_email = employee.user_id
|
||||
|
||||
employee.flags.ignore_mandatory = True
|
||||
employee.flags.ignore_validate = True
|
||||
employee.save()
|
||||
employee.db_update()
|
@ -103,4 +103,5 @@ def update_contact(doc, method):
|
||||
for key in ("first_name", "last_name", "phone"):
|
||||
if doc.get(key):
|
||||
contact.set(key, doc.get(key))
|
||||
contact.flags.ignore_mandatory = True
|
||||
contact.save(ignore_permissions=True)
|
||||
|
Loading…
x
Reference in New Issue
Block a user