Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2 Antwoorden
1166 Weergaven

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
Annuleer
Auteur

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

Beste antwoord

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
Annuleer

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>

Auteur Beste antwoord

Hi Jainesh

thank you very much, works perfect.

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
3
jun. 24
2609
0
apr. 24
1344
1
mrt. 23
2929
0
apr. 22
1549
0
apr. 17
2501