Wow, would they be willing to do this? That's surprising to me.
For a used vehicle:
If they honestly are willing to sell the vehicle with a set small profit, they will.
The dealership is usually financing the cars anyhow. Everyday it sits on the lot is one that they are paying money on.
Let us assume that you offered $O(ffer) for the vehicle which includes $P(rofit) at the moment.
They need to balance the estimated chance of selling the vehicle within # days costing them $C(harges). doing so, will generate them a profit of $G(reed) after paying the extra $C.
That sale would be $G = $Sale - $Charges - $Initial
If you are able to make $P($O - $I) look close enough to $G, you should get the sale. Be willing to walk out while leaving them your number in case they change their mind. The longer the vehicle sits on their lot; they more they will be willing to bend.
If they balk at showing the invoice and you desire the vehicle; ask to see the black book listing. (not the blue book) every used vehicle dealer will have one - they are updated every month based on auction sales.
That will have the wholesale cost of that vehicle(by year, make, model) in your area based on 3-4 levels of conditions. Then you have add ons to increase value in each of the columns
For a new vehicle;
The invoice from the factory is available from multiple sites if they balk. Ignore the listing price on the window. Certain costs are fixed from the factory; vehicle and shipping - that is the basis for any dealer and is pretty much the same no matter what they say.
Then there are incentives that the factory provides to the dealer to help cover costs or as a reward. Most of those are also able to be determined. These generate profit for the dealer and help cover their overhead.
Like the used vehicle, they are paying charges for every day the vehicle sits on the lot; they make their money by turnover; take your money with a small profit and get another vehicle ready to be sold to another sucker that will not be so tight.