Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
4343 Zobrazení

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
Zrušit
Nejlepší odpověď

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
Zrušit
Nejlepší odpověď

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
Zrušit
Autor

Thanks, this helped me too. I upvoted.

Related Posts Odpovědi Zobrazení Aktivita
0
dub 19
3587
0
úno 17
2995
1
bře 15
6834
1
led 22
2834
0
čvc 21
5505