multi-company invoice validation error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Medium
|
OpenERP R&D Addons Team 3 |
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_
http://
and saw that company_id field is related with account_id:
'company_id': fields.
http://
So question is why it needs check when l.company_id must be same like l.account_
For me problem is that company_id is not same like l.account_
Related branches
- Mustufa Rangwala (Open ERP) (community): Approve
- qdp (OpenERP): Pending requested
-
Diff: 11 lines (+1/-1)1 file modifiedaccount/account_move_line.py (+1/-1)
- Purnendu Singh (OpenERP) (community): Approve
- DJ Patel (OpenERP) (community): Needs Resubmitting
- qdp (OpenERP): Pending requested
-
Diff: 25 lines (+4/-3)1 file modifiedaccount/account_invoice.py (+4/-3)
Changed in openobject-addons: | |
assignee: | nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3) |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in openobject-addons: | |
status: | Confirmed → In Progress |
Changed in openobject-addons: | |
milestone: | none → 6.1 |
Changed in openobject-addons: | |
status: | Confirmed → In Progress |
status: | In Progress → Fix Committed |
Hello Paulius,
Yes as per your specified problem i have done some research on it which concludes you have to set company for admin user from user/preferences so that it can take related income/expense accounts from property fields on product for given company on invoice and I have remove the code l.company_id != l.account_ id.company_ id because its not required for related field and its fixed in lp:~openerp-dev/openobject-addons/trunk-bug-810548-ara branch.
Revision ID: <email address hidden>
Revision No: 4892
Thanks,
ara