[FIX] payment_paypal: external tests

All dates in the backend must be naive (=in utc, without timezone)

closes odoo/odoo#36230

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
This commit is contained in:
Julien Castiaux
2019-08-29 12:21:54 +00:00
parent 135079044c
commit 33354f71e1
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -211,7 +211,7 @@ class TxPaypal(models.Model):
'PST': -8 * 3600,
'PDT': -7 * 3600,
}
date = dateutil.parser.parse(data.get('payment_date'), tzinfos=tzinfos).astimezone(pytz.utc)
date = dateutil.parser.parse(data.get('payment_date'), tzinfos=tzinfos).astimezone(pytz.utc).replace(tzinfo=None)
except:
date = fields.Datetime.now()
res.update(date=date)
+1 -1
View File
@@ -131,7 +131,7 @@ class PaypalForm(PaypalCommon):
'protection_eligibility': u'Ineligible',
'last_name': u'Poilu',
'txn_id': u'08D73520KX778924N',
'receiver_email': self.env.user.email,
'receiver_email': 'dummy',
'payment_status': u'Pending',
'payment_gross': u'',
'tax': u'0.00',