Comment 7 for bug 863221

Revision history for this message
Olivier Dony (Odoo) (odo-openerp) wrote :

As Naresh says, we have fixed this by considering a "preferred company" when selecting the sequence. By default the preferred company will be the company of the user, but this can be overridden for special cases. (Technically this works similarly to reading properties: by specifying a 'force_company' key in the context).
If no sequence is found for the preferred company, we fallback to selecting the first matching sequence that is currently visible to the user. Probably in that last case we should give priority to sequences that belong to a company rather than global sequences, because the former are presumed to be more specific than the latter.