Arrow.py 32.6 KB
Newer Older
Jean-Paul Smets's avatar
Jean-Paul Smets committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
##############################################################################
#
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
#                    Jean-Paul Smets-Solanes <jp@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# garantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
#
##############################################################################

29
from Products.CMFCore.Expression import Expression
Jean-Paul Smets's avatar
Jean-Paul Smets committed
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44

class Arrow:
    """
        Properties which allow to define a generic Arrow. Arrows are
        used by Path and Movements to define a source and a destination
        with attributes (payment, decision, etc.) which allow to qualify
        a movement
    """

    _properties = (
        # Source reference
        {   'id'          : 'source_title',
            'description' : 'The title of the source of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('source',),
45
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
46 47 48 49 50 51 52 53 54
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getTitle',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetSourceTitle', ),
            'mode'        : 'w' },
        {   'id'          : 'source_id',
            'description' : 'The id of the destination of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('source',),
55
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
56 57 58 59 60 61 62 63 64
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getId',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetSourceId', ),
            'mode'        : 'w' },
        {   'id'          : 'source_relative_url',
            'description' : 'The titles of the destination of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('source',),
65
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getRelativeUrl',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetSourceRelativeUrl', ),
            'mode'        : 'w' },
        {   'id'          : 'source_person_title',
            'description' : 'The title of the source person of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('source',),
            'acquisition_portal_type'       : ('Person'),
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getTitle',
            'acquisition_depends'           : None,
            'mode'        : 'r' },
        {   'id'          : 'source_organisation_title',
            'description' : 'The title of the source organisation of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('source',),
            'acquisition_portal_type'       : ('Organisation'),
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getTitle',
            'acquisition_depends'           : None,
            'mode'        : 'r' },
        # Destination reference
        {   'id'          : 'destination_title',
            'description' : 'The title of the destination of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination',),
94
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
95 96 97 98 99 100 101 102 103
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getTitle',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetDestinationTitle', ),
            'mode'        : 'w' },
        {   'id'          : 'destination_id',
            'description' : 'The id of the destination of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination',),
104
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
105 106 107 108 109 110 111 112 113
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getId',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetDestinationId', ),
            'mode'        : 'w' },
        {   'id'          : 'destination_relative_url',
            'description' : 'The titles of the destination of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination',),
114
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getRelativeUrl',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetDestinationRelativeUrl', ),
            'mode'        : 'w' },
        {   'id'          : 'destination_person_title',
            'description' : 'The title of the destination person of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination',),
            'acquisition_portal_type'       : ('Person'),
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getTitle',
            'acquisition_depends'           : None,
            'mode'        : 'r' },
        {   'id'          : 'destination_organisation_title',
            'description' : 'The title of the destination organisation of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination',),
            'acquisition_portal_type'       : ('Organisation'),
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getTitle',
            'acquisition_depends'           : None,
            'mode'        : 'r' },
        # Source decision reference
        {   'id'          : 'source_decision_title',
            'description' : 'The title of the source decision of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('source_decision',),
143
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
144 145 146 147 148 149 150 151 152
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getTitle',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetSourceDecisionTitle', ),
            'mode'        : 'w' },
        {   'id'          : 'source_decision_id',
            'description' : 'The id of the source decision of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('source_decision',),
153
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
154 155 156 157 158 159 160 161 162
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getId',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetSourceDecisionId', ),
            'mode'        : 'w' },
        {   'id'          : 'source_decision_relative_url',
            'description' : 'The titles of the source decision of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('source_decision',),
163
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
164 165 166 167 168 169 170 171 172 173
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getRelativeUrl',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetSourceDecisionRelativeUrl', ),
            'mode'        : 'w' },
        # Destination decision reference
        {   'id'          : 'destination_decision_title',
            'description' : 'The title of the destination decision of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination_decision',),
174
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
175 176 177 178 179 180 181 182 183
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getTitle',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetDestinationDecisionTitle', ),
            'mode'        : 'w' },
        {   'id'          : 'destination_decision_id',
            'description' : 'The id of the destination decision of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination_decision',),
