Point of Sale crashes when opening a Session

Bug #1289430 reported by Thom Schweitz on 2014-03-07
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Banking Addons
Undecided
Unassigned

Bug Description

After installing banking-addons-70 on OpenERP Versie 7.0-20140303-001304 and start a Point of Sale session the application crashes en produces the error below. Included in with report is screen image of the installed versions of the banking-addons-70 modules
-----------------------------------------------------

Client Traceback (most recent call last):
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20140303_001304-py2.7.egg/openerp/addons/web/http.py", line 204, in dispatch
    response["result"] = method(self, **self.params)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20140303_001304-py2.7.egg/openerp/addons/web/controllers/main.py", line 1132, in call_button
    action = self._call_kw(req, model, method, args, {})
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20140303_001304-py2.7.egg/openerp/addons/web/controllers/main.py", line 1120, in _call_kw
    return getattr(req.session.model(model), method)(*args, **kwargs)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20140303_001304-py2.7.egg/openerp/addons/web/session.py", line 42, in proxy
    result = self.proxy.execute_kw(self.session._db, self.session._uid, self.session._password, self.model, method, args, kw)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20140303_001304-py2.7.egg/openerp/addons/web/session.py", line 30, in proxy_method
    result = self.session.send(self.service_name, method, *args)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20140303_001304-py2.7.egg/openerp/addons/web/session.py", line 103, in send
    raise xmlrpclib.Fault(openerp.tools.ustr(e), formatted_info)

Server Traceback (most recent call last):
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20140303_001304-py2.7.egg/openerp/addons/web/session.py", line 89, in send
    return openerp.netsvc.dispatch_rpc(service_name, method, args)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20140303_001304-py2.7.egg/openerp/netsvc.py", line 292, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20140303_001304-py2.7.egg/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20140303_001304-py2.7.egg/openerp/osv/osv.py", line 190, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20140303_001304-py2.7.egg/openerp/osv/osv.py", line 132, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20140303_001304-py2.7.egg/openerp/osv/osv.py", line 199, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20140303_001304-py2.7.egg/openerp/osv/osv.py", line 187, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20140303_001304-py2.7.egg/openerp/addons/point_of_sale/wizard/pos_session_opening.py", line 53, in open_session_cb
    session_id = proxy.create(cr, uid, values, context=context)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20140303_001304-py2.7.egg/openerp/addons/point_of_sale/point_of_sale.py", line 339, in create
    statement_id = self.pool.get('account.bank.statement').create(cr, uid, bank_values, context=context)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20140303_001304-py2.7.egg/openerp/addons/account/account_cash_statement.py", line 220, in create
    res_id = super(account_cash_statement, self).create(cr, uid, vals, context=context)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20140303_001304-py2.7.egg/openerp/addons/account/account_bank_statement.py", line 33, in create
    return super(account_bank_statement, self).create(cr, uid, vals, context=context)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20140303_001304-py2.7.egg/openerp/addons/mail/mail_thread.py", line 250, in create
    thread_id = super(mail_thread, self).create(cr, uid, values, context=context_operation)
  File "/opt/bitnami/apps/openerp-addons-3rd-party/openerp-magento-connector/openerp-connector/connector/producer.py", line 42, in create
    record_id = create_original(self, cr, uid, vals, context=context)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20140303_001304-py2.7.egg/openerp/osv/orm.py", line 4525, in create
    self._validate(cr, user, [id_new], context)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20140303_001304-py2.7.egg/openerp/osv/orm.py", line 1540, in _validate
    if not fun(self, cr, uid, ids):
  File "/opt/bitnami/apps/openerp-addons-3rd-party/banking-addons-70/account_banking/account_banking.py", line 317, in _check_company_id
    cr, uid, ids, context=context)
  File "/opt/bitnami/apps/openerp/lib/openerp-7.0_20140303_001304-py2.7.egg/openerp/addons/account/account_bank_statement.py", line 145, in _check_company_id
    if statement.company_id.id != statement.period_id.company_id.id:
AttributeError: 'NoneType' object has no attribute 'id'

Hi Thom,

thanks for reporting. I could easily confirm the bug. We don't use cashbox (which causes the problems in POS) and I was not aware of the incompatibilities. The attached branch is solving some of them, but there is at least one remaining problem: cash statements are confirmed with a different procedure than bank statements. As account_banking puts the state on the statement line, this state is not updated on confirmation of the cash statement. Eventually, this can lead to double entries after closing and revalidating a cash statement. So don't use the attached branch unless you want to continue working on the fix.

Changed in banking-addons:
status: New → Confirmed
Mike Nivato (c-mike-3) wrote :

We don't need the POS system but we do love to have good (petty) cash control. Is there a workaround for this?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers