Skip to content

Commit 11cbd44

Browse files
committed
[FIX] project_hr_expense: fixed action of expense
Steps to reproduce: - On a fresh DB install only project_hr_expense(Uninstall project_sale_expense). - Create a expense on a project. - Go to Project Updates/ Dashboard - i.e., project right side panel Issue: - You can see that there is no action click on Expense while there should be. Reason: - Incorrect configuration of attaching ids into the action causing this. Solution: - Fixed the incorrect in which action is being generated. task-4175573 closes odoo#182682 X-original-commit: dba2e26 Signed-off-by: Xavier Bol (xbo) <[email protected]> Signed-off-by: K Theja (kthe) <[email protected]>
1 parent 090906c commit 11cbd44

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

addons/project_hr_expense/models/project_project.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,10 @@ def _get_expenses_profitability_items(self, with_action=True):
9999
}
100100
if can_see_expense:
101101
args = [section_id, [('id', 'in', expense_ids)]]
102-
if expense_ids:
103-
args.append(expense_ids)
102+
if len(expense_ids) == 1:
103+
args.append(expense_ids[0])
104104
action = {'name': 'action_profitability_items', 'type': 'object', 'args': json.dumps(args)}
105-
expense_profitability_items['action'] = action
105+
expense_profitability_items['costs']['action'] = action
106106
return expense_profitability_items
107107

108108
def _get_profitability_aal_domain(self):

0 commit comments

Comments
 (0)