I just applied semgrep autofix. Untested completed, review before merging.
```yaml
- id: frappe-set-value-semantics
patterns:
- pattern-either:
- pattern: frappe.db.set_value($DOCTYPE, None, $...AFTER)
- pattern: frappe.db.set_value($DOCTYPE, $DOCTYPE, $...AFTER)
fix: frappe.db.set_single_value($DOCTYPE, $...AFTER)
message: |
If $DOCTYPE is a single doctype then using `frappe.db.set_value` is discouraged for setting values in DB. Use db.set_single_value for single doctype instead.
languages: [python]
severity: ERROR
```
Getting error while clicking create sales order button from quotation
Taceback (most recent call last):
File "apps/frappe/frappe/app.py", line 66, in application
response = frappe.api.handle()
File "apps/frappe/frappe/api.py", line 54, in handle
return frappe.handler.handle()
File "apps/frappe/frappe/handler.py", line 45, in handle
data = execute_cmd(cmd)
File "apps/frappe/frappe/handler.py", line 83, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "apps/frappe/frappe/__init__.py", line 1607, in call
return fn(*args, **newargs)
File "apps/frappe/frappe/model/mapper.py", line 36, in make_mapped_doc
return method(source_name)
File "apps/erpnext/erpnext/selling/doctype/quotation/quotation.py", line 263, in make_sales_order
return _make_sales_order(source_name, target_doc)
File "apps/erpnext/erpnext/selling/doctype/quotation/quotation.py", line 333, in _make_sales_order
doclist = get_mapped_doc(
File "apps/frappe/frappe/model/mapper.py", line 144, in get_mapped_doc
postprocess(source_doc, target_doc)
File "apps/erpnext/erpnext/selling/doctype/quotation/quotation.py", line 291, in set_missing_values
for d in customer.get("sales_team"):
TypeError: 'NoneType' object is not iterable
- Remove newly added fields in Party doctypes to store bank details
- Use Bank Account's fields to match against account no/iban
- For employee, if Bank Account does not exist, find in Employee doctype against account no/iban
fix: wrong qty of remaining work orders to be created when using "Create" > "Work Order" (#34726)
* fix: convert asynchronous field update to synchronous
* fix: wrong qty of remaining work orders to be created when using "Create" > "Work Order"
(cherry picked from commit 189b020d228bdb1c0c589697162cf91718b2fa27)
Co-authored-by: danjeremynavarro <46537526+danjeremynavarro@users.noreply.github.com>