Views entity reference field condition OK, so this is a bit tricky, let's see if you can follow my problem:
(just let me know which part you don't understand 1,2,3...) I am using Drupal 7

1) I have 2 content types: Workers and Documents

2) In the content type Documents I have the entity reference field of all the workers. (Eg. I want to add a document/node that refers to a specificic worker John)

3) In the content type Documents there is a list field the user can select two options: red or green (it's a field where the user can say the document is OK to use)

4) Everytime I add a Document, I have to select red or green in that field.

5) Right now, I am displaying a view with all the nodes/documents from the content type Documents refering to the title and List field (red or green). Something like this:

Document 1 ------------------ red

6) On another page, I am displaying a view with a list of all workers (Content type Workers) and here comes the tricky part:

I want to add a field in this view displaying red or green based on this condition: IF (all the Documents from the entity reference "specific worker" have "green" on the field): display green.
IF (one of the Documents has the field "red"): display red

It will diplay something like:

John --------------- green

How can I achieve this with views? Do  I need to write code? Thank you.
Here is a zero coding solution. 

Create a new view: 


CONTEXTUAL FILTER add Node id (since workers is a content type), so we have the id of the worker. 
RELATIONSHIP add Referecing Entity, checkmark require relationship.
Fields: Add Title 


At top you will see a select box, select the relationship option.
Unchecked Link this field to the original piece of content
Click on NO RESULT BEHAVIOUR, put Green
Click on REWRITE RESULTS, checkmark Rewrite the output of this field, put Red

In FILTER CITERIA add type and select Workers. 
In FILTER CRITERIA add the List Field (the one that contains Red or Green) and put is equal to Red and select relationship option at top.


for PAGER put 1 item. 





Install and enable Views Field View

Now in your List of All Workers view:

In FIELDS add Node ID and checkmark hide field from view.

In FIELDS now Add the View Fields view field.


Select the previous view we created. 
For argument, Click on replacement patterns, and use the Node ID token to pass as an argument.