There were a lot more issues with the B787 programme than just the battery problems. Stories have been coming out of the woodwork detailing significant failures in management of the project (and others) at all levels. However, given that Airbus had similar issues - most recently during the A380 project - and learned from them to apparently make the A350XWB project run much more smoothly, I'm sure it's within Boeing's ability to turn things round in a similar fashion - as long as management are honest with themselves about where the problems lie.