Hello everyone Im working in Odoo 14 while taking and adapting to the new version an Odoo development course for Odoo 9.
At the moment im stuck at finding the field name of the Sales Tab inside Sales>Products>Products form view. ( I want to add a new Tab after it). Developer mode doesnt show me a name since it only show me fields but not the page tabs info.
Here is my 2 ways of trying this and both ways mark an error of not finding the element or tell me I cant use string as selector.
TLDR: I can't find the name of Sales>Products>Products form view "Sales" Tab since developer mode only shows fields.
Edit: Code was not visible and format.
--------------------Option 1------------------------------
Code:
Error:
Element '' cannot be located in parent view
View name: product.template tree
Error context:
view: ir.ui.view(923,)
xmlid: dietfacts_product_template_tree_view
view.model: product.template
view.parent: ir.ui.view(466,)
file: /home/perezalvarezhi/odoo-14.0/customaddons/dietfacts/views/dietfacts_view.xml
--------------------Option 2------------------------------
Code:
Note: I used @string and @name with lower and upper case and all failed.
Error:
View inheritance may not use attribute 'string' as a selector.
View name: product.template tree
Error context:
view: ir.ui.view(923,)
xmlid: dietfacts_product_template_tree_view
view.model: product.template
view.parent: ir.ui.view(466,)
file: /home/perezalvarezhi/odoo-14.0/customaddons/dietfacts/views/dietfacts_view.xml
Hi Niyas thank you for your answer! It looks like my code always end up not showing but that is what I was doing I just had the name wrong, it was indeed sales but with lower case thank you!
Also my question is more regarding on ways to easily get the name of a page tab and not having to ask in a forum every time. For example on fields I can just hover over the label of the field and in developer mode it tells me all about that field from ID, name, model etc. This doesn't happen to elements of a page and I cant find a way to find its name for sure.
Using string sounded like a good idea but found out that you are right, it doesn't work anymore.
Thank you for the tutorials I have seen this channel before but at the moment the tutorials from Udemy Im taking have given me more tools to actually do exactly what I want to do, the fact it is Odoo 9 is not a problem.
You can simply look at the XML code of the original QWeb view, you want to inherit from. This way you don't need to ask the forum :-)