diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2019-10-24 11:38:31 +0000 |
|---|---|---|
| committer | fw-bot <otis@odoo.com> | 2019-10-25 07:33:12 +0000 |
| commit | fe6b351e04b7aa7d311cc07362d82f9843dde862 (patch) | |
| tree | d7b876351e302cd81491045bf3c707b33ce1f477 /addons/partner_autocomplete/static | |
| parent | c86d37c755204f469e1653312493d8cceb2ec05a (diff) | |
[FIX] mrp_account: access to BOM
- Install MRP and Accounting
- Create a user with only 'Billing' as access right
- Create a customer invoice
- Add a line, type some text (e.g. 'desk'), then click on 'Search
more...'
An `AccessError` is raised.
It arises because of this:
https://github.com/odoo/odoo/blob/e2d7cf7898704c82f25556b0b0edb87c05ec5903/addons/mrp/models/product.py#L112
The user has no access to `mrp.bom`, leading to the error.
Since the user has access to stock moves and pickings (thanks to the
rules `access_stock_picking_invoicing_payments` and
`access_stock_move_invoicing_payments`, it makes sense to give him
access to `mrp.bom` and `mrp.bom.line`. Moreover, adding a `sudo` on the
mentioned line could cause issues since `_bom_find` performs a search
which is company dependent.
opw-2089556
closes odoo/odoo#39365
X-original-commit: 59ea1993bc5ddb66675bfc2bff70a626cd14b645
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Diffstat (limited to 'addons/partner_autocomplete/static')
0 files changed, 0 insertions, 0 deletions
