← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 662821] Re: [6.0] Invoices use the "Journal Sequence" instead of the "Invoice In/Out" sequences

 

I am testing the account_sequence module, and understanding what it
does, i get this:

Configure my journal with :
 * 2 different sequence ( sequence_id and internal_sequence_id fields)
 * Sale type

Make and Validate one Invoice -> the account move create get name and internal_sequence_number set the values with sequences from journal.
Create manually a move in the same journal and again and both fields are set name and internal_sequence_number.
Results:
Move from invoice: name: 2010/01 internal_sequence_number: 2010/01
Manual move: name: 2010/02 internal_sequence_number: 2010/02

As you see *both* sequence are called, the account_sequence must
consider in the code if the move does not comes from Invoice document
just use internal_sequence_id from Journal adn write the value in name
and internal_sequence_number fields, this keeps the sequence_id ( aka.
Invoice sequence).

This[1] is the code in post method redefined in account_sequence.py file
from account_move i think the post method must redefined completely and
dont use super call, so in parent post method the name field is wrote
with Entry Sequence (sequence_id field from journal).


Waiting your feedback, regards,

[1] http://paste.pocoo.org/show/307565/

PS: i'll post a patch

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/662821

Title:
  [6.0] Invoices use the "Journal Sequence" instead of the "Invoice In/Out" sequences 

Status in OpenObject Addons Modules:
  Fix Released

Bug description:
  The invoices, on addons 6.0 (revid jth@xxxxxxxxxxx-20101018132907-9cnfm4yzn3w01gox) use the Journal Sequence by default instead of the "Invoice In/Out/Refund In/Refund Out" sequences, and it is not possible to setup the sequence to use (the "invoice_sequence_id" field has been removed from the view).

That is completely invalid, as the invoices will have holes in their numbering!, so this bug should be considered critical.

HOW TO REPRODUCE:

  - On a fresh database with the accounting installed and no invoices nor journal entries yet:
  - Create an invoice and confirm it. The invoice will receive number "1" (the same as the journal entry for the invoice).
  - Pay the invoice (voucher), the voucher journal entry will receive number "2".
  - Create a new invoice and confirm it. The invoice will receive number "3" (instead of "2").

NOTES:

On some countries like Spain, we should have a single sequence for all the journal entries (as if we had a single journal), but we may have several invoice sequences.
Also, at least on Spain, we are not allowed to renumber the invoices (after handing it to a customer) under any circumstance, but its common to renumber the accounting entries (they only have to be numbered sequentially by date on the fiscal year closing).
And finally, on Spain, we don't need to restart the invoices sequence each year, but we must do so with the journal entries sequence.







References