This commit is contained in:
2026-02-27 07:04:54 +01:00
parent e768fe71a3
commit 6b884af9cc
2 changed files with 21 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ import datetime
import logging
import json
from trytond.exceptions import UserWarning, UserError
from trytond.modules.purchase_trade.numbers_to_words import quantity_to_words, amount_to_currency_words
from trytond.modules.purchase_trade.numbers_to_words import quantity_to_words, amount_to_currency_words, format_date_en
logger = logging.getLogger(__name__)
@@ -287,13 +287,18 @@ class Sale(metaclass=PoolMeta):
delivery_date = [dd.estimated_date for dd in self.lines[0].estimated_date if dd.trigger=='deldate']
if delivery_date:
del_date = delivery_date[0]
if del_date:
del_date = format_date_en(del_date)
return del_date
@property
def report_payment_date(self):
if self.lines:
Date = Pool().get('ir.date')
return self.lines[0].sale.payment_term.lines[0].get_date(Date.today(),self.lines[0])
payment_date = self.lines[0].sale.payment_term.lines[0].get_date(Date.today(),self.lines[0])
if payment_date:
payment_date = format_date_en(payment_date)
return payment_date
@property
def report_shipment(self):