From 2f6ee9973cdd401413840ddbc60232723dd548f6 Mon Sep 17 00:00:00 2001 From: Andrius Preimantas Date: Thu, 21 May 2015 10:59:33 +0300 Subject: [PATCH] [FIX] POS user might not have rights to reconcile entries. We do that as SUPERUSER --- pos_trade_receivable_autoreconcile/model/point_of_sale.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pos_trade_receivable_autoreconcile/model/point_of_sale.py b/pos_trade_receivable_autoreconcile/model/point_of_sale.py index 4c99d3ad..3bd12a08 100644 --- a/pos_trade_receivable_autoreconcile/model/point_of_sale.py +++ b/pos_trade_receivable_autoreconcile/model/point_of_sale.py @@ -2,7 +2,7 @@ # This file is part of OpenERP. The COPYRIGHT file at the top level of # this module contains the full copyright notices and license terms. -from openerp import models +from openerp import models, SUPERUSER_ID class POSOrder(models.Model): @@ -18,7 +18,7 @@ class POSOrder(models.Model): grouped_data = {} - for order in self.browse(cr, uid, ids, context=context): + for order in self.browse(cr, SUPERUSER_ID, ids, context=context): current_company = order.sale_journal.company_id order_account = ( order.partner_id and @@ -46,6 +46,6 @@ class POSOrder(models.Model): break for key, value in grouped_data.iteritems(): self.pool.get('account.move.line').reconcile_partial( - cr, uid, value) + cr, SUPERUSER_ID, value) return to_ret