Comments (14)
@Tardo about this topic, it's better to keep only one way of naming things (plural or singular), because if not, it's more difficult to know which to use, and would force also to rename if we change conditions of the files, etc.
About the other thing, better to open a new issue and to not mix things 😉
from odoo-community.org.
If Odoo uses plural then I think we should stick to that. @max3903 what do you think?
from odoo-community.org.
Thanks for pointing this out. Most of the documentation is in singular, but I prefer plural, as it expresses more what contains: it can be more than one view inside the XML file.
@OCA/board what do you think about this?
from odoo-community.org.
I don't see the point of repeating views in <inherited_main_model>_views.xml
. We already know it is a view as it is in the views
directory.
I would make a change to have:
|-- views/
| |-- <main_model>.xml
| |-- <inherited_main_model>.xml
from odoo-community.org.
@max3903 this has been discussed other times, and it's because if you perform a file name search, you want to know which can of data it is: demo, data, views, etc.
from odoo-community.org.
ok, then
|-- views/
| |-- <main_model>_view.xml
| |-- <inherited_main_model>_view.xml
from odoo-community.org.
So, you prefer in singular? Have you seen my argument about the plural?
from odoo-community.org.
As you said, the idea is to know the kind of data, not if there is one or more record.
from odoo-community.org.
OK, let's be inline with module naming in singular. Any other opinion?
from odoo-community.org.
I prefer use "views" because normally a "view .xml" defines multiple views.. The 'basics' are "form" and "tree" views...
Perhaps can use "view" for new view definition (google maps view, calendar view, etc..)
Filter "_views.xml" to know files that implement or inherit (if have the inhertied_ prefix) a Odoo base view type
Filter "_view.xml" to know files that implement a new view type
I have other questions about Code Guidelines... perhaps best open other issue for this questions?
from odoo-community.org.
@pedrobaeza ok, it makes sense what you say.
Odoo uses "views" in their guidelines... https://www.odoo.com/documentation/12.0/reference/guidelines.html#file-naming
from odoo-community.org.
from odoo-community.org.
Yes, alignement with Odoo guidelines is a good thing in general.
from odoo-community.org.
Thank you for the feedbacks and indications.
Best,
Pablo.
from odoo-community.org.
Related Issues (20)
- Need Help
- Outdated shop HOT 2
- Contributing guidelines not rendered HOT 14
- Where put "Action" records? HOT 2
- About ID names... HOT 1
- Javascript Style HOT 12
- Author vs Contributor HOT 4
- Members are not shown in the webpage HOT 5
- wrong faq link on OCAs-Projects page HOT 1
- Contribution guide mixes syntax HOT 3
- Possibility of translating the documentation
- Product Harmonized System Codes
- issue with odoo-community apps download after upgrade HOT 3
- Chat and forum channels not advertised HOT 1
- QUESTION: Is pep80 necessary today? HOT 2
- TypeError: $focusable is undefined
- Broken link in guidelines HOT 2
- Broken link to FAQ in Code page
- W7936 is triggered when a package name is different from the import HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from odoo-community.org.