Skip to Content
Menu
This question has been flagged
4 Replies
7415 Views

Hi!

When I enable technical features I get the following view in a sale.order (apparently no pictures here…).

Click on Other Information => Reporting Section shows with a link to the Opportunity.

With tech. features disabled this section does not show. So there is no way to get back to the Opportunity. How can I show this always for all users that have sale.order access rights?

Version: Odoo 9.0

–Flo

Avatar
Discard
Best Answer

This is because the view in sale_crm indicate that the field is only visible for member of group 'base.group_no_one', which is a special group. You belong to that group if you are currently in debug mode (tech features)..


If you want the field opportunity to be shown in the form view of the sale order even when you are not in debug mode, you can simply create a new view in a module:


<record id="sale_view_inherit123" model="ir.ui.view">
<field name="name">sale.order.form.odc</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale_crm.sale_view_inherit123"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='opportunity_id']" position="attributes">
<attribute name="groups"/>
</xpath>
</field>
</record>
Avatar
Discard

Good answer. This can also be created via the User Interface. Settings --> Technical --> User Interface --> Views. The module approach inserts an ir.ui.view record into Odoo, the UI approach has the user do the same thing.

Read more inheritance concept: https://goo.gl/4Zyc9d

Best Answer

Hello,

you also have to change in Inherited view "sale.order.form" the access from the "reporting"-group.

 <group string="Reporting" name="technical" groups="sales_team.group_sale_salesman">

                                    <field groups="sales_team.group_sale_salesman" name="origin"/>

                                </group>


Then it will work.

Avatar
Discard
Author Best Answer

@Ray Carnes: How would I do that? I added the two fields that I want to view, but they are only shown when in debug mode?! What line do I need in the view? I could write something like:

<field name="origin" groups="base.group_sale_salesman_all_leads"/>
<field name="opportunity_id" groups="base.group_sale_salesman_all_leads"/>

But that does not work either. I also tried without the extra groups without success.

I also tried, just changing the access rights for the fields, but that does not work at all. It complains, that the rights for base fields cannot be set: Properties of base fields cannot be altered in this manner! Please modify them through Python code, preferably through a custom addon!  

Avatar
Discard
Related Posts Replies Views Activity
0
Aug 21
3492
2
Nov 24
473
0
Aug 24
118
4
Feb 24
10157
1
Jan 24
369