[Feature]: add condition to ir.sequence, let it be partitioned.
authorP. Christeas <p_christ@hol.gr>
Wed, 9 Sep 2009 20:35:17 +0000 (23:35 +0300)
committerP. Christeas <p_christ@hol.gr>
Wed, 9 Sep 2009 20:35:17 +0000 (23:35 +0300)
commit2a16b998922d901a33dc0859ebf5afe7382cca47
tree0204a2931e3215d8f85f42bd118486c478f12b7b
parent5f7735346897f3b0bf8259f6c8737fcb5494cdd2
[Feature]: add condition to ir.sequence, let it be partitioned.

With this feature, multiple sequences may be defined per type. A weight
parameter will primarily order them. Then, the one whose condition is
true will be used.
This would let us write modules (calls to get() must be upgraded), where
the sequence numbering will depend on the data. Note that this is not
straghtforward, as the context passed must be carefully constructed. One
problem is that not all object data (eg category) may exist when the
sequence is called for a /new/ object (as a call for 'default').

The current code should be backwards compatible with old calls to get()
without a context.

bzr revid: p_christ@hol.gr-20090909203517-qahww8hika9t3zl8
bin/addons/base/ir/ir.xml
bin/addons/base/ir/ir_sequence.py