Xavier (Open ERP) has proposed merging 
lp:~openerp-dev/openobject-server/trunk-tighten-calendar-schema-xmo into 
lp:openobject-server.

Requested reviews:
  OpenERP Core Team (openerp)

For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-tighten-calendar-schema-xmo/+merge/78097

Improves a few issues with the calendar view's schema (at the attributes level) 
based on research done for OpenERP Web bugs:

* @date_start is mandatory, if there is no @date_start clients error out
* @date_delay and @date_stop are exclusive, calendar object stores either the 
duration of a given event or the end of a given event, not both
* @mode is an enumerated type with only three value, not an arbitrary string: 
it specifies the default display mode of calendar views (either monthly — the 
default, weekly or daily calendar)
* @type, nobody at openerp (including india) seems to know what it is for, and 
it is not used in any addon, so removed. It's either disappeared behavior or 
(more likely) a mistake.
-- 
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-tighten-calendar-schema-xmo/+merge/78097
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-server/trunk-tighten-calendar-schema-xmo.
=== modified file 'openerp/addons/base/rng/view.rng'
--- openerp/addons/base/rng/view.rng	2011-09-13 14:46:00 +0000
+++ openerp/addons/base/rng/view.rng	2011-10-04 13:12:35 +0000
@@ -524,12 +524,26 @@
         <rng:element name="calendar">
             <rng:optional><rng:attribute name="string" /></rng:optional>
             <rng:optional><rng:attribute name="color" /></rng:optional>
-            <rng:optional><rng:attribute name="date_start" /></rng:optional>
-            <rng:optional><rng:attribute name="date_stop" /></rng:optional>
+
+            <rng:attribute name="date_start" />
+            <rng:optional>
+              <rng:choice>
+                <rng:attribute name="date_stop" />
+                <rng:attribute name="date_delay" />
+              </rng:choice>
+            </rng:optional>
             <rng:optional><rng:attribute name="day_length" /></rng:optional>
-            <rng:optional><rng:attribute name="date_delay" /></rng:optional>
-            <rng:optional><rng:attribute name="type" /></rng:optional>
-            <rng:optional><rng:attribute name="mode" /></rng:optional>
+
+            <rng:optional>
+              <!-- calendar display mode at opening -->
+              <rng:attribute name="mode">
+                <rng:choice>
+                  <rng:value>month</rng:value>
+                  <rng:value>week</rng:value>
+                  <rng:value>day</rng:value>
+                </rng:choice>
+              </rng:attribute>
+            </rng:optional>
             <rng:oneOrMore>
                 <rng:ref name="field"/>
             </rng:oneOrMore>

_______________________________________________
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

Reply via email to