Le 20/06/2017 à 17:09, Richard PALO a écrit :
The following code, for example, works as expected if I manually install party 
and select
the party sequence with the tryton client.
     # Reset the sequence
     Sequence = Model.get('ir.sequence')
     configuration = Configuration(1)
     if not configuration.party_sequence:
         configuration.party_sequence = Sequence.find([('code', '=', 
'party.party')])
     configuration.party_sequence.number_next = max(
         list(map(int, iter(code2party.keys())))) + 1
     configuration.party_sequence.save()



I believe I just realised that Sequence.find() is a multivalued function, so 
after changing thus:

         configuration.party_sequence, = Sequence.find([('code', '=', 
'party.party')])
the workaround does seem to be okay in the end.

--

Richard PALO

--
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/de68c09c-188e-0f78-e2a0-b3a4a16a8c51%40free.fr.

Reply via email to