On 2016-05-29 03:45, PhiJ wrote: > Hello everybody! > > I would like to make some questions when using Proteus. > > The first one is related with its use to create a party with these commands: > >>> Party = Model.get('party.party') > >>> party = Party() > >>> party.name = 'Test' > >>> party.save() > > It turns out that always that I execute this, it is created an empty > address for that party. Is there any way that this wouldn't happen? I tried > creating the address also before saving (see the following code), but > anyway it creates that empty entry: > >>> Party = Model.get('party.party') > >>> party = Party() > >>> party.name = 'Test' > >>> address = party.addresses.new(zip='42') > >>> party.save()
You should just pop the default created address: >>> party.addresses.pop() -- Cédric Krier - B2CK SPRL Email/Jabber: cedric.kr...@b2ck.com 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/20160530071217.GF27373%40tetsuo.