summaryrefslogtreecommitdiff
path: root/addons/payment/security
diff options
context:
space:
mode:
authorGoffin Simon <sig@odoo.com>2017-04-24 22:44:18 +0200
committerGoffin Simon <sig@odoo.com>2017-04-25 09:53:18 +0200
commit4c8c996f4d1ae3844a96ffcee7739db809ed2033 (patch)
treeb8f5b1c9124091076f3851e3c8cbb1f9e0e4d58a /addons/payment/security
parent08fcda5c94635b182f1e78176c0384c00952791f (diff)
[FIX] payment: Deleting payment tokens from website
When deleting payment tokens from website, in My account, by clicking on button "Manage your payment methods", the public user, the user and the portal user got a 403 error. But when creating a subscription for a customer with admin user and setting a payment token for the company of this customer. This payment token could not be deleted or modified by its users. In a few cases, it's needed to delete or modify a payment token, for example, when the expiration date of the payment token is expired. opw:740169
Diffstat (limited to 'addons/payment/security')
-rw-r--r--addons/payment/security/payment_security.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/payment/security/payment_security.xml b/addons/payment/security/payment_security.xml
index c5ad3f62fe7..df797070aed 100644
--- a/addons/payment/security/payment_security.xml
+++ b/addons/payment/security/payment_security.xml
@@ -15,7 +15,7 @@
<record id="payment_token_user_rule" model="ir.rule">
<field name="name">Access own payment tokens only</field>
<field name="model_id" ref="payment.model_payment_token"/>
- <field name="domain_force">[('partner_id','=',user.partner_id.id)]</field>
+ <field name="domain_force">['|', ('partner_id','=',user.partner_id.id), ('partner_id', '=', user.partner_id.commercial_partner_id.id)]</field>
<field name="groups" eval="[(4, ref('base.group_user')), (4, ref('base.group_portal')), (4, ref('base.group_public'))]"/>
</record>