92f030597b9101c82d882ab7e9a714050f06a141
Current behaviour: When creating a new quotation from an FSM task, if we use a template that adds a line that is a service that would have added a task on SO confirmation, no new task is generated. Expected behaviour: A new task should be created, just like when we add manually the line with service without using a quotation template. Steps to reproduce: - Install FSM - Activate "Extra Quotations" from Settings - Create a new service that generates a task on SO confirmations - Create a new quotation template, add a line that uses the service we created. - In a FSM task, click on "New Quotation" - Add the template to the quotation and confirm it - Observe there is no Task attached to the SO. No new task was created. Reason for the problem: When we create a new quotation view the action "New Quotation", we add in the context a key `default_task_id` with the current task that generated the quotation. When we add a template, an onchange is triggered which creates the lines for the SO, and since we have a `default_task_id` in the context, the related task of the new line is set to the task we came from. This prevent subsequently the creation of a task if the service was supposed to generate a new task on SO confirmation. Fix: Add an override when generating the data used to create the lines when the onchange is triggered, explicitly setting the `task_id` on the line to `False` if the key is in the context and the service would've generated a task. Affected versions: - 15.0 - saas-15.2 - 16.0 - saas-16.1 - saas-16.2 - saas-16.3 - master opw-3360403 closes odoo/odoo#127811 X-original-commit: 06eeefc94f08cc01786c82b769d1c488e0e1c483 Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com> Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
…
…
…
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, ...
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.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%