hr_expense: invoice ignores employee company
Bug #796363 reported by
Stéphane Bidoul (Acsone)
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Low
|
OpenERP R&D Addons Team 3 |
Bug Description
Hi,
When creating an invoice from an expense (the last step in hr_expense workflow), the employee company is ignored.
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 A
- expected result: the invoice should be created for company B which is the company of the employee submitting the expense, not the default company of the user creating the invoice
I attach a patch.
Best regards,
-sbi
Related branches
lp:~openerp-dev/openobject-addons/trunk-bug-796363-uco
- Mustufa Rangwala (Open ERP) (community): Approve
- Ujjvala Collins (community): Needs Resubmitting
- qdp (OpenERP): Pending requested
-
Diff: 70 lines (+11/-7)1 file modifiedhr_expense/hr_expense.py (+11/-7)
Changed in openobject-addons: | |
status: | Confirmed → In Progress |
Changed in openobject-addons: | |
milestone: | none → 6.1 |
Changed in openobject-addons: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Hi again,
I attach a slightly improved patch: the company_id used to create the invoice is taken from the expense instead of the expense employee. In turn, the company_id on the expense is defaulted to the employee company. This creates a sensible default, while allowing the user to create an expense for another company than its own.
Best regards,
-sbi