Commit e35913e
committed
[FIX] mrp_account: fix BoM creation for non-accounting users
Currently, recalculating `analytic_distribution` requires access to
`account.analytic.distribution.model`. This breaks BoM creation for
non-accounting users (e.g. MRP managers). This commit fixes the issue by
using `sudo()._get_distribution`.
closes odoo#162243
X-original-commit: 3872e93
Signed-off-by: Arnold Moyaux (arm) <[email protected]>
Signed-off-by: Pawel Fertyk (pafe) <[email protected]>1 parent 3476356 commit e35913e
File tree
2 files changed
+10
-1
lines changed- addons/mrp_account
- models
- tests
2 files changed
+10
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
188 | 189 | | |
189 | 190 | | |
190 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
191 | 200 | | |
192 | 201 | | |
193 | 202 | | |
| |||
0 commit comments