[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.
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-requisite]
* Multicompany module
* Accounting module
[steps to reproduce bug]
* Create bank statement for non base company
* Add statement line
* confirm statement line
[Traceback] openerp/ 7.0/server/ openerp/ netsvc. py", line 296, in dispatch_rpc getService( service_ name).dispatch( method, params) openerp/ 7.0/server/ openerp/ service/ web_services. py", line 626, in dispatch openerp/ 7.0/server/ openerp/ osv/osv. py", line 190, in execute_kw openerp/ 7.0/server/ openerp/ osv/osv. py", line 132, in wrapper openerp/ 7.0/server/ openerp/ osv/osv. py", line 199, in execute openerp/ 7.0/server/ openerp/ osv/osv. py", line 187, in execute_cr openerp/ 7.0/banking- addons/ account_ banking/ banking_ import_ transaction. py", line 1562, in confirm get('account. bank.statement' ) openerp/ 7.0/banking- addons/ account_ banking/ account_ banking. py", line 405, in create_ move_from_ st_line localctx) openerp/ 7.0/7.0- fixes/account_ voucher/ account_ voucher. py", line 1645, in create_ move_from_ st_line bank_statement, self).create_ move_from_ st_line( cr, uid, st_line.id, company_ currency_ id, next_number, context=context) openerp/ 7.0/7.0- fixes/account/ account_ bank_statement. py", line 359, in create_ move_from_ st_line move_line_ obj.create( cr, uid, bank_move_vals, context=context) openerp/ 7.0/7.0- fixes/account/ account_ move_line. py", line 1221, in create move_line, self).create(cr, uid, vals, context=context) openerp/ 7.0/openerp- connector/ connector/ producer. py", line 42, in create original( self, cr, uid, vals, context=context) openerp/ 7.0/server/ openerp/ osv/orm. py", line 4567, in create _validate( cr, user, [id_new], context) openerp/ 7.0/server/ openerp/ osv/orm. py", line 1581, in _validate orm('ValidateEr ror', '\n'.join( error_msgs) )
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/
result = ExportService.
File "/home/
res = fn(db, uid, *params)
File "/home/
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/home/
return f(self, dbname, *args, **kwargs)
File "/home/
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/
statement_pool = self.pool.
File "/home/
context=
File "/home/
return super(account_
File "/home/
move_line_id = account_
File "/home/
result = super(account_
File "/home/
record_id = create_
File "/home/
self.
File "/home/
raise except_
except_osv: ('ValidateError', u'Error occurred while validating the field(s) company_id: Account and Period must belong to the same company.')