System Console VS SQL Query

Release v13.0.0-beta.12 We had an encounter with database issue.

Issue : Release v13.0.0-beta.12 Release Issue

We have fixed as per below method. If you have terminal access, you can run SQL Query. If you are Frappe.cloud user, you can use System Console

SQL Query

UPDATE tabPurchase Receipt Item SET cost_center=‘1003 - Site Service - HT’ where name in (“63c087308a”,“939c25c2aa”, “9dcae2f315”, “0d7293c4e1”, “c2d7154198”, “cd48372f5e”, “3e306096b9”, “f391a402c4”, “44fd6e5e3b”, “47f7e490f2”, “1f07efa308”, “6f642d30a6”,“df4ff2c1b3”, “884840854f”, “2e1c3a80da”, “6f62514022”, “65f3a35879”, “4ba144ce95”, “b75ab1cb6e”, “c09fbc0598”,“d535b3bda3”, “bb9fc49255”, “6436d199cf”, “ca98aae0b8”, “f75f722c6e”,“736e1e09cd”, “3c904fef31”,“b13ab47299”, “bafb931a5e”, “25b8595e9a”, “0ce6ae519e”, “0936965716”, “c8e45121ca”, “81c0bb88ed”, “83f118342e”, “f43a89e24e”, “6410514199”, “45d44f3d2a”,“279adbb38f”, “d8b5fbef19”,“8d915d1ea5”, “058c3a25c6”, “e27300204e”, “159e74b808”, “44f6cce9ec”, “e73aeafd59”, “e3da2a95f7”, “4aec711982”, “90faff12a8”, “fe18a11be8”, “994c7f74cf”, “115053bd39”, “cdfe4bdb6d”, “b59eba85bc”, “1e2b881e3f”, “50318fcd7b”, “8b589dcc10”, “a5237ede58”, “44cb597e67”, “5b1881d44d”, "cfbf1c373c”);

System Concole

receipt_list = [“63c087308a”,“939c25c2aa”, “9dcae2f315”, “0d7293c4e1”, “c2d7154198”, “cd48372f5e”, “3e306096b9”, “f391a402c4”, “44fd6e5e3b”, “47f7e490f2”, “1f07efa308”, “6f642d30a6”,“df4ff2c1b3”, “884840854f”, “2e1c3a80da”, “6f62514022”, “65f3a35879”, “4ba144ce95”, “b75ab1cb6e”, “c09fbc0598”,“d535b3bda3”, “bb9fc49255”, “6436d199cf”, “ca98aae0b8”, “f75f722c6e”,“736e1e09cd”, “3c904fef31”,“b13ab47299”, “bafb931a5e”, “25b8595e9a”, “0ce6ae519e”, “0936965716”, “c8e45121ca”, “81c0bb88ed”, “83f118342e”, “f43a89e24e”, “6410514199”, “45d44f3d2a”,“279adbb38f”, “d8b5fbef19”,“8d915d1ea5”, “058c3a25c6”, “e27300204e”, “159e74b808”, “44f6cce9ec”, “e73aeafd59”, “e3da2a95f7”, “4aec711982”, “90faff12a8”, “fe18a11be8”, “994c7f74cf”, “115053bd39”, “cdfe4bdb6d”, “b59eba85bc”, “1e2b881e3f”, “50318fcd7b”, “8b589dcc10”, “a5237ede58”, “44cb597e67”, “5b1881d44d”, “cfbf1c373c”]

for receipt in receipt_list:
frappe.db.set_value(“Purchase Receipt Item”, receipt, “cost_center”, ‘1003 - Site Service - HT’)
log(frappe.db.get_value(“Purchase Receipt Item”, receipt, “cost_center”))

1 Like