c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #28543
[Bug 810548] [NEW] multi-company invoice validation error
Public bug reported:
I try confirm invoice with admin user and another company. Then I get
error "Company must be same for its related account and period.".
Account and period are defined for same company.
After searching for a problem I find out that constrain
(_check_company_id) from the account_move_line have line:
"if l.company_id != l.account_id.company_id or l.company_id != l.period_id.company_id:" and field 'company_id': "
http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/view/head:/account/account_move_line.py#L587
and saw that company_id field is related with account_id:
'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)
http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/view/head:/account/account_move_line.py#L517
So question is why it needs check when l.company_id must be same like
l.account_id.company_id, because it is related field?
For me problem is that company_id is not same like
l.account_id.company_id, but when I comment 587 line everything goes
okay and account move and account move lines are created for same
company which was in invoice. So I think it is problem with related
field which don't show good value when I want confirm invoice.
** Affects: openobject-addons
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/810548
Title:
multi-company invoice validation error
Status in OpenERP Modules (addons):
New
Bug description:
I try confirm invoice with admin user and another company. Then I get
error "Company must be same for its related account and period.".
Account and period are defined for same company.
After searching for a problem I find out that constrain
(_check_company_id) from the account_move_line have line:
"if l.company_id != l.account_id.company_id or l.company_id != l.period_id.company_id:" and field 'company_id': "
http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/view/head:/account/account_move_line.py#L587
and saw that company_id field is related with account_id:
'company_id': fields.related('account_id', 'company_id', type='many2one', relation='res.company', string='Company', store=True, readonly=True)
http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/view/head:/account/account_move_line.py#L517
So question is why it needs check when l.company_id must be same like
l.account_id.company_id, because it is related field?
For me problem is that company_id is not same like
l.account_id.company_id, but when I comment 587 line everything goes
okay and account move and account move lines are created for same
company which was in invoice. So I think it is problem with related
field which don't show good value when I want confirm invoice.
To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/810548/+subscriptions
Follow ups
-
[Bug 810548] Re: multi-company invoice validation error
From: qdp (OpenERP), 2011-11-16
-
[Bug 810548] Re: multi-company invoice validation error
From: Divyesh Makwana(OpenERP), 2011-11-15
-
[Bug 810548] Re: multi-company invoice validation error
From: qdp (OpenERP), 2011-11-09
-
[Bug 810548] Re: multi-company invoice validation error
From: Divyesh Makwana(OpenERP), 2011-10-19
-
[Bug 810548] Re: multi-company invoice validation error
From: Launchpad Bug Tracker, 2011-10-19
-
[Bug 810548] Re: multi-company invoice validation error
From: Fabien (Open ERP), 2011-09-24
-
[Bug 810548] Re: multi-company invoice validation error
From: Paulius Sladkevičius - inovera . lt, 2011-08-02
-
[Bug 810548] Re: multi-company invoice validation error
From: Mustufa Rangwala (Open ERP), 2011-07-25
-
[Bug 810548] Re: multi-company invoice validation error
From: Ashvin Rathod (OpenERP), 2011-07-22
-
[Bug 810548] Re: multi-company invoice validation error
From: Launchpad Bug Tracker, 2011-07-22
-
[Bug 810548] Re: multi-company invoice validation error
From: Ashvin Rathod (OpenERP), 2011-07-22
-
[Bug 810548] Re: multi-company invoice validation error
From: Vinay Rana (openerp), 2011-07-15
-
[Bug 810548] [NEW] multi-company invoice validation error
From: Paulius Sladkevičius - inovera . lt, 2011-07-14
References