Error Saving Items

On ver 11, Master,

Once an item has been created and transactions made on the Item, and if you try to change things like Valuation Rates or try to add a new Unit of Measure, you get the following error. Items have no variants. However Items for which Stock Transactions have not been done don’t have this problem. Am I missing something? Or is this a bug?

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 260, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 299, in _save
self._validate()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 466, in _validate
self.validate_set_only_once()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 493, in validate_set_only_once
frappe.CannotChangeConstantError)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 352, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 338, in msgprint
_raise_exception()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 311, in _raise_exception
raise raise_exception(msg)
CannotChangeConstantError: Value cannot be changed for Variant Based On
request.js:321:6
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/app.py”, line 61, in application
response = frappe.handler.handle()
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 21, in handle
data = execute_cmd(cmd)
File “/home/frappe/frappe-bench/apps/frappe/frappe/handler.py”, line 56, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 1027, in call
return fn(*args, **newargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py”, line 22, in savedocs
doc.save()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 260, in save
return self._save(*args, **kwargs)
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 299, in _save
self._validate()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 466, in _validate
self.validate_set_only_once()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 493, in validate_set_only_once
frappe.CannotChangeConstantError)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 352, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 338, in msgprint
_raise_exception()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 311, in _raise_exception
raise raise_exception(msg)
CannotChangeConstantError: Value cannot be changed for Variant Based On

Thanks

Jay

Same issue here, guys. Cannot change anything, even though variants don’t exist. This seems to have started happening since the last update. I’m currently on ERPNext: v11.1.18 (master)
Frappe Framework: v11.1.18 (master)

This is turning out to be quite critical as we have some transactions on hold because of this issue :frowning: Could anyone suggest a temporary workaround/override to change item settings?

I have the same error when editing item and we haven’t variants at all in item list.
I noticed

  • the same item I changed 8 days ago (28.03.2019) and all was Ok, we did not make any changes during this time for this item (and other old items).
  • we have items added 3 days ago, I can change them all without error. But all older items have error - Value cannot be changed for Variant Based On.

Any solution abut this?

We also need an update on this. This is critical for us as well since we update items all the time. We also have no variants.

The latest bench update seems to have fixed this! :raised_hands: