Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3642 Widoki

account.payment_date does not have timestamp. 

The payment receipt should be displayed with payment date and time.

Is there any way?

Awatar
Odrzuć
Najlepsza odpowiedź

Hi,
Currently the payment date which is shown in the Payment receipt is a field of type date.If your requirement is to show datetime rather than date then you can define a custom field which is of the type datetime and use your custom field in all views and change it in the report template also.Also you will have to hide the current date field using invisible attribute and replace it in the template.
Simple format of field definition will be as follows

datetime = fields.Datetime(default=fields.Datetime.now())

For the report template replace 

<  div class="col-6" t-if="o.date">
   < strong>Payment Date:
< /div>

As shown below

<  div class="col-6" t-if="o.date">
   < strong>Payment Date:
< /div>

NB: Please ignore the space(' ') after ' < ' symbol.

Regards

Awatar
Odrzuć