From 0314a39fabc58f2f397a396e74ef674355691e2b Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Wed, 4 Jun 2025 16:11:07 +0530 Subject: [PATCH] fix: pos permission error on strict permission (backport #47896) (#47897) fix: pos permission error on strict permission (#47896) (cherry picked from commit bb903a4bef8ff82840e6fef9388670a25848030a) Co-authored-by: Diptanil Saha --- erpnext/selling/page/point_of_sale/pos_controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/page/point_of_sale/pos_controller.js b/erpnext/selling/page/point_of_sale/pos_controller.js index d86bf92177f..50bdc294987 100644 --- a/erpnext/selling/page/point_of_sale/pos_controller.js +++ b/erpnext/selling/page/point_of_sale/pos_controller.js @@ -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);