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)', ''))


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/0e4c8863-b85a-483d-b51b-4e08393d9bb4%40googlegroups.com.

Reply via email to