What is the purpose of the delivery_date_edit field

What is the purpose of the delivery_date_edit field in purchase.line model? Is not delivery_date_store field enough?

This field is used on the user interface to allow manual edition of the delivery date as it’s computed by the
system by default

The delivery_date Function field is responisble of returning the right delivery date of the line.

Yes, I understand it, but this behavior also would be possible without this Boolean field, simply by defining the delivery_date_store field, isn’t it?

No, the delivery_date function field only returns the stored value is delivery_date_edit is true

Yes, I know, but what I’m trying to say is that wouldn’t be the same just check if delivery_date_store have any value and return it?
Why is needed to have a boolean field to allow to modify a date field?

No as the field may be manually edited and then disabled the edit to use the supplier lead time or any other option.

Okay, but If that is what you want you can just leave the date field empty.
From my point of view, it would be simpler to understand by the user because the rest of the program works like that. (Maybe i’m wrong but I do not think there is another form view where you have to set a boolean to true to allow to edit a date field).

Sorry but I do not understand nothing about the last message. Could you clarify “works like that”?

Sorry, what I wanted to say is that there is no other model in Tryton where is needed to set a boolean field to true to allow to set a date field and to use it to compute another field. The program usually just checks if the field is not None.
Anyway, I understand what you are saying and if you think it’s the correct way it’s okay for me.

Yes but this field is diferent as it’s normally computed by the system but we added a boolean to allow the user to manually override this field.

You are right that currently there is no othe field but the same can also apply for sale delivery date (for example), so I do not see any problem on it.