The new woob repository is here: https://gitlab.com/woob/woob. This gitlab will be removed soon.

Commit d379179d authored by thibault douge's avatar thibault douge Committed by Vincent A

[trainline] change the condition to get invoices

- ignore duplicate because sometimes we have duplicate when ouigo is the seller
parent a5d0c13e
......@@ -41,12 +41,14 @@ class DocumentsPage(LoggedPage, JsonPage):
@method
class iter_documents(DictElement):
item_xpath = 'pastBookings/results'
# when the seller is ouigo we have duplicate data
ignore_duplicate = True
class item(ItemElement):
klass = Bill
def condition(self):
return 'Paid' in Dict('order/payment/paymentState')(self)
return 'COMPLETE' in Dict('order/state')(self)
obj_id = Format('%s_%s', Env('subid'), CleanText(Dict('order/id')))
obj_number = CleanText(Dict('order/friendlyOrderId'))
......
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