Limit the number of discount per product to 1, Commerce Discount I'm trying to make a one time discount for each product of a certain type per customer.
If the user buy a product he will have a discount on it, but he cannot have it a second time.

How can I do that.

So far I couldn't figure out how to limit it for the product itself.
Maximum usage determines how many times a discount may be applied across all customers or to a single customer's orders, which in my case should be empty (unlimited).

Where is the setting to limit the number of use per product to 1?

Is it a rule I need to code?

Cheers
You could use the Flag module to get this to work, by configuring an appropriate (non-global) flag, which you should then use to (automagically) flag each product by the customer, after such discount was applied (for the first time). To actually flag such products by the customer, you should use the Rules module, which integrates extremely well with the Flag module. All that's left is to find the appropriate Rules Event for such rule to be triggered (somewhere along the lines of "checkout completed" I would assume).

Any time a customer buys a product, you can verify if it is the very first time, or yet another time. For this verification, all you'd have to do is use a Rules Condition to check "has this user yes or no flagged this product already (by the flag you created for this purpose)".

If you're not familiar with the Flag module, checkout either of these:


The set of 8 video tutorials about the Flag module.
Flag's Community documentation.