Skip to Content
Menu
This question has been flagged
1 Reply
4180 Views

Version: odoo 10 Community

Modules installed: Sales, Timesheet, Project

Status:

User creates product as a Service and select Track Service as "Timesheets on project".

Quotation was created with that product and it was saved.

User click on "Confirm Sale" and odoo automatically creates Analytic Account and Project. Project button appears in that new Sales order.

Problem:

User creates Sales Order and confirms sales with the product that is not related to "Timesheets on project".
User then click Edit on the Sales Order and add product related to "Timesheets on project" and click Save. Odoo doesn't create link to Project, because the method is activated on action_confirm() of the sale.order, and user cannot create timesheet for that product.

Question:

We would like to create method that will inherit sale.order and override write() method calling action_confirm() of the Confirm Sale button every time when the user click on Save button.
What model we need to use to do that?

Thank you!


Avatar
Discard
Best Answer

Hi Sabirnica,

Answer on your question: sale.order model.

BUT:

Are you sure you want to confirm the order every time you save?

- Imagine cases where you do a sales order and there is a mistake, so you want to edit it but not yet confirm it.

- Imagine it is already confirmed and related to a project. confirming it again on save might creates again a project, bring duplications here and there that you do not want.

- In general odoo let some fields become readonly on the confirmation. Since it is not logic to change them after confirmation and creation of a delivery order or purchase order or manufacturing order with the old data.

So you might need to think of adding some if conditions or another way of working with the system, as duplicate the sales order, edit the duplication, then confirm it and cancel the first sales order.



Avatar
Discard
Related Posts Replies Views Activity
1
Jul 18
2488
1
Mar 15
4913
0
Nov 24
25
0
Jul 23
925
0
Apr 21
2849