← Back to team overview

openerp-community-reviewer team mailing list archive

[Bug 1356382] [NEW] [7.0][Multi company] Error in confirming statement line when company is different than base company

 

Public bug reported:

[Pre-requisite]
* Multicompany module
* Accounting module

[steps to reproduce bug]
* Create bank statement for non base company
* Add statement line
* confirm statement line

[Traceback]
<pre> Error occurred while validating the field(s) company_id: Account and Period must belong to the same company.
Traceback (most recent call last):
  File "/home/openerp/7.0/server/openerp/netsvc.py", line 296, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/home/openerp/7.0/server/openerp/service/web_services.py", line 626, in dispatch
    res = fn(db, uid, *params)
  File "/home/openerp/7.0/server/openerp/osv/osv.py", line 190, in execute_kw
    return self.execute(db, uid, obj, method, *args, **kw or {})
  File "/home/openerp/7.0/server/openerp/osv/osv.py", line 132, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home/openerp/7.0/server/openerp/osv/osv.py", line 199, in execute
    res = self.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/openerp/7.0/server/openerp/osv/osv.py", line 187, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/openerp/7.0/banking-addons/account_banking/banking_import_transaction.py", line 1562, in confirm
    statement_pool = self.pool.get('account.bank.statement')
  File "/home/openerp/7.0/banking-addons/account_banking/account_banking.py", line 405, in create_move_from_st_line
    context=localctx)
  File "/home/openerp/7.0/7.0-fixes/account_voucher/account_voucher.py", line 1645, in create_move_from_st_line
    return super(account_bank_statement, self).create_move_from_st_line(cr, uid, st_line.id, company_currency_id, next_number, context=context)
  File "/home/openerp/7.0/7.0-fixes/account/account_bank_statement.py", line 359, in create_move_from_st_line
    move_line_id = account_move_line_obj.create(cr, uid, bank_move_vals, context=context)
  File "/home/openerp/7.0/7.0-fixes/account/account_move_line.py", line 1221, in create
    result = super(account_move_line, self).create(cr, uid, vals, context=context)
  File "/home/openerp/7.0/openerp-connector/connector/producer.py", line 42, in create
    record_id = create_original(self, cr, uid, vals, context=context)
  File "/home/openerp/7.0/server/openerp/osv/orm.py", line 4567, in create
    self._validate(cr, user, [id_new], context)
  File "/home/openerp/7.0/server/openerp/osv/orm.py", line 1581, in _validate
    raise except_orm('ValidateError', '\n'.join(error_msgs))
except_osv: ('ValidateError', u'Error occurred while validating the field(s) company_id: Account and Period must belong to the same company.')
</pre>

** Affects: banking-addons
     Importance: Undecided
         Status: New

** Description changed:

  [Pre-requisite]
  * Multicompany module
  * Accounting module
  
  [steps to reproduce bug]
  * Create bank statement for non base company
  * Add statement line
  * confirm statement line
  
  [Traceback]
- Error occurred while validating the field(s) company_id: Account and Period must belong to the same company.
+ <pre> Error occurred while validating the field(s) company_id: Account and Period must belong to the same company.
  Traceback (most recent call last):
