Files
odoo_source/addons/analytic/static/tests
Yolann Sabaux 95d36e4049 [FIX] analytic, sale: use partner_name in newly created analytic account
Steps to reproduce:
- Activate Analytic Account
- Create a Service Product - create project on order
- Create a quotation with the product
- Confirm the quotation
- Go on the project -> analytic account is "order # - partner_name"
- On the quotation - Create Invoice

Issue 1:
- The invoice has "order #" has the analytic account and not the "order # - partner_name"

Issue 2:
- if you create an invoice and wants to select the analytic account
  you cannot search it by the partner name, only by the "order #"

Cause:
When confirming the quotation, we create an analytic account. The
default name of the analytic account is the order name:
https://github.com/odoo/odoo/blob/bba5b6a440544151cc610bbc6848adfbadb38bfb/addons/sale/models/sale_order.py#L1416

Why is the analytic account displayed correctly on the project?
Because we use the `get_name` is triggered:
https://github.com/odoo/odoo/blob/bff34e0e8a8b2d211ef90ffea4f43c514e8cad28/addons/analytic/models/analytic_account.py#L115-L123

In the analytic distribution view, we only render the name of the
analytic account as it is defined primarly.

opw-3165655

closes odoo/odoo#117770

X-original-commit: b709a4491074169f6203ba98dec8847036262d6d
Signed-off-by: William André (wan) <wan@odoo.com>
2023-04-05 15:11:36 +02:00
..