Sequence not set on One2Many with first form view
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')].