Maybe i do not understand you correctly. But for me this sounds really
complicated. I do not see where it will be easier after that.
IMHO i would prefer a central point for the sequences but for larger
installations it maybe could be better to have the sequences as a sub
menu of each module.
i also do not see how this change will affect the code of setting the
reference from your example.
Am Donnerstag, den 07.01.2010, 18:50 +0100 schrieb Chenal Bertrand:
> Hi all,
>
> Currently, sequences are referenced by (hardcoded) custom strings, for
> example (taken from sale.py) :
>
> reference = sequence_obj.get(cursor, user, 'sale.sale',
> context=context)
> self.write(cursor, user, sale_id, {
> 'reference': reference,
> }, context=context)
>
> And the string 'sale.sale' can be found in the code column of the
> ir_sequence table.
>
> So we (me and cedk) propose some refactoring to use a more traditional
> approach :
>
> Each module that needs one or more sequence will adds one (or more) M2O
> (pre-filled to point to the default sequence) on the company object (if
> the sequence cannot be shared across companies, like the invoice number)
> or on a singleton object (if a sequence is used by all the companies,
> like for the party numbering.
>
> Above that, and to avoid to give write access to the company model to a
> lot of users (each user that is allowed to change one sequence), we
> propose to use function field on singletons :
> Updating those function fields (of type m2o and pointing to ir.sequence)
> will update the company record.
>
> So at the end all sequences will be available on singletons, some with
> regular fields, some with function field that show/edits the values on
> the company record.
>
> The main advantage is that UI will be greatly simplified:
> - no need to get lost on the administration menu to find the sequences,
> they will be available as a submenu of each module).
> - when opening the singleton with the sequences, the user sees currently
> used sequences and only them (not for example the invoice sequence of
> two year ago), so it's easier and more straightforward to edit them.
>
> Has this modification will needs to be carefully migrated, we would like
> you to share your thought, remarks and questions.
>
> Many thanks.
>
> --
> [email protected] mailing list
--
Korbinian Preisler
____________________________________
virtual things
Preisler & Spallek GbR
Munich - Aix-la-Chapelle
Windeckstr. 77
81375 Munich - Germany
Tel: +49 (89) 710 481 55
Fax: +49 (89) 710 481 56
[email protected]
http://www.virtual-things.biz
--
[email protected] mailing list