Skip to content

Commit

Permalink
[FIX] fix payment_date for cash return thanks to celm1990
Browse files Browse the repository at this point in the history
  • Loading branch information
Invitu committed Jun 21, 2018
1 parent 11eb63b commit cf92f7f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions addons/point_of_sale/models/pos_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,6 @@ def _process_order(self, pos_order):
pos_session.refresh()

if not float_is_zero(pos_order['amount_return'], prec_acc):
payment_date = fields.Datetime.now()
payment_date = fields.Date.context_today(self, fields.Datetime.from_string(payment_date))
cash_journal_id = pos_session.cash_journal_id.id
if not cash_journal_id:
# Select for change one of the cash journals used in this
Expand All @@ -145,7 +143,7 @@ def _process_order(self, pos_order):
cash_journal_id = cash_journal[0].id
order.add_payment({
'amount': -pos_order['amount_return'],
'payment_date': payment_date,
'payment_date': fields.Date.context_today(self),
'payment_name': _('return'),
'journal': cash_journal_id,
})
Expand Down

0 comments on commit cf92f7f

Please sign in to comment.