[6.0] account: onchange_partner_id with optional company_id does not work as expected

Bug #882684 reported by Niels Huylebroeck
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Won't Fix
Undecided
OpenERP Publisher's Warranty Team

Bug Description

When calling the onchange_partner_id function on an invoice with the optional company_id you would expect you
get the receivable/payable accounts and the fiscal position and payment terms as viewed from the company specified.

This does not happen, in fact there are two errors:
* when the partner does not have a specific property for either property_account_receivable or property_account_payable it returns the error : 'Can not find account chart for this company, Please Create account.'
* the fiscal position and payment terms are retrieved by reading the values for the current company (not the company_id specified) thus it will return the users company financial position and payment term for this partner

Here is a scenario:
* Create 2 companies ( Company A / Company B )
* Company B is child of Company A
* Set a different payment term and fiscal position default for both companies
* Create a user for Company A with group Useability / Multi Company
* Have a user who belongs to Company A create an invoice for Company B
* When changing the partner you will get the wrong fiscal position and payment term.
* If the partner you selected does not have a specific receivable / payable account set for Company B it will produce error 'Can not find account chart for this company, Please Create account.'

Regards,
Niels

Tags: maintenance
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Niels,

Have you install the "Chart of Account" for company B?

If you create a invoice for this company then you need to install chart of account for this comapny otherwise you need to proper set up all the configuration, like journal, account and etc.

So I want to suggest that would you please try the same scenario with "Chat of account".

Thanks and waiting for your reply!

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
Niels Huylebroeck (red15) wrote :

Let me ask you the opposite, have you tried my simple scenario ?

Changed in openobject-addons:
status: Incomplete → In Progress
Changed in openobject-addons:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
tags: added: maintenance
Revision history for this message
JAN VANDEWEYER (jan-vandeweyer) wrote :

I have the same issue and need a solution also
I looks like in a multi org structure you have to create the same partner for each company
this looks indeed strange

Revision history for this message
Ferdinand (office-chricar) wrote :

you have to remove the rule for partner

['|','|',('company_id.child_ids','child_of',[user.company_id.id]),('company_id','child_of',[user.company_id.id]),('company_id','=',False)]

Revision history for this message
JAN VANDEWEYER (jan-vandeweyer) wrote :

OpenERP - GTK Client - v6.0.3, this is the latest version i downloaded where I have the same issue

OpenERP - GTK Client - v6.0.0-rc2 I used this lower version and here the multicompany functionality is working as it is supposed to be

Revision history for this message
JAN VANDEWEYER (jan-vandeweyer) wrote :

To me it seems the bug was fixed in the lower version but not in the latest or appeared in the newer version?

Revision history for this message
JAN VANDEWEYER (jan-vandeweyer) wrote :

hi

support gave me this patch
but this does not give me a lot of confidence,
With thousands of users one would expect the last version to be better then the previous one

Hello Jan Vandeweyer, Warm Greetings from OpenERP! Thanks for your patience. The issue has been fixed partially in the Trunk version by the, Branch: https://code.launchpad.net/~openerp/openobject-server/trunk/ RevisionNo.: 3507 RevisionID: <email address hidden> This also needs addons side changes to get it working which we have provide into our patch along with server side changes. For Stable V6, this is unfortunately out of the scope of the current OpenERP release, so we cannot implement it because it requires major changes at server side and addons side. Our policy is to keep the changes applied on stable branches to a minimum, in order to limit the regression risks for customers that are in production. However, you can try this patch your end, but we do not suggest you to implement this in current Stable version. Thanks for understanding, let us know if you need further assistance. Thanks & Regards, OpenERP Support. -------- Original Message -------- From: Jan Vandeweyer <email address hidden> To: support@localhost Date: 2011-12-15 13:55:01 Hi please also send updates to the 2 people in cc if this is possible thanks Jan At 13:42 15-12-11, <email address hidden> wrote: Hello, I just wanted to notify you that I started working on your ticket:  - Reference: 51180.  - Subject: Fwd: Re: OpenERP - partnership I am the responsible of your ticket and I will recontact you shortly once I have analyzed and found the solution to your request. Let me know if you have more information, you can reply to this email to contact me, Regards, -- Ravi Gohil OpenERP Support Team Phone: /
 server_property_company_11302011.patch

Revision history for this message
Ravi Gohil (OpenERP) (rgo-openerp) wrote :

Fixing this issue requires major changes at framework side as well as addons side, and such changes puts stable version into risk, which is not suggested, however, the fix has been integrated with OpenERP V6.1 and trunk version, so this issue wont be faced in future releases.

Thanks.

Changed in openobject-addons:
status: In Progress → Won't Fix
Revision history for this message
JAN VANDEWEYER (jan-vandeweyer) wrote :

hi

after waiting for a long time, I made may own module
For Belgian users I made an extended chart of accounts, multi company availability
L10_NL with 3 languages NL_FR_EN directly

L10_RO
For Romanian charts as I also have companies there I made one RO _ EN formats

soon i update it in version 7, if anyone is interested in this you can contact me via <email address hidden>
or via www.dynict.com

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.