El 29/05/16 a les 12:45, PhiJ ha escrit:
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()

This is because exists a default value for the addresses field:

http://hg.tryton.org/modules/party/file/tip/party.py#l109

You can remove the default address with:

>>> party.addresses.pop()

Another question that I have is related with the error "Bypass an access
rule". I know it is related with the user permissions, but I cannot find
how to solve it. For example, I am trying to create with Proteus with
the admin user a sequence ("ir.sequence"), I gave to my admin user all
the permissions for this module, but anyway it keeps throwing me this error:
*You try to bypass an access rule. Document type: ir.sequence*
How I should give permissions to my user to avoid this error?

What kind of sequence are creating? Are you sure you are using the correct sequence type? I normally see this error when there is a typo in the sequence type name.

Thanks a lot in advance. Best regards.

--
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/c81baf57-74ba-4c98-ab58-3eb602abfbc6%40googlegroups.com
<https://groups.google.com/d/msgid/tryton/c81baf57-74ba-4c98-ab58-3eb602abfbc6%40googlegroups.com?utm_medium=email&utm_source=footer>.


--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

--
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/574BE8C3.1080308%40koolpi.com.

Reply via email to