openerp-india team mailing list archive
-
openerp-india team
-
Mailing list archive
-
Message #16907
[Bug 1067375] Re: [trunk / 6.1] system error creating invoice in multi-company context when customer has no payable/receivable account for current user's company
Hello Stephane,
Thanks for the good bug report!
The stack trace is below.
Server Traceback (most recent call last):
File "/home/amp/workspace/rdtools/web/trunk/addons/web/session.py", line 91, in send
return openerp.netsvc.dispatch_rpc(service_name, method, args)
File "/home/amp/workspace/rdtools/server/trunk/openerp/netsvc.py", line 361, in dispatch_rpc
result = ExportService.getService(service_name).dispatch(method, params)
File "/home/amp/workspace/rdtools/server/trunk/openerp/service/web_services.py", line 585, in dispatch
res = fn(db, uid, *params)
File "/home/amp/workspace/rdtools/server/trunk/openerp/osv/osv.py", line 167, in execute_kw
return self.execute(db, uid, obj, method, *args, **kw or {})
File "/home/amp/workspace/rdtools/server/trunk/openerp/osv/osv.py", line 121, in wrapper
return f(self, dbname, *args, **kwargs)
File "/home/amp/workspace/rdtools/server/trunk/openerp/osv/osv.py", line 176, in execute
res = self.execute_cr(cr, uid, obj, method, *args, **kw)
File "/home/amp/workspace/rdtools/server/trunk/openerp/osv/osv.py", line 164, in execute_cr
return getattr(object, method)(cr, uid, *args, **kw)
File "/home/amp/workspace/rdtools/addons/trunk/account/account_invoice.py", line 453, in onchange_partner_id
if p.property_account_receivable.company_id.id != company_id and p.property_account_payable.company_id.id != company_id:
AttributeError: 'NoneType' object has no attribute 'id'
** Changed in: openobject-addons
Importance: Undecided => Medium
** Changed in: openobject-addons
Status: New => Confirmed
** Changed in: openobject-addons
Assignee: (unassigned) => OpenERP R&D Addons Team 3 (openerp-dev-addons3)
--
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1067375
Title:
[trunk / 6.1] system error creating invoice in multi-company context
when customer has no payable/receivable account for current user's
company
Status in OpenERP Addons (modules):
Confirmed
Bug description:
Hello,
When creating a customer invoice in a multi-company context, a stack-
trace is generated when the user selects a customer which has no
payable/receivable account defined for the current user's company.
This applies to 6.1 and trunk.
How to reproduce:
1. install trunk, accounting module, no demo data, initialize the Belgian chart of account for the default company
2. activate multi-company feature in general settings
3. set multi-company and technical feature right for user Administrator
4. create a customer named Customer1
5. create a new company called Mother Company and set it as parent of the default Company, do not create an account chart for the mother company
6. in user preferences, switch to Mother Company
7. create a new Customer Invoice:
* a warning is produced saying there is no sales journal on Mother Company; this is normal
* select the Sales Journal
* select Customer 1 -> stack trace below
Expected result: no stack trace or a warning.
I'll attach a merge proposal.
-sbi
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1067375/+subscriptions
References