Serial Dialog appears even if item does not have has_serial_no or has_batch_no

ERPNext: v12.10.0 (version-12)
Frappe Framework: v12.7.3 (version-12)

https://github.com/frappe/erpnext/pull/22788

The missing flag initialization causes the serial/batch dialog to appear whenever update stock is checked on Sales invoice, regardless whether the item is has_serial/has_batch or not.