Create custom field in backend for existing doctype

I’m looking for a way to add new custom field in backend for existing doctype. I want to add new field to Item doctype. This field will be named new_product should return True or False depend of the date of the added item. How can I do this with Frappe / Erpnext?


Your question is not clear!
But you can add it from Custom Field doctype

I would like to do something like this in my template:

{% for item in item_list %}

{% if item.is_new %}

New item

{% endif %} {% endfor %}

item.is_new should be a function that will check if item date added is less than 2 weeks ago.

Do I need you use Custom Field for this? Is it possible with Frappe?

More clear?