summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorOlivier Dony <odo@openerp.com>2014-08-13 11:50:04 +0200
committerOlivier Dony <odo@openerp.com>2014-08-13 11:50:04 +0200
commitf2788afe92ebe3f823e2a2cfa58ccb68bc9d3eea (patch)
tree0840a5942732eaecfdfc9bc4efd40db1557b17c3 /addons
parent18fe7abcc64093800238d8261673d146af6bc6c6 (diff)
[FIX] portal_sale: browse data for payment acquirer form with superuser ID
The payment form needs to be rendered for non-employee users, and may require accessing extra financial data not available for those users.
Diffstat (limited to 'addons')
-rw-r--r--addons/portal_sale/portal_sale.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/portal_sale/portal_sale.py b/addons/portal_sale/portal_sale.py
index 49624671f98..d5b38b9c57e 100644
--- a/addons/portal_sale/portal_sale.py
+++ b/addons/portal_sale/portal_sale.py
@@ -20,6 +20,7 @@
##############################################################################
from openerp.osv import osv, fields
+from openerp import SUPERUSER_ID
class sale_order(osv.Model):
@@ -35,7 +36,7 @@ class sale_order(osv.Model):
def _portal_payment_block(self, cr, uid, ids, fieldname, arg, context=None):
result = dict.fromkeys(ids, False)
payment_acquirer = self.pool.get('portal.payment.acquirer')
- for this in self.browse(cr, uid, ids, context=context):
+ for this in self.browse(cr, SUPERUSER_ID, ids, context=context):
if this.state not in ('draft', 'cancel') and not this.invoiced:
result[this.id] = payment_acquirer.render_payment_block(cr, uid, this, this.name,
this.pricelist_id.currency_id, this.amount_total, context=context)