Usually no. Bush Bean and Onion are listed as an incompatible companion pair. Virginia Cooperative Extension lists onion as incompatible with bush bean.
If your garden is small, this does not mean the crops can never appear in the same yard. It means they should not be treated as a helpful pair: give them separate rows or bed sections, keep good airflow, and rotate families between seasons.
Source basis: Virginia Cooperative Extension companion planting chart. The cautious verdict is limited to the cited incompatibility rather than a claim that the pair will always fail.
Spacing tip: Give this pair separate bed zones when practical, and avoid following one with the other in the same spot without rotation.