mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-21 02:16:28 +00:00
fix: pos permission error on strict permission (#47896)
(cherry picked from commit bb903a4bef)
Co-authored-by: Diptanil Saha <diptanil@frappe.io>
This commit is contained in:
@@ -591,6 +591,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;
|
||||
|
||||
@@ -603,8 +604,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;
|
||||
@@ -658,6 +657,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