Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
4345 Widoki

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.

Awatar
Odrzuć
Najlepsza odpowiedź

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


-


Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

Thanks, this helped me too. I upvoted.

Powiązane posty Odpowiedzi Widoki Czynność
0
kwi 19
3589
0
lut 17
2998
1
mar 15
6838
1
sty 22
2836
0
lip 21
5510