[FIX] project: add name field in project list view for order

When we add a many2many field related to Project, an error is thrown
when we add 2 or more projects

Steps to reproduce:
1. Install CRM, Project and Studio
2. Go to CRM and open any quotation
3. Trigger Studio
4. Add a many2many field related to the Project model
5. Close Studio
6. On the CRM form, click on Add a line and select 2 projects, the 2
   projects must have the same sequence (new projects will have a
   sequence of 10)
7. An error is thrown

Problem:
The "name" field used in the order of the list view for project was not
present in the view so there was an error when trying to sort the list
by this field

opw-3526101

closes odoo/odoo#140950

X-original-commit: 334e6fc41725fe0bd7e6bae8e2153c6abedc71cf
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>
This commit is contained in:
MerlinGuillaume
2023-11-04 06:43:14 +00:00
parent 2b6b003a4a
commit 62f49331ba
@@ -222,6 +222,7 @@
<field name="arch" type="xml">
<tree decoration-muted="active == False" string="Projects" multi_edit="1" sample="1" default_order="is_favorite desc, sequence, name, id" js_class="project_project_list">
<field name="sequence" column_invisible="True"/>
<field name="name" invisible="1"/>
<field name="message_needaction" column_invisible="True"/>
<field name="active" column_invisible="True"/>
<field name="is_favorite" string="Favorite" nolabel="1" widget="boolean_favorite" optional="hide"/>