[IMP]sale_usability_misc:make opportunity_id visible for sale manager group instead of dev mode group

This commit is contained in:
2025-07-22 15:41:53 +02:00
committed by LaetitiaElabore
parent be44c3c5d4
commit a7c005c839
2 changed files with 23 additions and 8 deletions

View File

@@ -3,7 +3,7 @@
{ {
"name": "sale_usability_misc", "name": "sale_usability_misc",
"version": "16.0.1.0.0", "version": "16.0.1.0.1",
"author": "Elabore", "author": "Elabore",
"website": "https://elabore.coop", "website": "https://elabore.coop",
"maintainer": "Elabore", "maintainer": "Elabore",
@@ -12,7 +12,7 @@
"summary": "Various improves for Sales app", "summary": "Various improves for Sales app",
# any module necessary for this one to work correctly # any module necessary for this one to work correctly
"depends": [ "depends": [
"base","sale","sales_team", "base","sale","sales_team","sale_crm",
], ],
"qweb": [], "qweb": [],
"external_dependencies": { "external_dependencies": {

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8"?>
<odoo> <odoo>
<record id="view_order_form_inherit" model="ir.ui.view"> <record id="view_order_form_inherit" model="ir.ui.view">
@@ -6,12 +6,27 @@
<field name="model">sale.order</field> <field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form" /> <field name="inherit_id" ref="sale.view_order_form" />
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//group[@name='order_details']/div[@class='o_td_label' and @groups='base.group_no_one']" position="attributes"> <xpath
<attribute name="groups">sales_team.group_sale_manager</attribute> expr="//group[@name='order_details']/div[@class='o_td_label' and @groups='base.group_no_one']"
</xpath> position="attributes">
<xpath expr="//group[@name='order_details']/field[@name='date_order' and @groups='base.group_no_one']" position="attributes">
<attribute name="groups">sales_team.group_sale_manager</attribute> <attribute name="groups">sales_team.group_sale_manager</attribute>
</xpath> </xpath>
<xpath
expr="//group[@name='order_details']/field[@name='date_order' and @groups='base.group_no_one']"
position="attributes">
<attribute name="groups">sales_team.group_sale_manager</attribute>
</xpath>
</field>
</record>
<record id="sale_opportunity_not_dev_inherit" model="ir.ui.view">
<field name="name">sale.opportunity.not.dev.inherit</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">sales_team.group_sale_manager</attribute>
</xpath>
</field> </field>
</record> </record>