On Sunday, June 11, 2017 at 6:59:14 PM UTC+9, Dr. Praveen Bhatia wrote:
>
> Hi,
>    Following code in python/proteus gives UserError.
>
>
>     AccountTemplate = Model.get('account.account.template')
>     Account = Model.get('account.account')
>     FiscalYear = Model.get('account.fiscalyear')
>     Sequence = Model.get('ir.sequence')
>     SequenceStrict = Model.get('ir.sequence.strict')
>
>     root_template, = AccountTemplate.find([
>         ('parent', '=', None),
>         ('name', '=', 'Minimal Account Chart'),
>         ])
>     create_chart_account = Wizard('account.create_chart')
>     create_chart_account.execute('account')
>     create_chart_account.form.account_template = root_template
>     create_chart_account.form.company = company
>     create_chart_account.execute('create_account')
>
>
> Keeps giving the error at the last line above:
>
> UserError: ('UserError', (u'You try to bypass an access rule.\n(Document 
> type: account.account.type)', ''))
>
>

Also, how do we know what access rules we are bypassing? There is my some 
access rules file?  

>
> What is the resolution?
>
>
> There is one admin user, and one company
>
> ('Users = ', [proteus.Model.get('res.user')(1)])
> ('User belongs to company : ', proteus.Model.get('company.company')(1))
>
>

-- 
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/8600800a-91ee-4eda-b677-1eb66a5a9cb8%40googlegroups.com.

Reply via email to