hr_expense: generated invoice may use wrong accounts in a multi-company context
Bug #1068038 reported by
Stéphane Bidoul (Acsone)
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Confirmed
|
Medium
|
OpenERP R&D Addons Team 3 |
Bug Description
Hello,
When generating invoices from expenses, the invoice sometimes uses wrong accounts when the use generating the expense is from another company than the expense's company.
I reproduced with 6.1, but it probably applies to trunk too since the code has not changed.
How to reproduce:
- create 2 companies A and B
- create an expense for an employee of company B
- approve and invoice the expense with the user where company preference is set to A
- result: the invoice is created for company B (correct), but using accounts (payable, expense) from company A (wrong)
- expected result: the invoice should be with accounts of company A
I link a merge proposal.
Best regards,
-sbi
Related branches
lp://staging/~openerp-dev/openobject-addons/trunk-bug-1068038-jco
Ready for review
for merging
into
lp://staging/openobject-addons
- qdp (OpenERP): Pending requested
-
Diff: 341 lines (+100/-44)5 files modifiedaccount_check_writing/account_voucher.py (+13/-7)
account_voucher/account_voucher.py (+70/-21)
account_voucher/voucher_payment_receipt_view.xml (+13/-12)
hr_expense/hr_expense.py (+3/-3)
hr_expense/hr_expense_view.xml (+1/-1)
tags: | added: invoicing |
To post a comment you must log in.
Hello Stephane,
Same issue faced on trunk too and I have checked your solution which is fixed this issue.
Thank you!