Skip to Content
Menu
This question has been flagged

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.

Avatar
Discard
Best Answer

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


-


Avatar
Discard
Best Answer

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

Avatar
Discard
Author

Thanks, this helped me too. I upvoted.

Related Posts Replies Views Activity
0
Apr 19
2669
0
Feb 17
2331
1
Mar 15
5863
1
Jan 22
1973
0
Jul 21
4640