Issue 8512

Title
Sequence not set on One2Many with first form view
Priority
bug
Status
unread
Nosy list
ced
Assigned to
Keywords

Created on 2019-07-19.13:09:59 by ced, last changed 16 months ago by ced.

Messages

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2019-07-19.13:09:59
The One2Many widget does not know there is a sequence because the tree view is not yet loaded.

I think the sequence definition should be changed. It should not be linked to the view but instead they should be bind to the Model and applied if the screen domain match a specific domain pattern or has a specific parent.
So it could be something like:

SaleLine.sequences = {
   'sequence': {
         'domain': [('sale', '=')],
         },
    'sequence': {
         'parent': 'sale',
    },
    'other_sequence': {
          'domain': [('type', '=', 'total')],
          'parent': 'sale',
   }

One sequence to be used when sale is fixed or if parent is the sale field.
And another sequence to be used when only total are shown inside the sale.

And only if the order is None or starts with [(<sequence field>, 'ASC NULLS FIRST')].
History
Date User Action Args
2019-07-19 13:09:59cedcreate

Showing 10 items. Show all history (warning: this could be VERY long)