create invoice: company used for invoice line must be the invoice's company
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Odoo Addons (MOVED TO GITHUB) |
Fix Released
|
Medium
|
OpenERP R&D Addons Team 3 |
Bug Description
Hello,
When creating and invoice in a multi company context, the company can be selected on the invoice (in the other info tab). The company can be derived from the selected journal (see also lp:1047884).
When creating invoice lines, the company used for deriving accounts and taxes from the selected product must be the invoice's company and not the user's company.
This applies to 6.1 and trunk
How to reproduce:
1. create two companies A and B
2. set the user preferences to company B
3. create a customer invoice and change the journal and company (in other info) to company A
4. create an invoice line -> in trunk the default account is an account of company B (the user default), it should be an account of company A, since the invoice is for company A
5. select a product -> the proposed account and taxes are for company B (the user default), it should be an account and taxes of company A, since the invoice is for company A
I'll attach a merge proposal.
Best regards,
-sbi
Related branches
- 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)
Changed in openobject-addons: | |
assignee: | nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3) |
importance: | Undecided → Medium |
status: | New → Confirmed |
fixed in trunk r7649