I mean specifically when two armies clashed on the battlefield, marching towards one another to inevitable bloodshed. Would the infantry lines allow one side to fire the first volley, then proceed to be allowed to fire their volley afterward? Or would they fire their volleys at the same time then charge?
The reason I ask this question is that in movies (The Patriot, The Sovereign's Servant; Battle of Poltava) it seems like both sides opt to fight a 'clean' honorable battle in which both sides are allowed to fire a volley while the other side simply stands and wait to receive it after firing their own volley. It seems counter-intuitive, as one would think to charge right after you fired your own volley to prevent the enemy from firing theirs.
Sorry for the long question.
So my field of interest with the era you're referring to is more around the British Regimental System, but I can at least get a decent answer started and others can add to it.
Attempts to codify rules on warfare certainly predate the early 18th century, but the phenomenon you're talking about has more to do with tactical considerations and constraints rather than any codified legal requirements on combatants at the time or a desire for a "clean" battle.
The first thing to consider is the powder used in muskets of the era - It created a lot of smoke. To the point that after a volley or two a particular section of battlefield would be very easily obscured, making it very difficult to coordinate friendly forces, as well as provide accurate target indication for an enemy to your front.
This constraint not only influenced things that seem counter-intuitive to those of us now isolated from that first hand experience. A whole swathe of potential questions, ranging from "Damn why were those uniforms so flashy... why didn't they make uniforms to blend in instead?" to "Why just stand there so close to one another and just take the volley on the chin?" can be answered effectively by this aspect - once you fired a volley or two, it became damned hard to even see the men you were supposed to be killing, or at very least drive from the battlefield. Add to this the need to see where neighbouring companies and regiments were on your flanks, and things start getting complicated.
There's an additional dimension to the "Why just stand there in a group so close to the enemy" consideration you've referenced in your rationale and that I've just mentioned.
Not just because of the obscurity caused by the smoke, but smoothbore muskets weren't terribly accurate.
The projectiles fired by these weapons were (by design) a loose fit in the barrel to enable continued firing as the weapons became increasingly fouled by more carbon build up from repeated firing (remembering the above about high fouling, smoke generating powder). Combine this with the lack of rifling in the barrel, you have a very inaccurate individual weapon.
The best way therefore to maximise the effect of your firepower is to mass it; this means that you need to present a group of such weapons in an extended line formation onto a target at relatively close range to have an optimal effect on that target, but the downside of this formation to eliminate the constraint of the inaccurate weaponry is that you're exposing your own force to your opponent doing the exact same thing.
Net result, you end up with two "nice neat lines" shooting at each other from what appears to be a ridiculously close range. This isn't done out of a misguided sense of honour or even trying to shoot your enemy to death - more to get a few decent volleys in (and create the accompanying blow to morale that seeing large calibre pieces of lead take chunks out of your friends creates) before the smoke obscured everything, prior to making a charge with the very nasty triangular bayonets of the era in an attempt to demoralise and break the coherence of the opponent front of you.
Whilst movies may seem as if one side has stoically waited to receive a counter-volley before charging, the reality is that for most muskets from the era you mention onwards, skilled soldiers could generally pump out 3-4 good volleys per minute. In a combat scenario where a line of infantry has fired, they're not waiting to receive a counter-volley to be fair to their opponent but are trying to get weapons reloaded and a further effective volley into the enemy's line before either receiving or making a charge. This inevitably means taking a counter-volley.
All that said to provide you some context, with regards to your specific question, that line infantry didn't always fire volleys before making a charge nor did they always charge after firing a volley or two. Prevailing tactical conditions would influence the decision of the unit's commander, thus the orders they'd give (although Holmes cites napoleonic era British officers as preferring a volley and charge as a typical tactic). You should note that the constraints above regarding accuracy and visibility make a prospective volley whilst charging, an ineffective tactic.