fix: pos permission error on strict permission (#47896)
This commit is contained in:
@@ -645,6 +645,7 @@ erpnext.PointOfSale.Controller = class {
|
||||
) {
|
||||
this.frm.doc.pos_profile = this.pos_profile;
|
||||
}
|
||||
this.frm.doc.set_warehouse = this.settings.warehouse;
|
||||
|
||||
if (!this.frm.doc.company) return;
|
||||
|
||||
@@ -657,8 +658,6 @@ erpnext.PointOfSale.Controller = class {
|
||||
|
||||
async on_cart_update(args) {
|
||||
frappe.dom.freeze();
|
||||
if (this.frm.doc.set_warehouse != this.settings.warehouse)
|
||||
this.frm.doc.set_warehouse = this.settings.warehouse;
|
||||
let item_row = undefined;
|
||||
try {
|
||||
let { field, value, item } = args;
|
||||
@@ -712,6 +711,7 @@ erpnext.PointOfSale.Controller = class {
|
||||
}
|
||||
|
||||
new_item["use_serial_batch_fields"] = 1;
|
||||
new_item["warehouse"] = this.settings.warehouse;
|
||||
if (field === "serial_no") new_item["qty"] = value.split(`\n`).length || 0;
|
||||
|
||||
item_row = this.frm.add_child("items", new_item);
|
||||
|
||||
Reference in New Issue
Block a user