Bad maturity date with particular payment term

Bug #402263 reported by Alexis Deméaulte
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Wishlist
gpa(OpenERP)

Bug Description

Hi,

For re-product this bug you have to create an invoice :
 - with two lines in the payment (for create two maturity dates in the journal)
 - with a financial journal with the "group invoice line" option checked

Now create the invoice and open the journal. Because of the payment with two lines, we should see two maturity dates, but it's not the case, because the two lines are regroup in one by the "group invoice line" of the journal.

For fix this I propose this patch which add a condition when the account move lines are regrouped :

=== modified file 'account/invoice.py'
--- account/invoice.py 2009-07-06 18:59:08 +0000
+++ account/invoice.py 2009-07-21 14:51:00 +0000
@@ -615,6 +615,7 @@
                     tmp += '-'+str('tax_code_id' in l and l['tax_code_id'] or "False")
                     tmp += '-'+str('product_id' in l and l['product_id'] or "False")
                     tmp += '-'+str('analytic_account_id' in l and l['analytic_account_id'] or "False")
+ tmp += '-'+str('date_maturity' in l and l['date_maturity'] or "False")

                     if tmp in line2:
                         am = line2[tmp]['debit'] - line2[tmp]['credit'] + (l['debit'] - l['credit'])

Changed in openobject-addons:
assignee: nobody → gpa(tiny) (gpa-openerp)
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello Alexis,

If I am getting you correctly, you want X dates in one line when it merges X lines into 1.
As the lines are grouped into one, we will definately have display of only ONE date.

How can it display 2 dates in one field only?

This is not a bug, not a valid bug too.

Kindly give more information If we misunderstood your point.

Thank you.

Changed in openobject-addons:
status: New → Invalid
Revision history for this message
Alexis Deméaulte (alexis-demeaulte) wrote :

Hello Jay,

I don't want display X dates in one lines, I want one line pear date. So if you have a payment term, for example with 40 % at 30 days and 60 % at 60 days, you should have two moves line :

 - the first line with the first date at 30 days, and 40 % of the amount of the invoice
 - the second line with the second date at 60 days, and 60 % of the amount of the invoice

Currently the code group lines and I'm ok with the fact that it's impossible to display two dates in one field, that why I proposed this patch which don't group lines when the maturity date aren't the same, and generate X lines instead of one.

Do you see more precisely what I mean ?

Changed in openobject-addons:
status: Invalid → Incomplete
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello Alexis,

I agree with what you say, but we can't treat this as a bug or flow-breaking issue.

Let us consider it as a wishlist.

Thanks.

Changed in openobject-addons:
importance: Undecided → Wishlist
status: Incomplete → Confirmed
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Fixed by revision 2349 <email address hidden>.
Kindly check again and let us know.
Thank you for the patch.

Changed in openobject-addons:
status: Confirmed → Fix Released
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.