184
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
185 186 187 188 189 190 191 192 193
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getId',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetDestinationDecisionId', ),
            'mode'        : 'w' },
        {   'id'          : 'destination_decision_relative_url',
            'description' : 'The titles of the destination decision of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination_decision',),
194
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
195 196 197 198 199 200 201 202 203 204
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getRelativeUrl',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetDestinationDecisionRelativeUrl', ),
            'mode'        : 'w' },
        # Source section reference
        {   'id'          : 'source_section_title',
            'description' : 'The title of the source section of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('source_section',),
205
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
206 207 208 209 210 211 212 213 214
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getTitle',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetSourceSectionTitle', ),
            'mode'        : 'w' },
        {   'id'          : 'source_section_id',
            'description' : 'The id of the source section of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('source_section',),
215
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
216 217 218 219 220 221 222 223 224
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getId',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetSourceSectionId', ),
            'mode'        : 'w' },
        {   'id'          : 'source_section_relative_url',
            'description' : 'The titles of the source section of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('source_section',),
225
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
226 227 228 229 230 231 232 233 234 235
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getRelativeUrl',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetSourceSectionRelativeUrl', ),
            'mode'        : 'w' },
        # Destination section reference
        {   'id'          : 'destination_section_title',
            'description' : 'The title of the destination section of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination_section',),
236
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
237 238 239 240 241 242 243 244 245
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getTitle',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetDestinationSectionTitle', ),
            'mode'        : 'w' },
        {   'id'          : 'destination_section_id',
            'description' : 'The id of the destination section of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination_section',),
246
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
247 248 249 250 251 252 253 254 255
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getId',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetDestinationSectionId', ),
            'mode'        : 'w' },
        {   'id'          : 'destination_section_relative_url',
            'description' : 'The titles of the destination section of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination_section',),
256
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
257 258 259 260 261 262 263 264 265 266
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getRelativeUrl',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetDestinationSectionRelativeUrl', ),
            'mode'        : 'w' },
        # Source administration reference
        {   'id'          : 'source_administration_title',
            'description' : 'The title of the source administration of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('source_administration',),
267
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
268 269 270 271 272 273 274 275 276
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getTitle',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetSourceAdministrationTitle', ),
            'mode'        : 'w' },
        {   'id'          : 'source_administration_id',
            'description' : 'The id of the source administration of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('source_administration',),
277
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
278 279 280 281 282 283 284 285 286
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getId',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetSourceAdministrationId', ),
            'mode'        : 'w' },
        {   'id'          : 'source_administration_relative_url',
            'description' : 'The titles of the source administration of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('source_administration',),
287
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
288 289 290 291 292 293 294 295 296 297
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getRelativeUrl',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetSourceAdministrationRelativeUrl', ),
            'mode'        : 'w' },
        # Destination administration reference
        {   'id'          : 'destination_administration_title',
            'description' : 'The title of the destination administration of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination_administration',),
298
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
299 300 301 302 303 304 305 306 307
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getTitle',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetDestinationAdministrationTitle', ),
            'mode'        : 'w' },
        {   'id'          : 'destination_administration_id',
            'description' : 'The id of the destination administration of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination_administration',),
308
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
309 310 311 312 313 314 315 316 317
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getId',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetDestinationAdministrationId', ),
            'mode'        : 'w' },
        {   'id'          : 'destination_administration_relative_url',
            'description' : 'The titles of the destination administration of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination_administration',),
