[fix] [minor] dont call is_pos trigger in onload of pos invoice
This commit is contained in:
parent
b8ef5a3fe3
commit
300ae0cdf4
@ -29,8 +29,10 @@ erpnext.accounts.SalesInvoiceController = erpnext.selling.SellingController.exte
|
||||
// toggle to pos view if is_pos is 1 in user_defaults
|
||||
if ((cint(wn.defaults.get_user_defaults("is_pos"))===1 || cur_frm.doc.is_pos) &&
|
||||
cint(wn.defaults.get_user_defaults("fs_pos_view"))===1) {
|
||||
this.frm.set_value("is_pos", 1);
|
||||
this.is_pos();
|
||||
if(this.frm.doc.__islocal) {
|
||||
this.frm.set_value("is_pos", 1);
|
||||
this.is_pos();
|
||||
}
|
||||
cur_frm.cscript.toggle_pos(true);
|
||||
}
|
||||
|
||||
|
@ -195,7 +195,7 @@ class DocType(SellingController):
|
||||
pos = get_pos_settings(self.doc.company)
|
||||
|
||||
if pos:
|
||||
if not for_validate:
|
||||
if not for_validate and not self.doc.customer:
|
||||
self.doc.customer = pos.customer
|
||||
self.set_customer_defaults()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user