Commit eddcfa2c authored by Quentin Defenouillere's avatar Quentin Defenouillere Committed by Romain Bignon

[spirica] Fixed bug during dateutil

The Date() filter raised many issues on Sibi for spirica and the related
modules such as BforBank.
It seems that it's because we need to pass the CleanText() filter to the
TableCell value before applying Date(), with an empty string as default
value, as it is done in Linxea.

Closes: 6432@zendesk
parent c9ab9e2d
......@@ -267,7 +267,7 @@ class DetailsPage(LoggedPage, HTMLPage):
obj_vdate = Date(CleanText('./td[8]'), dayfirst=True)
def obj_date(self):
return Date(CleanText('./td[6]'), dayfirst=True, default=Field('vdate')(self))(self)
return Date(CleanText('./td[6]', symbols='-'), dayfirst=True, default=Field('vdate')(self))(self)
def obj_amount(self):
# We display the raw amount only if the net amount is not available.
......@@ -299,7 +299,7 @@ class DetailsPage(LoggedPage, HTMLPage):
# Columns do not always appear depending on transactions so we need
# to precise "default=NotAvailable" for all TableCell filters.
obj_label = CleanText(TableCell('label', default=NotAvailable), default=NotAvailable)
obj_vdate = Date(TableCell('vdate', default=NotAvailable), dayfirst=True, default=NotAvailable)
obj_vdate = Date(CleanText(TableCell('vdate', default="")), dayfirst=True, default=NotAvailable)
obj_unitvalue = MyDecimal(TableCell('unitvalue', default=NotAvailable), default=NotAvailable)
obj_quantity = MyDecimal(TableCell('quantity', default=NotAvailable), default=NotAvailable)
obj_valuation = MyDecimal(TableCell('valuation', default=NotAvailable), default=NotAvailable)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment