Currently if you configure an user without sales and mass mailing
rights you run into issues with links modules as
* sales data is computed on form view and requires sales access
rights;
* invite and contact buttons lead to tracebacks as their action
require mailing access rights;
In this commit we fix those issues by correctly setting groups
on fields.
Task ID 2184037
PR #53119
X-original-commit: af1a5d294b235e33a48b87c89886b24ea145450d
29 lines
1.3 KiB
XML
29 lines
1.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
|
|
<record id="view_event_form_inherit_ticket" model="ir.ui.view">
|
|
<field name="name">event.form.inherit</field>
|
|
<field name="model">event.event</field>
|
|
<field name="inherit_id" ref="event.view_event_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//div[hasclass('oe_button_box')]" position="inside">
|
|
<field name="currency_id" invisible="1"/>
|
|
<button name="action_view_linked_orders"
|
|
type="object" class="oe_stat_button" icon="fa-dollar"
|
|
groups="sales_team.group_sale_salesman"
|
|
help="Total sales for this event"
|
|
attrs="{'invisible': ['|', ('sale_price_subtotal', '=', 0), ('sale_price_subtotal', '=', False)]}">
|
|
<div class="o_field_widget o_stat_info">
|
|
<span class="o_stat_value">
|
|
<field string="Sales" name="sale_price_subtotal"
|
|
widget="monetary" options="{'currency_field': 'currency_id'}"/>
|
|
</span>
|
|
<span class="o_stat_text">Sales</span>
|
|
</div>
|
|
</button>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
</odoo>
|