-   File "/home/openerp/7.0/server/openerp/netsvc.py", line 296, in dispatch_rpc
-     result = ExportService.getService(service_name).dispatch(method, params)
-   File "/home/openerp/7.0/server/openerp/service/web_services.py", line 626, in dispatch
-     res = fn(db, uid, *params)
-   File "/home/openerp/7.0/server/openerp/osv/osv.py", line 190, in execute_kw
-     return self.execute(db, uid, obj, method, *args, **kw or {})
-   File "/home/openerp/7.0/server/openerp/osv/osv.py", line 132, in wrapper
-     return f(self, dbname, *args, **kwargs)
-   File "/home/openerp/7.0/server/openerp/osv/osv.py", line 199, in execute
-     res = self.execute_cr(cr, uid, obj, method, *args, **kw)
-   File "/home/openerp/7.0/server/openerp/osv/osv.py", line 187, in execute_cr
-     return getattr(object, method)(cr, uid, *args, **kw)
-   File "/home/openerp/7.0/banking-addons/account_banking/banking_import_transaction.py", line 1562, in confirm
-     statement_pool = self.pool.get('account.bank.statement')
-   File "/home/openerp/7.0/banking-addons/account_banking/account_banking.py", line 405, in create_move_from_st_line
-     context=localctx)
-   File "/home/openerp/7.0/7.0-fixes/account_voucher/account_voucher.py", line 1645, in create_move_from_st_line
-     return super(account_bank_statement, self).create_move_from_st_line(cr, uid, st_line.id, company_currency_id, next_number, context=context)
-   File "/home/openerp/7.0/7.0-fixes/account/account_bank_statement.py", line 359, in create_move_from_st_line
-     move_line_id = account_move_line_obj.create(cr, uid, bank_move_vals, context=context)
-   File "/home/openerp/7.0/7.0-fixes/account/account_move_line.py", line 1221, in create
-     result = super(account_move_line, self).create(cr, uid, vals, context=context)
-   File "/home/openerp/7.0/openerp-connector/connector/producer.py", line 42, in create
-     record_id = create_original(self, cr, uid, vals, context=context)
-   File "/home/openerp/7.0/server/openerp/osv/orm.py", line 4567, in create
-     self._validate(cr, user, [id_new], context)
-   File "/home/openerp/7.0/server/openerp/osv/orm.py", line 1581, in _validate
-     raise except_orm('ValidateError', '\n'.join(error_msgs))
+   File "/home/openerp/7.0/server/openerp/netsvc.py", line 296, in dispatch_rpc
+     result = ExportService.getService(service_name).dispatch(method, params)
+   File "/home/openerp/7.0/server/openerp/service/web_services.py", line 626, in dispatch
+     res = fn(db, uid, *params)
+   File "/home/openerp/7.0/server/openerp/osv/osv.py", line 190, in execute_kw
+     return self.execute(db, uid, obj, method, *args, **kw or {})
+   File "/home/openerp/7.0/server/openerp/osv/osv.py", line 132, in wrapper
+     return f(self, dbname, *args, **kwargs)
+   File "/home/openerp/7.0/server/openerp/osv/osv.py", line 199, in execute
+     res = self.execute_cr(cr, uid, obj, method, *args, **kw)
+   File "/home/openerp/7.0/server/openerp/osv/osv.py", line 187, in execute_cr
+     return getattr(object, method)(cr, uid, *args, **kw)
+   File "/home/openerp/7.0/banking-addons/account_banking/banking_import_transaction.py", line 1562, in confirm
+     statement_pool = self.pool.get('account.bank.statement')
+   File "/home/openerp/7.0/banking-addons/account_banking/account_banking.py", line 405, in create_move_from_st_line
+     context=localctx)
+   File "/home/openerp/7.0/7.0-fixes/account_voucher/account_voucher.py", line 1645, in create_move_from_st_line
+     return super(account_bank_statement, self).create_move_from_st_line(cr, uid, st_line.id, company_currency_id, next_number, context=context)
+   File "/home/openerp/7.0/7.0-fixes/account/account_bank_statement.py", line 359, in create_move_from_st_line
+     move_line_id = account_move_line_obj.create(cr, uid, bank_move_vals, context=context)
+   File "/home/openerp/7.0/7.0-fixes/account/account_move_line.py", line 1221, in create
+     result = super(account_move_line, self).create(cr, uid, vals, context=context)
+   File "/home/openerp/7.0/openerp-connector/connector/producer.py", line 42, in create
+     record_id = create_original(self, cr, uid, vals, context=context)
+   File "/home/openerp/7.0/server/openerp/osv/orm.py", line 4567, in create
+     self._validate(cr, user, [id_new], context)
+   File "/home/openerp/7.0/server/openerp/osv/orm.py", line 1581, in _validate
+     raise except_orm('ValidateError', '\n'.join(error_msgs))
  except_osv: ('ValidateError', u'Error occurred while validating the field(s) company_id: Account and Period must belong to the same company.')
+ </pre>

** Project changed: ocb-addons => banking-addons

-- 
You received this bug notification because you are a member of OpenERP
Community Backports, which is subscribed to OpenERP Community Backports
(Addons).
https://bugs.launchpad.net/bugs/1356382

Title:
  [7.0][Multi company] Error in confirming statement line when company
  is different than base company

Status in OpenERP Banking Addons:
  New

Bug description:
  [Pre-requisite]
  * Multicompany module
  * Accounting module

  [steps to reproduce bug]
  * Create bank statement for non base company
  * Add statement line
  * confirm statement line

  [Traceback]
  <pre> Error occurred while validating the field(s) company_id: Account and Period must belong to the same company.
  Traceback (most recent call last):
    File "/home/openerp/7.0/server/openerp/netsvc.py", line 296, in dispatch_rpc
      result = ExportService.getService(service_name).dispatch(method, params)
    File "/home/openerp/7.0/server/openerp/service/web_services.py", line 626, in dispatch
      res = fn(db, uid, *params)
    File "/home/openerp/7.0/server/openerp/osv/osv.py", line 190, in execute_kw
      return self.execute(db, uid, obj, method, *args, **kw or {})
    File "/home/openerp/7.0/server/openerp/osv/osv.py", line 132, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/home/openerp/7.0/server/openerp/osv/osv.py", line 199, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/home/openerp/7.0/server/openerp/osv/osv.py", line 187, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File "/home/openerp/7.0/banking-addons/account_banking/banking_import_transaction.py", line 1562, in confirm
      statement_pool = self.pool.get('account.bank.statement')
    File "/home/openerp/7.0/banking-addons/account_banking/account_banking.py", line 405, in create_move_from_st_line
      context=localctx)
    File "/home/openerp/7.0/7.0-fixes/account_voucher/account_voucher.py", line 1645, in create_move_from_st_line
      return super(account_bank_statement, self).create_move_from_st_line(cr, uid, st_line.id, company_currency_id, next_number, context=context)
    File "/home/openerp/7.0/7.0-fixes/account/account_bank_statement.py", line 359, in create_move_from_st_line
      move_line_id = account_move_line_obj.create(cr, uid, bank_move_vals, context=context)
    File "/home/openerp/7.0/7.0-fixes/account/account_move_line.py", line 1221, in create
      result = super(account_move_line, self).create(cr, uid, vals, context=context)
    File "/home/openerp/7.0/openerp-connector/connector/producer.py", line 42, in create
      record_id = create_original(self, cr, uid, vals, context=context)
    File "/home/openerp/7.0/server/openerp/osv/orm.py", line 4567, in create
      self._validate(cr, user, [id_new], context)
    File "/home/openerp/7.0/server/openerp/osv/orm.py", line 1581, in _validate
      raise except_orm('ValidateError', '\n'.join(error_msgs))
  except_osv: ('ValidateError', u'Error occurred while validating the field(s) company_id: Account and Period must belong to the same company.')
  </pre>

To manage notifications about this bug go to:
https://bugs.launchpad.net/banking-addons/+bug/1356382/+subscriptions


Follow ups

References