Comment 4 for bug 789832

Revision history for this message
Eric Caudal - www.elico-corp.com (elicoidal) wrote : Re: [Bug 789832] [NEW] Can not get a sequence_id from a child company

Maybe I didnot express myself correctly.

> Can you give me any example where the user (+ his company or so) would affect
> the numbering? Are we /ever/ allowed to use more than 1 sequence per
> journal/stock etc? [1]

I have a user which is in the holding company and can invoice in both
child company witht different numbering system. No need for several
sequence per journal but still when user X invoices for company A, it
should get the seq A from the journal A (and subsequently for B). Yes
company A should have journal A and sequence A and you cannot cross
reference here but still if in invoicing I should company A for which I
allowed to make invoice it should set all objects to A (and B if I
choose B).

> I had -long- [2] implemented a "condition" field in ir.sequence . There, I say,
> if we need to select sequence by any criteria, we could put a small expression
> and have it restrict the selection. So far, I discovered that using distinct
> journals has been the best practice, rather than trying to select among
> multiple sequences.

My question was more on the way the information is handle by python and
the function.
the get_id function should return all valid sequence number for a user
but then you need to be able to check if those sequence numbers are
valid (eg seq A for company B is invalid).
Concerning this validation, I was wondering if it is bettter to
implement it as a condition after get_id is called or send a filter as a
parameter.

>

Eric