Hello Raphaƫl Valyi,

We have applied your patch in Addons3 branch.

revision-id: m...@mra-laptop-20101102093337-0diiqe2wmapc68i2
revno: 4567

Thanks for your contribution.


** Changed in: openobject-addons
       Status: In Progress => Fix Committed

-- 
[6.0][account] user can't validate the invoice of an other company; patch 
included
https://bugs.launchpad.net/bugs/651426
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in OpenObject Addons Modules: Fix Released

Bug description:
Hello,

using last trunk addons rev #5030, suppose you create two charts of account 
properly for two different companies (may be fix 
https://bugs.launchpad.net/openobject-addons/+bug/651421) first.

Then, using the admin user from OpenERP S.A., create an invoice for Shop 1 (I 
did it through a new sale order).
Make sure to parameter the customer account properly (in Shop 1) and select an 
appropriate period (related to Shop 1).
Actually the invoice could be made by a user belonging to Shop 1, that would 
just makes it easier in general.

But, the point is, once this invoice is properly created for Shop 1, no OpenERP 
S.A. user can properly validate this invoice. I think this would however be a 
classical workflow where a single accountant will manage the invoices of two 
companies.

Currently, when admin will try to validate the invoice, the created 
account.move.line will try to have their company_id to OpenERP S.A. instead of 
Shop 1. Consequently, the account.move.line _check_company_id constraint will 
fail and the invoice can't be created.

I propose the following attached patch that fixes the issues: if the account 
move line belongs to some move that have a company_id set, then it will use 
that company_id. In our case, the move is created properly for Shop 1, so 
applying the patch makes the account move line use Shop 1 too and the invoice 
to validate properly.

Hope this helps.



_______________________________________________
Mailing list: https://launchpad.net/~c2c-oerpscenario
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~c2c-oerpscenario
More help   : https://help.launchpad.net/ListHelp

Reply via email to