コンテンツへスキップ
メニュー
この質問にフラグが付けられました
1 返信
6698 ビュー

In the standard view of partner, if this one is a company, there is a tab at the bottom called Contacts, which shows every partner (person) working for that partner (company). If you click on the name of the person, their information is shown in a popup.

I would like to change that behaviour and show their information through the standard view of partner, in spite of a popup. Just like property_account_receivable and property_account_payable fields do with their corresponding accounts (Those fields are also in the standard view of partner, but inside the Accountancy tab).

So I want to change this line of base.view_partner_form:

<a type="open"><field name="name"/></a>

To link it to base.view_partner_form, with the ID of the corresponding partner (person). Any idea? It is driving me crazy! I tried everything!

アバター
破棄
最善の回答

Hi,

You can turn this one2many list into the ordinalry list view first (you'll need to inherit "base.view_partner_form" in XML and so on...), then you can add to that list a button (will be added to each row) and  corresponding row will be opened by click on the button, in the same window as you want. Please refer to this answer.

regards,

アバター
破棄
著作者

Wow!! Thank you a lot!!! I was looking for something like this. I replaced that line for this one: But the problem is that I am getting this error now: TypeError: call_button() takes at least 5 arguments (6 given). I do not understand very well what I have to do in the other link, in addition to change the type.

I do not get what you mean: I replaced that line for this one: ..... < ? >

著作者

I am sorry, I pasted a line with tags and it was removed when I posted the comment. No problem, I have just understood what I had to do and now it is working!!! Thank you so much! Really, a lot!!

You're welcome