Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
9124 Vistas

Hi

I am using V13 .

How can i define new status for Quotation or SO or PO?

Like  when the customer or vendor acknowledged the RFQ i can change PO to acknowledge


Best Regrades. 

Abdulmonem Alholimi

SKY IT Account Manager  

Avatar
Descartar
Mejor respuesta

Hi,
You have to do customization to achieve this in Odoo.
We dont know how much you can understand this. Since you are  an account manager.
There is a 'state' field in sale.order object.

You have to override that field and add your state in to. in the below example you can see a new state called 'waiting' is added.


This isn't enough, Now you have only added the value to the list of states. You have to add related changes in tho the UI.

You can see how we added the approve button to the sales form view in below example. same way you can add your own button.

Then You have to add a new method to change the current state to your new state when you click the button.


You have to do at least this much to get a new state in Sale order/Quotation. Same has to be done with Purchase Order.

If you need this state to be included in filters and other areas, there are still many things to do.

Avatar
Descartar
Mejor respuesta

Hello Abdulmonem,

You can add the new option in the selection field by passing the selection_add parameter in the field definition.

In your case, you need to inherit the required model and add the new option in the state field like below.

state = fields.Selection(selection_add=[('acknowledged', 'Acknowledged')]

Now you can set this at your action. You can make a button to Approve the RFQ and set the state to Acknowledged. Then the order can be confirmed only in Acknowledged state. You can achieve it by overriding this function.

\https://github.com/odoo/odoo/blob/13.0/addons/purchase/models/purchase.py#L334

Check if the order in Acknowledged state otherwise continues.


Feel free to ask in case of any query.

Thanks,

Aman Prakash,

Webkul Software Private Limited

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
abr 21
2247
0
feb 19
1861
1
mar 15
3193
2
dic 23
4082
1
sept 23
1752