create invoice: company used for invoice line must be the invoice's company

Bug #1048213 reported by Stéphane Bidoul (Acsone)
6
This bug affects 1 person
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

Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

fixed in trunk r7649

Changed in openobject-addons:
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.