Skip to content
Permalink
Browse files

[FIX] {website}_sale: transaction access

Payment providers can be used without eCommerce. Therefore, we should be
able to access the payment transactions with only `sale` installed.

opw-1941591
  • Loading branch information...
nim-odoo committed Feb 20, 2019
1 parent 726aeef commit 06f287699d87ed8762ffbeaf0cc3965534618ba5
Showing with 15 additions and 13 deletions.
  1. +15 −0 addons/sale/security/sale_security.xml
  2. +0 −13 addons/website_sale/security/website_sale.xml
@@ -134,5 +134,20 @@
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[(4, ref('sales_team.group_sale_salesman_all_leads'))]"/>
</record>

<!-- Payment transactions and tokens access rules -->

<record id="payment_transaction_salesman_rule" model="ir.rule">
<field name="name">Access every payment transaction</field>
<field name="model_id" ref="payment.model_payment_transaction"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
</record>

<record id="payment_token_salesman_rule" model="ir.rule">
<field name="name">Access every payment token</field>
<field name="model_id" ref="payment.model_payment_token"/>
<field name="groups" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
</record>
</data>
</odoo>
@@ -23,19 +23,6 @@
<field name="perm_unlink" eval="False"/>
</record>

<record id="payment_transaction_salesman_rule" model="ir.rule">
<field name="name">Access every payment transaction</field>
<field name="model_id" ref="payment.model_payment_transaction"/>
<field name="domain_force">[(1, '=', 1)]</field>
<field name="groups" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
</record>

<record id="payment_token_salesman_rule" model="ir.rule">
<field name="name">Access every payment token</field>
<field name="model_id" ref="payment.model_payment_token"/>
<field name="groups" eval="[(4, ref('sales_team.group_sale_salesman'))]"/>
</record>

<record id="sales_team.group_sale_manager" model="res.groups">
<field name="implied_ids" eval="[(4, ref('website.group_website_publisher'))]"/>
</record>

0 comments on commit 06f2876

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.