fix: set batch created from bundle to batch field in stock transaction (#39966)
* fix: set batch created from bundle to batch field in stock transaction
* fix: validation for serial and batch no
(cherry picked from commit 4b24fcd2216caadbec402fc7d1e412bdcc662dad)
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
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
```