| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Sales (sale_management)
• Invoicing (account) • Project (project) • Discuss (mail) |
| Lines of code | 84 |
| Technical Name |
nexterp_sale_task_create |
| License | OPL-1 |
| Website | https://www.nexterp.ro |
| Versions | 19.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Sales (sale_management)
• Invoicing (account) • Project (project) • Discuss (mail) |
| Lines of code | 84 |
| Technical Name |
nexterp_sale_task_create |
| License | OPL-1 |
| Website | https://www.nexterp.ro |
| Versions | 19.0 |
NextERP - Auto Create Sale Tasks
NextERP - Auto Create Sale Tasks
Overview
Switch project-task creation on sale_project from always-on to
opt-in. Standard Odoo creates a task as soon as a sale order with a
service product is confirmed; this module gates that behaviour
behind a per-order Auto Create Sale Tasks flag (defaulted from
the company setting) and adds a Generate Tasks button so users
can trigger the creation manually when the flag is off.
The override lives in sale.order.line._timesheet_service_generation:
when the create_tasks context key is missing, the standard
generator only runs for SO lines whose order has
sale_create_taks_auto = True. The button on the sale order form
calls action_generate_tasks, which loops through the order's lines
and runs the generator with create_tasks=True for any line that
does not yet have a task_id.
Targets project / services businesses where confirming a quotation should not always spawn tasks — for instance when sales teams prepare orders ahead of project staffing, or when tasks are created later from an external planning step.
Built & supported by NextERP Romania
Romanian Odoo specialists, here for the long run — from implementation to localization and day-to-day production support.
What we do
Odoo Solutions
From quick-start rollouts to multi-company deployments and custom modules built for your processes.
Romanian Localization
SAF-T (D406), e-Factura, e-Transport, D300 / D390 / D394, ANAF integration, full chart of accounts and fiscal positions.
Our Services
Implementation, customization, migration, integration, support and consultancy — Romanian-speaking, SLA-backed.
Features
- New boolean Auto Create Sale Tasks on
res.company, exposed in Settings → Sales → Quotations & Orders, controlling the default behaviour for all sale orders of that company. - Matching boolean on
sale.order, initialised from the company setting via anonchangeoncompany_idand shown next to the payment terms on the order form. - Override of
sale.order.line._timesheet_service_generation:- if the context flag
create_tasks=Trueis passed, all lines inselfgo through the standard generator; - otherwise the override filters lines so only those whose order
has
sale_create_taks_auto=Truetrigger task creation.
- if the context flag
- New action
sale.order.action_generate_tasksiterating overorder.order_line, calling_timesheet_service_generationwithcreate_tasks=Trueonly on lines that do not yet have atask_id;with_companyis used so multi-company orders keep the right project context. - New Generate Tasks button on the sale order form, placed next to Set to Draft, visible only when Auto Create Sale Tasks is off — turning the action into a one-click manual fallback.
- All
sudo()and company switching is handled inside the action so salespeople without full project access can still trigger task creation on their own orders.
Configuration
1. Company default
- Go to Settings → Sales → Quotations & Orders.
- Locate the Auto Create Sale Tasks setting.
- Tick it to keep the standard Odoo behaviour (tasks created automatically when a sale order with service lines is confirmed).
- Leave it unticked to switch the company to manual mode — sale orders will not generate tasks until the user clicks Generate Tasks on each order.
- Click Save.
2. Per-order override
- Open any quotation or sale order in Sales → Orders → Quotations / Orders.
- Next to the Payment Terms field, the Auto Create Sale
Tasks checkbox is shown. It is filled from the company default
via the
onchangeon Company, but you can override it per order:- On — tasks are created automatically on confirmation.
- Off — no tasks are created until Generate Tasks is clicked.
3. Prerequisites
- The module depends on
sale_project. Make sure the service products used on your orders have Product Type = Service and Service Tracking = Task in Project (or Project & Task) — the standard_timesheet_service_generationonly acts on these lines. - The default project on each service product (or on the order) must be set so tasks can be created in the right place.
4. Access rights
No new access rights are introduced. Standard Sales / Project
groups remain in charge. The Generate Tasks button runs through
sudo() and with_company() so users with Sales access but
limited Project rights can still trigger creation.
To install this module, you need to:
- clone the branch 14.0 of the repository https://github.com/NextERP-Romania/odoo-community
- add the path to this repository in your configuration (addons-path)
- update the module list
- search for "NextERP - Auto Create Sale Tasks" in your addons
- install the module
How it works
Automatic mode
When Auto Create Sale Tasks is ticked (either at company level or on the specific order), the behaviour matches stock Odoo:
- The user confirms a sale order containing service lines flagged as Task in Project.
_timesheet_service_generationruns as usual and creates one task per qualifying SO line.- The Generate Tasks button is hidden — there is nothing to trigger manually.
Manual mode
When the flag is off (company default or per-order override):
- The user confirms the sale order. No tasks are created — the
override on
_timesheet_service_generationfilters the order out becausesale_create_taks_autois False on the order. - The Generate Tasks button (red primary button next to Set to Draft) becomes visible. The user clicks it whenever the tasks should actually exist (after staffing decisions, billing confirmation, kick-off meeting, etc.).
action_generate_tasksiterates overorder.order_lineand, for every line that does not already have atask_id, calls_timesheet_service_generationwith thecreate_tasks=Truecontext. This forces the override to bypass the filter and create the task.- The button is safe to click multiple times: lines that already
have a
task_idare skipped, so it can also be used to catch up on later additions to the order.
Mixed orders
The flag applies to the whole sale order, but the standard generator already filters out non-service lines and lines that do not require a task. Mixed orders (services + goods) only generate tasks for the service lines, just like the original behaviour.
Switching mode mid-flight
- Changing the company default does not retroactively update
existing orders; the value is copied to each order at creation
through the
onchange. To enable / disable for an existing order, edit the Auto Create Sale Tasks field directly on the order form. - Switching from manual to automatic on an existing order does not
re-fire
_timesheet_service_generation. Click Generate Tasks (or temporarily switch the order to manual and click) to create the missing tasks.
Versions
19.0.1.0.1 (2026-05-25)
- Changelog tracking starts at this release.
Discover the NextERP suite
Other modules from the same publisher, built to work together.
NextERP Romania
Odoo implementation, customization, Romanian localization and long-term support since 2018.
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module