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

We are creating our sale orders from the CRM-Module.


In the Sales-Module there is a "New" Button in tree, kanban, form and so on

I need to remove this button, so noone can create new quotations from this module form.

The only way should be to create Quotations only using the CRM.


Removing the "Create Access" for Sales Orders removes the possibility to create orders, this is to much, because this would also block the possibility to create orders from CRM.


I found the Buttons-Setup in \addons\web\static\src\views\form (kanbank, list, and so on)

Does anyone know how to address this New-Buttons in Sales using inherited views or the Models? Dot do i need to modify the controllers using js?


Beste regards


Avatar
Descartar
Autor

Hello Jainesh,
as already written it works fine, thank you again. But I encounter a new problem with this.
After setting create=0 I can't use the Duplicate-Function anymore.

Is there a chance to disable "create" while letting "duplicate" enabled?

Best Regards :)

Mejor respuesta

Hello @Luke


Hope you are doing well.


- To remove the "NEW" button from the sales module you need to pass create="0" on tree, form and kanban view using the code below. 


Please find code in comment. 


Feel free to contact me if needed

Hope this will help you.

Thanks & Regards,
Email:  odoo@aktivsoftware.com          

Skype: kalpeshmaheshwari

Avatar
Descartar

Please find code here :-

1) inherit the form "view_order_form" view and pass create="0":
<xpath expr="//form" position="attributes">
<attribute name="create">0</attribute>
</xpath>
2) inherit the list "view_quotation_tree, view_order_tree" view and pass create="0":
<xpath expr="//tree" position="attributes">
<attribute name="create">0</attribute>
</xpath>
3) inherit the kanban "view_sale_order_kanban" view and pass create="0":
<xpath expr="//kanban" position="attributes">
<attribute name="create">0</attribute>
</xpath>

Autor Mejor respuesta

Hi Jainesh

thank you very much, works perfect.

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
jun 25
2217
2
jun 25
572
3
jun 24
3379
1
mar 23
3796
0
abr 22
1876