27.02.26
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user