This question has been flagged
2 Replies
2792 Views

I am looking for a possibility to add a number of conditions to an offer that must be met before the offer can actually be converted into an order.

In my case it is a quote for building garden sheds. Drawing up the quotation is not a problem and is neatly sent to the customer.
Converting the quotation to an order (to actually plan to build the garden shed) must meet the following conditions:

  1. Quotation has been approved by the customer (signature)

  2. A down payment by the customer  

  3. An approved building plan (via another internal department)

  4. In some cases: a building permit (based on the approved building plan)

NB: It could take up to 10 weeks in durations before all these conditions will  be met.

The intention is that on the relevant quotation page a few buttons are added with which the status of these conditions can be indicated. Only when all these conditions are  satisfied, it becomes possible to place an order for it.

How can I realize this in Odoo (v12)?

Avatar
Discard

Perhaps, this app - https://apps.odoo.com/apps/modules/12.0/sale_order_checklist/ - will let you reach your goal.

Author Best Answer

Thanks Niyas for your reply. 

But how do I do that? Could you give me an example of such a piece of code?

Regards, Erwin.

Avatar
Discard

first of all you have to fix which way you are going to do this, once it is done you can start making changes, for inheriting the view you can refer the link i have added in the answer, other things you want to know should be about the workflow: https://www.cybrosys.com/blog/defining-header-statusbar-and-buttons-in-odoo-v12

Most simple option is just add four new boolean fields to check whether these steps are completed, then super the action if the confirm button and check whether all the four fields are ticked or not. If not block the flow.

Best Answer

Hi,

In many ways you can do it. Either you can override the Confirm buttons action and check whether the all above conditions are met or not. If not you can raise warning and ask to complete these steps. There should be enough changes made in the view and code to understand whether the all steps is finished or not.


The other options are you can add new buttons for the above steps, and display each button when the previous one is completed, finally when all the above is completed you can show the confirm button.


To customize and make changes in existing form, refer this, even though it is for v12, same for the v10 too : Customize existing View

Thanks

Avatar
Discard