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

closes #31270
  • Loading branch information...
nim-odoo committed Feb 20, 2019
1 parent 3461637 commit 18eb4372798104fee7a69b52f04ef65d719f0264
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 18eb437

Please sign in to comment.
You can’t perform that action at this time.