[FIX] stock_account: Allow inventory users to view the bill
To reproduce the issue: 1. On [Settings]>[Users & Companies]>[Users] add a user with: - admin rights to purchase and accounting, user right to inventory - admin rights to all three 2. Go to [Purchase], create a RFQ and click Create Bill 3. On the top right corner left of Receipt, Vendor Bills will be shown 4. It is only viewed by user with admin rights to all three apps Request: Allow Inventory users to view vendor bills as in pre-versions Applicable versions: 16.0 up to master opw-3135682 closes odoo/odoo#111564 X-original-commit: bee4d91d030e305ba8c44704a38c4fd8d614997b Signed-off-by: Adrien Widart <awt@odoo.com> Signed-off-by: Lee, Hansun (hale) <hale@odoo.com>
This commit is contained in:
@@ -16,7 +16,7 @@ class AccountMove(models.Model):
|
||||
for move in self:
|
||||
for line in move.line_ids:
|
||||
# if a line has correction layers hide the 'Reset to Darft' button
|
||||
if line._get_stock_valuation_layers(move).stock_valuation_layer_ids.filtered('account_move_line_id'):
|
||||
if line.sudo()._get_stock_valuation_layers(move).stock_valuation_layer_ids.filtered('account_move_line_id'):
|
||||
move.show_reset_to_draft_button = False
|
||||
break
|
||||
|
||||
|
||||
Reference in New Issue
Block a user