Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Project Task Analytic Propagation
Entity: project.task
Compute Method: _compute_task_analytic_accounts
| Inputs | Method | Outputs |
|---|---|---|
|
+ plan_fnames = self._get_plan_fnames() + for task in self._origin or self: + # By using _origin, new records (with a NewId) are excluded and + # the computation works automagically for virtual onchange records as well + task_analytic_accounts = {} + with suppress(KeyError): + for fname in plan_fnames: + task[fname] = task.project_id[fname] + task_analytic_accounts.update({fname: task[fname].id}) + if task_analytic_accounts: + task._recalculate_timesheet_analytic_accounts(task_analytic_accounts) |
|
