bill task work selects wrong journal in multi-company context
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Medium
|
OpenERP R&D Addons Team 3 |
Bug Description
Hello,
When running Bill Task Works in a multi company context, the system sometimes creates an invoice for the wrong company
This is for 6.1 and probably trunk too.
How to reproduce:
0. install modules accounting and hr_timesheet_
1. create company Parent and Subsidiary as child of Parent
2. make sure Administrator has access to Parent Subsidiary, set Administrator default filter to Parent in preferences
3. rename Sales Journals to Sales Journal (parent) and Sales Journal (subsidiary) so they can be distinguished
4. create a customer on company Subsidiary named "Customer Subsidiary"
5. create a project named "Project for Subsidiary" with To Invoice = Yes and set customer to Customer Subsidiary
6. create a timesheet line on the analytic account "Project for Subsidiary"
7. run Bill Task Work and create the invoce (see screenshot 1)
-> the invoice generated has the correct customer and account (in yellow in screenshot 2), but uses the wrong journal and sales account (in red in screenshot 2); therefore an error message is produced when validating the invoice (Error occurred while validating the field(s) company_id: Company must be the same for its related account and period.).
I'll attach a merge proposal which uses the analytic account's company_id for the generated invoice.
Best regards,
-sbi
Related branches
- OpenERP Core Team: Pending requested
-
Diff: 32 lines (+10/-3)1 file modifiedhr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py (+10/-3)
- OpenERP Core Team: Pending requested
-
Diff: 108 lines (+26/-12)2 files modifiedaccount/account_invoice.py (+11/-4)
hr_timesheet_invoice/wizard/hr_timesheet_invoice_create.py (+15/-8)
description: | updated |
Changed in openobject-addons: | |
assignee: | nobody → OpenERP R&D Addons Team 2 (openerp-dev-addons2) |
importance: | Undecided → Medium |
status: | New → Confirmed |
assignee: | OpenERP R&D Addons Team 2 (openerp-dev-addons2) → OpenERP R&D Addons Team 3 (openerp-dev-addons3) |
fixed in trunk.