Browse Source

[IMP][pos_trade_receivable_autoreconcile] ACL for pos user to reconcile entries

Do not reconcile as SUPERUSER
pull/27/head
Andrius Preimantas 9 years ago
parent
commit
1d589c2c6a
  1. 2
      pos_trade_receivable_autoreconcile/README.rst
  2. 1
      pos_trade_receivable_autoreconcile/__openerp__.py
  3. 6
      pos_trade_receivable_autoreconcile/model/point_of_sale.py
  4. 2
      pos_trade_receivable_autoreconcile/security/ir.model.access.csv

2
pos_trade_receivable_autoreconcile/README.rst

@ -27,6 +27,8 @@ counterpart like this:
When this module is installed 2), 3) and 5) items would be reconciled when
closing a session.
Module also grants access rights for POS users to create reconciliation records
Usage
=====

1
pos_trade_receivable_autoreconcile/__openerp__.py

@ -12,6 +12,7 @@
'point_of_sale',
],
'data': [
'security/ir.model.access.csv',
],
'installable': True,
'application': False,

6
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, SUPERUSER_ID
from openerp import models
class POSOrder(models.Model):
@ -18,7 +18,7 @@ class POSOrder(models.Model):
grouped_data = {}
for order in self.browse(cr, SUPERUSER_ID, ids, context=context):
for order in self.browse(cr, uid, ids, context=context):
current_company = order.sale_journal.company_id
order_account = (
order.partner_id and
@ -50,6 +50,6 @@ class POSOrder(models.Model):
if not value:
continue
self.pool.get('account.move.line').reconcile_partial(
cr, SUPERUSER_ID, value)
cr, uid, value)
return to_ret

2
pos_trade_receivable_autoreconcile/security/ir.model.access.csv

@ -0,0 +1,2 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_account_move_reconcile,account.move.reconcile,account.model_account_move_reconcile,point_of_sale.group_pos_user,1,1,1,0
Loading…
Cancel
Save