Skip to content
Snippets Groups Projects
Commit f05db8b1 authored by Touati Djamel (otd)'s avatar Touati Djamel (otd) Committed by Laurent Smet
Browse files

[FIX] account: copy the invoice_date_due when duplicating an invoice

Steps to reproduce the bug:
- Go to Accounting
- Create an invoice:
    - select a `invoice_payment_term_id`
    - Add product on “account.move.live”
- Save and duplicate it.

Problem:
The `invoice_payment_term_id` field will be duplicated on the second invoice, but not the `invoice_date_due` field

Solution:
The `invoice_date_due` field is set in the `_recompute_payment_terms_lines()` function when adding an `account.move.line`.
As in the duplicate invoice we also have an `account.move.line` we can therefore call this function so that the field is set
https://github.com/odoo/odoo/blob/14.0/addons/account/models/account_move.py#L1043



opw- 2628333

closes odoo/odoo#75476

Signed-off-by: default avatarLaurent Smet <smetl@users.noreply.github.com>
parent a170fb29
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment