how to add username and password field in commerce order
This is currently being handled via the Rules module. The rule that is enabled by default creates the user via the "Create a new account for an anonymous order" rule. There is no way to insert a password in here but is up to the user to open the link in their email and set their password manually.