Closed rlemeur closed 2 months ago
We have the same problem.
The problem is that the previous code was not respecting the accrual principle, posting entries in the future or in the past incorrectly, as this entry represent the transfer of the debt to another account in the exact moment where the order is done. I know it's a bit shocking after a while working in the other way, but it has to be this way. The due date is filled with the payment date though.
This can be closed, due to https://github.com/OCA/bank-payment/pull/1315.
However, the due date is supplemented by the payment date. And that's the problem: it should be the other way round.
Hi, I'm having a problem with the latest update to the account_payment_order module in the account_payment_line.py code.
New code def _prepare_account_payment_vals(self): """Prepare the dictionary to create an account payment record from a set of payment lines. """ journal = self.order_id.journal_id payment_mode = self.order_id.payment_mode_id vals = { "payment_type": self.order_id.payment_type, "partner_id": self.partner_id.id, "destination_account_id": self.move_line_id.account_id.id, "company_id": self.order_id.company_id.id, "amount": sum(self.mapped("amount_currency")), "date": fields.Date.today(),
ancien code
def _prepare_account_payment_vals(self): """Prepare the dictionary to create an account payment record from a set of payment lines. """ journal = self.order_id.journal_id
This change poses a problem because the notion of due date is lost and customers are debited on the current date rather than the due date.