跳至內容
選單
此問題已被標幟
2 回覆
1160 瀏覽次數

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


頭像
捨棄
作者

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

最佳答案

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

頭像
捨棄

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>

作者 最佳答案

Hi Jainesh

thank you very much, works perfect.

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
3
6月 24
2601
0
4月 24
1342
1
3月 23
2926
0
4月 22
1547
0
4月 17
2497