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) {
|
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']);
|
||||||
|
@ -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):
|
||||||
|
@ -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()
|
|
@ -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…
x
Reference in New Issue
Block a user