[FIX] sale_project: clicking on materials button projects updates working
Steps to rerpoduce: - Create a sales order with a subscription that has also materials, we need that the service product creates a project when a quotation is made - Inside this project, we go to Project Updates, click on Materials. Issue: Materials is throwing an error, so we cannot check the materials in the project. Solution: After the project changes to OWL we need to change the way we pass the parameters to the 'action_profitability_items', so it matches the new changes. opw-3024598 closes odoo/odoo#104069 X-original-commit: 67731daf264fb17dbde1d360ba5e285cd193b446 Signed-off-by: Xavier <xbo@odoo.com>
This commit is contained in:
@@ -385,14 +385,14 @@ class Project(models.Model):
|
||||
._filter_access_rules_python('read')
|
||||
if sale_order_items:
|
||||
if sale_order_items:
|
||||
args = [section_name, [('id', 'in', sale_order_items.ids)]]
|
||||
if len(sale_order_items) == 1:
|
||||
args.append(sale_order_items.id)
|
||||
action_params = {
|
||||
'name': 'action_profitability_items',
|
||||
'type': 'object',
|
||||
'section': section_name,
|
||||
'domain': json.dumps([('id', 'in', sale_order_items.ids)]),
|
||||
'args': json.dumps(args),
|
||||
}
|
||||
if len(sale_order_items) == 1:
|
||||
action_params['res_id'] = sale_order_items.id
|
||||
other_revenues['action'] = action_params
|
||||
sequence_per_invoice_type = self._get_profitability_sequence_per_invoice_type()
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user