California courts hold the best interests of the child to be the primary concern when making custody or visitation decisions. Although substance abuse issues lie at the heart of many divorces involving parents of young children, problematic behavior with alcohol and other intoxicants are not usually considered to be sufficient grounds to bar any custody or visitation in and of themselves. Instead, the court will evaluate the situation and attempt to find out how much parental responsibility the substance abuser can reasonably maintain.
Some measures that are often implemented by the court include supervised visitation, prohibitions such as preventing the troubled parent from driving the child anywhere and even random drug testing. The safety of the child is paramount.
However, the relationship between the custodial parents will not be the primary concern. Arguments and heated words between the parents do not necessarily preclude someone from being a good parent to their children. The court will take any reliable reports of unethical activity into consideration, but oftentimes the acrimony surrounding a divorce can cause people to behave much more poorly to each other than they would to their children. The court would prefer that the parents be supportive and non combative with each other, but family courts are quite used to dealing with less than ideal situations.
It should be noted that custody arrangements are designed to change and evolve. If a parent with a substance abuse problem manages to face their issues and get them under control, then they may find the court receptive to expanding their custody or visitation rights. The assistance of a lawyer may be helpful to a such a parent who wants to modify an existing custody order.
Source: Yahoo, "Substance-Abuse History and Other Mysteries of Child-Custody Battles", Beth Greenfield, July 7, 2015