Skip to Content
Menú
This question has been flagged
2 Respostes
1487 Vistes

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 :)

Best Answer

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 Best Answer

Hi Jainesh

thank you very much, works perfect.

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de juny 25
2251
2
de juny 25
578
3
de juny 24
3403
1
de març 23
3816
0
d’abr. 22
1887