It is important for kids to know their boundaries. Establish a set of ground rules with your partner or ex-partner (and involve the kids, if they are old enough) as to acceptable behaviours, and the consequences of unacceptable behaviour. Both parents need to then support each other in this, and be consistent in applying these rules, regardless of who the children are with.
This may mean that, at times, you have to provide support to your partner or ex-partner via phone or Skype when your child has misbehaved. Even if you are busy or tired, and really don’t want to hear all the detail, make the effort to be an involved parent – your kids will thank you for it.