Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
1485 Tampilan

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
Buang
Penulis

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

Jawaban Terbai

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
Buang

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>

Penulis Jawaban Terbai

Hi Jainesh

thank you very much, works perfect.

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
1
Jun 25
2246
2
Jun 25
578
3
Jun 24
3398
1
Mar 23
3813
0
Apr 22
1886