[fix] [minor] dont call is_pos trigger in onload of pos invoice

This commit is contained in:
Nabin Hait 2013-09-30 17:57:22 +05:30
parent b8ef5a3fe3
commit 300ae0cdf4
2 changed files with 5 additions and 3 deletions

View File

@ -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);
}

View File

@ -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()