Steps to reproduce: 1- install sales ,accounting, project, timesheets 2- create a new service product p1 that triggers a project and a task 3- create a new sales order so with p1 and validate 1 hour in the task 4- create an invoice from so, an anayltic account is added 5- edit any field of product_id, account_id, partner_id, date 6- the analytic default rule is applied (in this case none) so the anayltic account is removed Bug: the `compute_analytic_account_id` method forces the analytic default rule even if the field is already set before the changes Fix: apply analytic default rule only if the analytic acount is not set and if it is not a project generated move OPW-2833912 closes odoo/odoo#94034 X-original-commit: 7f69d623265a53be854eca474876bde2a0b14df6 Signed-off-by: Laurent Stukkens (ltu) <ltu@odoo.com>
10 lines
217 B
Python
10 lines
217 B
Python
# -*- coding: utf-8 -*-
|
|
|
|
from . import account_move
|
|
from . import product
|
|
from . import project
|
|
from . import project_milestone
|
|
from . import sale_order
|
|
from . import sale_order_line
|
|
from . import res_config_settings
|