[FIX] point_of_sale: add timezone info when registering payment date
Journal entries coming from PoS are based in UTC instead of local time. This commit is an improvement over 23d3856f2a4323097f51254b5e32c517d45bfe66 to add the timezone info opw-2371863 closes odoo/odoo#63075 X-original-commit: 30ee2ebae3275de259eff6019d3a4582ef86a729 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com> Signed-off-by: agr-odoo <agr-odoo@users.noreply.github.com>
This commit is contained in:
@@ -854,7 +854,7 @@ class PosSession(models.Model):
|
||||
|
||||
def _get_statement_line_vals(self, statement, receivable_account, amount, date=False):
|
||||
return {
|
||||
'date': date or fields.Date.context_today(self),
|
||||
'date': fields.Date.context_today(self, timestamp=date),
|
||||
'amount': amount,
|
||||
'payment_ref': self.name,
|
||||
'statement_id': statement.id,
|
||||
@@ -863,7 +863,7 @@ class PosSession(models.Model):
|
||||
}
|
||||
|
||||
def _get_split_statement_line_vals(self, statement, payment, amount):
|
||||
res = self._get_statement_line_vals(statement, payment.payment_method_id.receivable_account_id, amount, payment.payment_date.date())
|
||||
res = self._get_statement_line_vals(statement, payment.payment_method_id.receivable_account_id, amount, payment.payment_date)
|
||||
res['partner_id'] = self.env['res.partner']._find_accounting_partner(payment.partner_id).id
|
||||
return res
|
||||
|
||||
|
||||
Reference in New Issue
Block a user