set a on_change on invoice_date for calculate the Due date on supplier invoice

Bug #1125084 reported by Damien D.
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Wishlist
OpenERP R&D Addons Team 3

Bug Description

Hi all,

in invoice due date is left unchanged when you change the invoice date.

Example:

http://54.228.22.65:48080
login as admin
password kazacube

go to accounting > Suppliers > Supllier invoices
New
choose partner supplier

Due date is automatically and correctly set as current date + 30 days end of month (defined in partner form)
 current date: 14 Feb 2013
 invoice date: left blank
 due date: 31 Mar 2013

Now try to change like this
 invoice date: 10 oct 2012
 force period: 10/2012
Bug: Due date is left unchanged to 31 Mar 2013 instead of 30 Nov 2012

I saw a post for this on 7.0 but nothing for 6.0

Thanks for your help,

Damien D.

Revision history for this message
Amit Bhavsar (Open ERP) (amb-openerp) wrote :

Hello Damian,

I have checked your scenario, but I think you might have a missed something...

Due date is changed base on the invoice date. If Invoice date is not available than due date set base on current date.

In your scenario, due date is set "31 Mar 2013" based on current date: "14 Feb 2013". after that action, set the invoice date as 10 oct 2012. but due date is still unchanged. Obvious It's not changed without any action. If you try "Validate" this Invoice than due date is changed. So would please try in this way.
Hope this will help for you.

Thanks and waiting for your reply!

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Damien D. (ddelangle) wrote :

Hi,

I agree with you.

Due date is an important information in the invoicing validation process. Due date should be correctly set **before** any validation and not after. Another way to say that is that there should not be any difference between a draft and a confirmed invoice.

So I recommand that this change should be done with an onchange method as soon as the action "invoice date has changed" occurs.

Thanks!

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Damien,

Not a bug actually, but consider as a improvement.

Thanks for the suggestion!

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Wishlist
status: Incomplete → Confirmed
summary: - Due date on supplier invoice
+ set a on_change on invoice_date for calculate the Due date on supplier
+ invoice
Revision history for this message
Stéphane Bidoul (Acsone) (sbi) wrote :

Hello Amit,

I believe that, for supplier invoices, computing the due date on validation is actually a bug.

For customer invoices, it is indeed correct to recompute the due date on validation, as it must match the payment term selected and printed on the invoice.

For supplier invoices, however, the automatic computation of the due date is a way to help the user. However, if the user types in another due date, it must be preserved and not recomputed based on the payment terms that are "hidden" in another tab.

Therefore I also believe that, for supplier invoices only, the due date must be recomputed when the date changes, but left unchanged upon validation.

Can you please reconsider the status of this bug?

Thanks!

-sbi

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.