[FIX] sale_timesheet: prevent CRUD from plan project for SO/INV
When coming from the project overview throught the sale orders, or invoices stat buttons, creating the object will not linked it to the project. This might confuse the users. The CRUD operation should be prevent from there, as this is reporting.
This commit is contained in:
@@ -414,7 +414,9 @@ class SaleTimesheetController(http.Controller):
|
||||
elif res_model == 'sale.order':
|
||||
action = clean_action(request.env.ref('sale.action_orders').read()[0])
|
||||
action['domain'] = domain
|
||||
action['context'] = {'create': False, 'edit': False, 'delete': False} # No CRUD operation when coming from overview
|
||||
elif res_model == 'account.invoice':
|
||||
action = clean_action(request.env.ref('account.action_invoice_tree1').read()[0])
|
||||
action['domain'] = domain
|
||||
action['context'] = {'create': False, 'edit': False, 'delete': False} # No CRUD operation when coming from overview
|
||||
return action
|
||||
|
||||
Reference in New Issue
Block a user