[IMP] sale_{project,timesheet}: add default values for timesheets action
This commit adds some default values for the action used in the SOLs containing a service product shown in the Sales section. task-2814466 Part-of: odoo/odoo#88219
This commit is contained in:
@@ -267,7 +267,7 @@ class Project(models.Model):
|
||||
def get_action(sol_id):
|
||||
""" Return the action vals to call it in frontend if the user can access to the SO related """
|
||||
action, res_id = action_per_sol.get(sol_id, (None, None))
|
||||
return {'action': action, 'res_id': res_id, 'additional_context': json.dumps({'active_id': sol_id})} if action else {}
|
||||
return {'action': action, 'res_id': res_id, 'additional_context': json.dumps({'active_id': sol_id, 'default_project_id': self.id})} if action else {}
|
||||
|
||||
return [{
|
||||
**sol_read,
|
||||
|
||||
@@ -109,6 +109,7 @@
|
||||
'search_default_billable_timesheet': True,
|
||||
'search_default_week': 1,
|
||||
'default_so_line': active_id,
|
||||
'default_is_so_line_edited': True,
|
||||
}</field>
|
||||
<field name="help" type="html">
|
||||
<p class="o_view_nocontent_smiling_face">
|
||||
|
||||
Reference in New Issue
Block a user