On 2017-06-20 09:08, Richard PALO wrote:
> Not very fluent in proteus nor the recent ir.sequence usage changes, I'm 
> having difficulty
> getting a critical portion of the openerp2tryton to work on 4.4...
> 
> In migrate_party, there is the following code around line 254 (nb:this has 
> been 2to3'd):
> >     # Reset the sequence
> >     configuration = Configuration(1)
> >     configuration.party_sequence.number_next = max(
> >         list(map(int, iter(code2party.keys())))) + 1
> >     configuration.party_sequence.save()
> > 
> 
> Unfortunately party_sequence is null and I can't seem to determine the 
> incantation
> that will fill it in correctly...

Is it also null when using the client?
Did you do a proper installation?

> I tried to use get_multivalue() using somewhat as model a snippet from 
> account/party.py but I
> get the error that get_multivalue() isn't available (where it is in vanilla 
> tryton code).

multivalue is for the server side. It must be transparent on client
side.

> I tried accessing directly 'ir.sequence' for 'party.party' and I can set 
> number_next but cannot 'save()' the record as the method isn't available.

This is very strange, proteus as 'save' method for all Models.

> Using update_sql_sequence()
> doesn't seem to work in this context either. So I presume this is probably a 
> false route.

It should neither be called directly.

> Any hints on how to actualise the reference party_sequence under 
> Configuration?
> Where does ConfigurationSequence play into things, if it does?

It is the hidden model that actually store the value of the multivalue
field.

-- 
Cédric Krier - B2CK SPRL
Email/Jabber: [email protected]
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

-- 
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/20170620122722.GC18592%40kei.

Reply via email to