The proposal to merge
lp:~openerp-dev/openobject-server/trunk-graph-schemas-fixes-xmo into
lp:openobject-server has been updated.
Description changed to:
Tighten the subset of view schemas for the graph view:
* Explicitly specify possible values for arguments of `graph`
* Remove @color, which is unused and unspecified
* Specify `graph/field` as a self-contained element instead of referring to the
global catch-all `field`, and specify the possible values for `field/@operator`
and `field/@group`.
* Removed value `**` from `field/@operator` (it does not really seem to have
any point). `*` might also be on the chopping block, not sure what use it could
be apart from a ghetto `and`.
* graph[not(@type="bar")][field[@group]] does not validate anymore (having a
grouping field in a pie chart makes no sense)
* Pie charts can't have more than 2 fields anymore
Issue remaining, but I have not found a way to solve it: theoretically, a bar
chart should only accept:
* A base field used as the main axis (for grouping on)
* An optional grouping field (field[@group="True"])
* 1..n aggregate fields (for the columns, with an optional @operator)
My idea was to handle the last two cases with interleave and write something
like:
(element field {
attribute group { "True" },
field-attributes }?
& element field {
attribute operator { "+" | "*" | "min" | "max" }?
field-attributes }+)
but it turns out RNG has a restriction against this pattern: you can't
interleave elements with the same name.
For now, I've just created a group field, but that means you can put multiple
group fields and no aggregate field in a bar graph view, which is not quite
optimal.
I have yet to find a solution short of imposing order (e.g. mandating that the
grouping field be the last one or the first one in the sequence).
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-graph-schemas-fixes-xmo/+merge/60789
--
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-graph-schemas-fixes-xmo/+merge/60789
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-server/trunk-graph-schemas-fixes-xmo.
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp