콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
13 답글
5204 화면

I need to add a "Domains" tab to Company "Contacts" Form that can be used to list the domains company owns.

How do I do that?


Sam
Using odoo9

아바타
취소
베스트 답변

1. Make sure you are in Developer Mode.

2. Settings --> Technical --> Database Structure --> Models

  • You need to create a new model (table) to store the domain.

  • Click CREATE.

  • Enter Domains for the model description, x_domain for the model name.

  • Click Add an Item to add a field to store the URL:

          
  • Click Save and New to add a field to store the Customer the URL is related to:

       

          


  •  Save the model

3. Link the model to the Partner model, so Customers can have one or more domains:

  • Open the res.partner model

  • Add a new field x_domain_ids

          
  • Save this change.


4.   Settings --> Technical --> User Interface --> Views

Create a new View to add the x_domain_ids field to the User Interface:




This is the final result:


아바타
취소
작성자

Thank you for your clear answer. I seem to be missing something though since the View can't be saved. The error message is... Invalid view definition Error details: Field `x_name` does not exist Error context: View `res.partner.form.custom` [view_id: 1678, xml_id: n/a, model: res.partner, parent_id: 123]

작성자

http://dl.dropbox.com/u/49702772/Selection_083.jpg

I think you made a mistake on step (3). Can you post a screenshot of how you added x_domain_ids to res.partner?

작성자

http://dl.dropbox.com/u/49702772/Selection_084.jpg

작성자

http://dl.dropbox.com/u/49702772/Selection_085.jpg

작성자

http://dl.dropbox.com/u/49702772/Selection_085.jpg

Your last two screenshots are the same. Can you post a screenshot of how you added x_domain_ids to res.partner?

작성자

This is the screenshot of res.partner... http://dl.dropbox.com/u/49702772/Selection_084.jpg And this is the screenshot of x_domain_ids it self... http://dl.dropbox.com/u/49702772/Selection_085.jpg Looks ok...

I don't see anything wrong with any of the screenshots you have shared. Can you share the screenshot of your VIEW res.partner.form.custom?

작성자

If I try to Save this it will give an error. http://dl.dropbox.com/u/49702772/Selection_087.jpg Here is the error... http://dl.dropbox.com/u/49702772/Selection_086.jpg

Sorry it isn't working for you. I repeated the steps I posted on a new database and it all worked fine. I am guessing you aren't saving everything but I don't know how else I can assist you - it has worked twice for me following exactly what I posted for you.

작성자 베스트 답변

Thx. This worked on a new odoo 9 installation.

아바타
취소
관련 게시물 답글 화면 활동
1
8월 24
1689
1
9월 15
5889
0
8월 24
1310
2
8월 24
2061
2
3월 24
9845