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

I  created a new view on Odoo11 CE for 'account.invoice'. Where is its view.xml file? Is it inside another view.xml from another module/model? Where would it be?

If I can't access to the view. How can i create a view using just code? I just want to create a new view for 'account.invoice' . Not a complete module/model.

아바타
취소
베스트 답변

Hello,

If you don't want to create a module to change your view, you can edit views from user interface. But you will lose any edits you make this way if you upgrade the module related to the view.

To Edit from user interface:

- Activate developer mode from settings


-

- open the view you need to edit.

- open developer tools/ click on Edit Viewtype View (in the picture below Edit Form View)


-

- the xml code for the view will be opened, you can edit this.


Or if you just want to create a view for one model and use it after some time.

- Activate developer mode

- goto settings/ technical/ User Interface/ views

- Create a view

- Now when you need to use this view got to settings/ technical/ User Interface/ Menu Items

- Open for which menu item you need to change this open that menu

- open the action of the menu item

- edit view reference of the model


-


아바타
취소
베스트 답변

Hi,

If you want to create a  new view to replace the exiting view of any model you can copy the existing view record to your module and change the record id to original_module_name.original_record_id, then you can adjust the form as per your need.

Suppose if you want only to change some field you can use the xpath.


https://www.odoo.com/forum/help-1/question/how-to-replace-or-override-form-view-in-xml-107682

https://www.odoo.yenthevg.com/xpath-expressions-in-odoo-8/


Thanks

아바타
취소
작성자

Thanks, this helped me too. I upvoted.

관련 게시물 답글 화면 활동
0
4월 19
3853
0
2월 17
3307
1
3월 15
7110
1
1월 22
3007
0
7월 21
5765