318
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
319 320 321 322 323 324 325 326 327 328
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getRelativeUrl',
            'alt_accessor_id'               : ('_categoryGetDestinationAdministrationRelativeUrl', ),
            'acquisition_depends'           : None,
            'mode'        : 'w' },
        # Source payment reference
        {   'id'          : 'source_payment_title',
            'description' : 'The title of the source payment of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('source_payment',),
329
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
330 331 332 333 334 335 336 337 338
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getTitle',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetSourcePaymentTitle', ),
            'mode'        : 'w' },
        {   'id'          : 'source_payment_id',
            'description' : 'The id of the source payment of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('source_payment',),
339
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
340 341 342 343 344 345 346 347 348
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getId',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetSourcePaymentId', ),
            'mode'        : 'w' },
        {   'id'          : 'source_payment_relative_url',
            'description' : 'The titles of the source payment of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('source_payment',),
349
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
350 351 352 353 354 355 356 357 358 359
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getRelativeUrl',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetSourcePaymentRelativeUrl', ),
            'mode'        : 'w' },
        # Destination payment reference
        {   'id'          : 'destination_payment_title',
            'description' : 'The title of the destination payment of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination_payment',),
360
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
361 362 363 364 365 366 367 368 369
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getTitle',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetDestinationPaymentTitle', ),
            'mode'        : 'w' },
        {   'id'          : 'destination_payment_id',
            'description' : 'The id of the destination payment of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination_payment',),
370
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
371 372 373 374 375 376 377 378 379
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getId',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetDestinationPaymentId', ),
            'mode'        : 'w' },
        {   'id'          : 'destination_payment_relative_url',
            'description' : 'The titles of the destination payment of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination_payment',),
380
            'acquisition_portal_type'       : Expression('python: portal.getPortalNodeTypeList()'),
Jean-Paul Smets's avatar
Jean-Paul Smets committed
381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getRelativeUrl',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetDestinationPaymentRelativeUrl', ),
            'mode'        : 'w' },
        # more properties to make the difference between person and organisation
        {   'id'          : 'destination_decision_person_title',
            'description' : 'The title of the destination decision person of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination_decision',),
            'acquisition_portal_type'       : 'Person',
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getTitle',
            'acquisition_depends'           : None,
            'mode'        : 'w' },
        {   'id'          : 'destination_decision_organisation_title',
            'description' : 'The title of the destination decision organisation of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination_decision',),
            'acquisition_portal_type'       : 'Organisation',
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getTitle',
            'acquisition_depends'           : None,
            'mode'        : 'w' },
        {   'id'          : 'destination_administration_person_title',
            'description' : 'The title of the destination administration person of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination_administration',),
            'acquisition_portal_type'       : 'Person',
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getTitle',
            'acquisition_depends'           : None,
            'mode'        : 'w' },
        {   'id'          : 'destination_administration_organisation_title',
            'description' : 'The title of the destination administration organisation of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination_administration',),
            'acquisition_portal_type'       : 'Organisation',
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getTitle',
            'acquisition_depends'           : None,
            'mode'        : 'w' },
423 424 425 426 427
        # Source project reference
        {   'id'          : 'source_project_title',
            'description' : 'The title of the source project of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('source_project',),
428
            'acquisition_portal_type'       : Expression('python: portal.getPortalOrderTypeList()'),
429 430 431 432 433 434 435 436 437
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getTitle',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetSourceProjectTitle', ),
            'mode'        : 'w' },
        {   'id'          : 'source_project_id',
            'description' : 'The id of the source project of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('source_project',),
438
            'acquisition_portal_type'       : Expression('python: portal.getPortalOrderTypeList()'),
439 440 441 442 443 444 445 446 447
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getId',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetSourceProjectId', ),
            'mode'        : 'w' },
        {   'id'          : 'source_project_relative_url',
            'description' : 'The titles of the source project of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('source_project',),
448
            'acquisition_portal_type'       : Expression('python: portal.getPortalOrderTypeList()'),
449 450 451 452 453 454 455 456 457 458
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getRelativeUrl',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetSourceProjectRelativeUrl', ),
            'mode'        : 'w' },
        # Destination project reference
        {   'id'          : 'destination_project_title',
            'description' : 'The title of the destination project of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination_project',),
459
            'acquisition_portal_type'       : Expression('python: portal.getPortalOrderTypeList()'),
