Skip to content

Commit

Permalink
Merge pull request #1281 from josueBulle/AP-330
Browse files Browse the repository at this point in the history
AP-330 sponsor letters dates
  • Loading branch information
ecino committed Feb 4, 2020
2 parents 8da3a8e + 4c3ae12 commit d40d47b
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ def get_connect_data(self, odoo_object, fields_to_submit=None):
mapped = super(FromLetterMapping, self) \
.get_connect_data(odoo_object, fields_to_submit)
mapped['Type'] = 1 # todo figure out what to use here

if odoo_object.direction == "Supporter To Beneficiary":
mapped['Date'] = datetime.datetime.strptime(
odoo_object.scanned_date, '%Y-%m-%d').strftime('%d-%m-%Y %H:%M:%S')

if not mapped['Message']:
mapped['Message'] = _("Physical letters cannot be displayed.")
return mapped

0 comments on commit d40d47b

Please sign in to comment.