Hello everybody,
we currently face a very specific problem:
If we buy parts for our production we usually start with a Supplier Quotation to ask our suppliers for current prices. The requested articles in the items table are provided with expected item prices which are based on pricing rules we have in the system.
However, if prices have changed, our supplier will send us an offer with different prices. If we choose “Make → Purchase Order” to create a new PO and try to change the prices in the items table we get validation errors trying to save the document.
The error message says "Incorrect value in row 1: Rate must be = ..."
By the way, the checkbox for “Maintain same rate throu…” in the settings is disabled.
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 56, 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 52, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 922, 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 230, in save
return self._save(*args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 253, in _save
self.insert()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 192, in insert
self.run_before_save_methods()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 772, in run_before_save_methods
self.run_method("validate")
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 666, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 887, in composer
return composed(self, method, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 870, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 660, in <lambda>
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/buying/doctype/purchase_order/purchase_order.py", line 50, in validate
self.validate_with_previous_doc()
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/buying/doctype/purchase_order/purchase_order.py", line 66, in validate_with_previous_doc
"is_child_table": True
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/utilities/transaction_base.py", line 77, in validate_with_previous_doc
self.compare_values({key: [ref_dn]}, val["compare_fields"], d)
File "/home/frappe/frappe-bench/apps/erpnext/erpnext/utilities/transaction_base.py", line 100, in compare_values
self.validate_value(field, condition, prevdoc_values[field], doc)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 924, in validate_value
msgprint(msg, raise_exception=raise_exception or True)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 309, in msgprint
_raise_exception()
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 284, in _raise_exception
raise ValidationError(encode(msg))
ValidationError: Incorrect value in row 1: Rate must be = 0.1115