460 461 462 463 464 465 466 467 468
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getTitle',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetDestinationProjectTitle', ),
            'mode'        : 'w' },
        {   'id'          : 'destination_project_id',
            'description' : 'The id of the destination project of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination_project',),
469
            'acquisition_portal_type'       : Expression('python: portal.getPortalOrderTypeList()'),
470 471 472 473 474 475 476 477 478
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getId',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetDestinationProjectId', ),
            'mode'        : 'w' },
        {   'id'          : 'destination_project_relative_url',
            'description' : 'The titles of the destination project of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination_project',),
479
            'acquisition_portal_type'       : Expression('python: portal.getPortalOrderTypeList()'),
480 481 482 483 484 485 486 487 488 489
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getRelativeUrl',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetDestinationProjectRelativeUrl', ),
            'mode'        : 'w' },
        # Source budget reference
        {   'id'          : 'source_budget_title',
            'description' : 'The title of the source budget of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('source_budget',),
490
            'acquisition_portal_type'       : Expression('python: portal.getPortalOrderTypeList()'),
491 492 493 494 495 496 497 498 499
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getTitle',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetSourceBudgetTitle', ),
            'mode'        : 'w' },
        {   'id'          : 'source_budget_id',
            'description' : 'The id of the source budget of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('source_budget',),
500
            'acquisition_portal_type'       : Expression('python: portal.getPortalOrderTypeList()'),
501 502 503 504 505 506 507 508 509
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getId',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetSourceBudgetId', ),
            'mode'        : 'w' },
        {   'id'          : 'source_budget_relative_url',
            'description' : 'The titles of the source budget of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('source_budget',),
510
            'acquisition_portal_type'       : Expression('python: portal.getPortalOrderTypeList()'),
511 512 513 514 515 516 517 518 519 520
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getRelativeUrl',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetSourceBudgetRelativeUrl', ),
            'mode'        : 'w' },
        # Destination budget reference
        {   'id'          : 'destination_budget_title',
            'description' : 'The title of the destination budget of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination_budget',),
521
            'acquisition_portal_type'       : Expression('python: portal.getPortalOrderTypeList()'),
522 523 524 525 526 527 528 529 530
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getTitle',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetDestinationBudgetTitle', ),
            'mode'        : 'w' },
        {   'id'          : 'destination_budget_id',
            'description' : 'The id of the destination budget of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination_budget',),
531
            'acquisition_portal_type'       : Expression('python: portal.getPortalOrderTypeList()'),
532 533 534 535 536 537 538 539 540
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getId',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetDestinationBudgetId', ),
            'mode'        : 'w' },
        {   'id'          : 'destination_budget_relative_url',
            'description' : 'The titles of the destination budget of this movement',
            'type'        : 'string',
            'acquisition_base_category'     : ('destination_budget',),
541
            'acquisition_portal_type'       : Expression('python: portal.getPortalOrderTypeList()'),
542 543 544 545 546 547
            'acquisition_copy_value'        : 0,
            'acquisition_accessor_id'       : 'getRelativeUrl',
            'acquisition_depends'           : None,
            'alt_accessor_id'               : ('_categoryGetDestinationBudgetRelativeUrl', ),
            'mode'        : 'w' },
   )
Jean-Paul Smets's avatar
Jean-Paul Smets committed
548 549 550

    _categories = ( 'source', 'destination',
                    'source_section', 'destination_section',
Jean-Paul Smets's avatar
Jean-Paul Smets committed
551
                    'source_decision', 'destination_decision',
Jean-Paul Smets's avatar
Jean-Paul Smets committed
552
                    'source_administration', 'destination_administration',
553 554
                    'source_payment', 'destination_payment',
                    'source_project', 'destination_project',
555 556 557 558
                    'source_budget', 'destination_budget',
                    # Virtual categories
                    'source_region', 'destination_region',
                    )
Jean-Paul Smets's avatar
Jean-Paul Smets committed
559