We study a deformation of a 2-graded Poisson algebra where the functions of the phase space variables are complemented by linear functions of parity odd velocities. The deformation is carried by a 2-form B-field and a bivector Π, that we consider as gauge fields of the geometric and non-geometric fluxes H, f , Q and R arising in the context of string theory compactification. The technique used to deform the Poisson brackets is widely known for the point particle interacting with a U (1) gauge field [1], but not in the case of non-abelian or higher spin fields. The construction is closely related to Generalized Geometry: With an element of the algebra that squares to zero, the graded symplectic picture is equivalent to an exact Courant algebroid over the generalized tangent bundle E ∼ = T M ⊕ T * M , and to its higher gauge theory. A particular idempotent graded canonical transformation is equivalent to the generalized metric. Focusing on the generalized differential geometry side we construct an action functional with the Ricci tensor of a connection on covectors, encoding the dynamics of a gravitational theory for a contravariant metric tensor and Q and R fluxes. We also extract a connection on vector fields and determine a non-symmetric metric gravity theory involving a metric and H-flux.deformation 6 2.3 Gauge symmetries 9 2.4 Deformation and open-closed string relation 10 3 Courant algebroids and graded Poisson structures 11 3.1 Correspondence between 2-graded QP-manifolds and exact Courant algebroids 12 3.2 Courant algebroid for a non-canonical QP-manifold 13 4 Differential geometry of T M ⊕ T * M 14 4.1 Generalized Lie bracket, connection and torsion tensor 14 4.2 Connections on tangent space and on cotangent space for the given deformation 17 4.3 Curvature tensor 19 5 Gravitational actions with fluxes 20 5.1 Invariance under gauge symmetries of Π 22