Ir al contenido
Menú
Se marcó esta pregunta
4 Respuestas
8298 Vistas

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
Descartar
Mejor respuesta

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
Descartar

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

Mejor respuesta

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
Descartar
Autor Mejor respuesta

@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
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
0
ago 21
4690
1
may 25
992
2
nov 24
2200
0
ago 24
1013
4
feb 24
12363