← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 509204] Re: Refund invoices don't support sequences by fiscal year

 

@RME As far as I've checked, on 5.0 you may have two journals (i.e. Sale Journal and Sale Refund Journal) with different sequences. So when you manually create a sale invoice one sequence is used, and when you *manually* create a refund a different sequence is used. 
The problem seems to be that, if you try to refund one invoice (instead of creating a refund invoice by hand) using the wizard (like most people would do), then the Sale Journal sequence (instead of the Refund Journal) is used! 

On 6.0RC1 they may be using different sequences because they are in
different journals and the invoice number just reflects the journal
entry number. But that may be invalid on some countries, see bug 66821
("[6.0] Invoices use the 'Journal Sequence' instead of the 'Invoice
In/Out' sequences").

-- 
Refund invoices don't support sequences by fiscal year
https://bugs.launchpad.net/bugs/509204
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP OpenObject.

Status in OpenObject Addons Modules: Confirmed

Bug description:
Currently it is not possible to have different sequences for invoices and refund invoices, and have at the same time sequences by fiscal year.

On the current implementation (5.0 revno 2536 and trunk 2749), you can either (note: I'm talking just about sales, but it is the same for purchases):
  - Use a sequence for sale invoices, and a different sequence for sale refund invoices. This is done by default:
  - Use a sequence by fiscal year (for both the sale invoices and the sale refund invoices); the sequence used (that has subsequences by fiscal year) is specified on the journal configuration.

But it is not possible to:
  - Use a sequence by fiscal year for the sale invoices, and a different sequence by fiscal year for the sale refund invoices. (not possible because you can only specify a sequence per journal, and both the sale invoices and sale refunds use the same journal!)

On some countries (like Spain), it is required that refund invoices use a different sequence than normal invoices; plus, companies usually use sequences per fiscal year.

It's an easy-to solve problem, though... we just need to be able to define both the invoice and refund sequences for the journals, and let action_number (in account/invoice.py) use the right one. See the attached patch.
  * Note: See the comments. There is an alternative way to solve it: 'fix' the refund wizard from the account module, so it uses the "refund journal" option of the journals.