Aurélien Warnon 016a99f745 [IMP] sale_timesheet: improve 'task_in_project' to handle more use cases
Task #1915660

Purpose
=======

If one or more sale_order_line have a product configured with this option, a new 'project_id' field appears
on the sale_order under the 'Sales Information' section.
When a project_id is selected, the analytic account on the sale order is automatically changed
to this project's analytic account.

This allows handling more use cases on sale_order:
- If a sale_order_line has a service product with that new option and no project_id configured on the sale_order:
  -> create a new project based on the configured project_template_id and then create a task in that project
     (same behavior as before)
- If a sale_order_line has a service product with that new option and a project_id is configured on the sale_order:
  -> directly create a task in the selected project_id

The behavior does not change for the 3 other options ('no', 'task_global_project' and 'project_only').

Specs
=======

Add project field on sale order in other info tab, shows only when a product on the SO has the option activated
if projec its selected on SO, create task in this project

Tech Spec (jem)
=======

On product:
- rename 'task_new_project' into "task_in_project" (help message precise either new project (based on template) or
  SO's project is prior
- allow to have the new option with project template

On sale order:
- non stored computed field to check if at least one SOL has the new option.
- if so, display project field
- selectable project are billate_type in 'no' and 'task_rate' (TBC for the 2nd)
  [awa: also add 'analytic_account_id' != False in domain]
- setting project on SO should change the AA of the SO.
  [awa: add onchange on project_id to select this project's analytic account on the SO]
- Never link SO's project to SO or AA
  [awa: do not touch the project_id's sale_order_id and analytic_account_id fields for this use case]
- 2 SOL with new option (no template) will create 2 tasks in SO's project
- 2 SOL with new options (one no template, one with) + 1 SOL "create new P no T" --> create 2 tasks in SO's project
  and one new project
2019-03-14 14:31:04 +00:00
…
…
…
…
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

Then follow the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%