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