openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #00607
Re: lp:~camptocamp/margin-analysis/7.0-port-product_historical_margin-xml-retab-yvr into lp:margin-analysis
I prefer 2 spaces indentations as in xml you can have a lot of indentation levels
In python with max width of 80 or 100 and for readability you better have a maximum of 5 indentation level and can have only 3 levels.
class:
4s def:
8s code
12s nested code
In XML if you want to do inheritance you will need at least 6 levels
<openerp>
4s <data>
8s <record id=
12s <field name="arch"
16s <xpath
20s <field name="my_new_field"
Furthermore, with html and v7 style you get even more indentation levels
Let's take the kanban view of res.partner as a bad example:
line 237 in res_partner_view.xml
it begins at columns 77
(19 levels of indentation and if should be 20 levels as sheet tag isn't properly indented)
In my opinion, 2 spaces in XML doesn't make it less readable.
But I don't intend to indent by 2 if we choose 4 for our code.
3 spaces would be a compromise and tabs would let people decide how to display it and reduce file size.
But let's keep the discution on 2 or 4 as it would start being more philosophical :)
--
https://code.launchpad.net/~camptocamp/margin-analysis/7.0-port-product_historical_margin-xml-retab-yvr/+merge/190350
Your team Margin Analysis Core Editors is subscribed to branch lp:margin-analysis.
References