Skip to content
Snippets Groups Projects
Commit 33bb3165 authored by Nicolas Martinelli's avatar Nicolas Martinelli
Browse files

[FIX] account_analytic_default_purchase: access error


- Activate Analytic Accounting
- Set the demo user with only the Purchase User access rights (no
  accounting access rights)
- Create a PO with demo

An AccessError is raised because the user has no access to
`account.analytic.default`.

We can use `sudo` to retrieve the default account. There is no access
rights error on `account_analytic_id` or `analytic_tag_ids` later on.

Fix the `company_id` at the same time.

opw-2171813

closes odoo/odoo#43431

X-original-commit: ef5cc35b
Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
parent 206b197c
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment