Menu

Generating XML for OpenProj

2012-02-14
2022-03-04
  • Stuart Longland

    Stuart Longland - 2012-02-14

    Hi all,

    I'm in the process of producing a module for OpenERP that exports (and imports) to OpenProj for project management purposes, but I'm having some grief getting OpenProj to read my files correctly.

    I am using Microsoft's XML schema as a reference, as well as frequent tests with OpenProj.

    The module uses Python's xml.dom.minidom module as its XML generator and parser.

    Problem #1: OpenProj won't recognise the start date

    In <Project> tag, I dudiciously make a note of when each sub task starts and ends, and try to ensure that the <Project> start and end dates span all the tasks.  The project looks like this:

    <?xml version="1.0" encoding="UTF-8"?>
    <Project xmlns="http://schemas.microsoft.com/project">
      <Name>Export of all projects' tasks</Name>
      <Title>Export of all projects' tasks</Title>
      <Manager>OpenERP</Manager>
      <ScheduleFromStart>1</ScheduleFromStart>
      <StartDate>2011-07-18T19:00:00</StartDate>
      <FinishDate>2012-09-02T03:00:00</FinishDate>
      <FYStartDate>1</FYStartDate>
      <CriticalSlackLimit>0</CriticalSlackLimit>
      <CurrencyDigits>2</CurrencyDigits>
      <CurrencySymbol>$</CurrencySymbol>
      <CurrencySymbolPosition>0</CurrencySymbolPosition>
      <CalendarUID>1</CalendarUID>
    

    Note that it very clearly says <StartDate>, in the very same place that OpenProj would put it.  Yet, I get this on the console when opening this file:

    0 earliest start for project. Forward = true using proj start Thu Jan 01 10:00:00 EST 1970
    0 earliest start for project. Forward = true using proj start Thu Jan 01 10:00:00 EST 1970
    

    And no, it doesn't even use the Unix epoch as the start date, it gives me a Gantt chart that starts no earlier than the 11th February.  The only way to fix this is to go into the Project Information and tell it *again* what the start date is.

    Problem #2: Extended Attributes

    The "tasks" I generate need to be matched up to OpenERP objects when I do the import back in.  Thus I have extended attributes, I use "Text1" (the first one) to store the type of object, and "Number1" to store the database ID.

    For ease of use I add an Alias in, so that other readers of the file know what these magical numbers are:

      <ExtendedAttributes>
        <ExtendedAttribute>
          <FieldID>188743731</FieldID>
          <FieldName>Text1</FieldName>
          <Alias>OpenERPType</Alias>
        </ExtendedAttribute>
        <!-- ... etc ... -->
        <ExtendedAttribute>
          <FieldID>188743767</FieldID>
          <FieldName>Number1</FieldName>
          <Alias>OpenERPID</Alias>
        </ExtendedAttribute>
    

    Open in OpenProj, Save as XML, and magically, they disappear.  I do believe this was previously reported as a bug.

    Problem #3: Calendars

    It seems OpenProj is hell-bent on creating its own, even if identical calendars to the ones it generates, are already present in the XML.  I noticed that it would always move my custom calendars down and create its own standard 3 at the top, so I decided I'd save it the effort.  The following is the XML my code generates for the <Calendars> section:

      <Calendars>
        <Calendar>
          <UID>1</UID>
          <Name>Standard</Name>
          <IsBaseCalendar>1</IsBaseCalendar>
          <WeekDays>
            <WeekDay>
              <DayType>1</DayType>
              <DayWorking>0</DayWorking>
            </WeekDay>
            <WeekDay>
              <DayType>2</DayType>
              <DayWorking>1</DayWorking>
              <WorkingTimes>
                <WorkingTime>
                  <FromTime>08:00:00</FromTime>
                  <ToTime>12:00:00</ToTime>
                </WorkingTime>
                <WorkingTime>
                  <FromTime>13:00:00</FromTime>
                  <ToTime>17:00:00</ToTime>
                </WorkingTime>
              </WorkingTimes>
            </WeekDay>
            <WeekDay>
              <DayType>3</DayType>
              <DayWorking>1</DayWorking>
              <WorkingTimes>
                <WorkingTime>
                  <FromTime>08:00:00</FromTime>
                  <ToTime>12:00:00</ToTime>
                </WorkingTime>
                <WorkingTime>
                  <FromTime>13:00:00</FromTime>
                  <ToTime>17:00:00</ToTime>
                </WorkingTime>
              </WorkingTimes>
            </WeekDay>
            <WeekDay>
              <DayType>4</DayType>
              <DayWorking>1</DayWorking>
              <WorkingTimes>
                <WorkingTime>
                  <FromTime>08:00:00</FromTime>
                  <ToTime>12:00:00</ToTime>
                </WorkingTime>
                <WorkingTime>
                  <FromTime>13:00:00</FromTime>
                  <ToTime>17:00:00</ToTime>
                </WorkingTime>
              </WorkingTimes>
            </WeekDay>
            <WeekDay>
              <DayType>5</DayType>
              <DayWorking>1</DayWorking>
              <WorkingTimes>
                <WorkingTime>
                  <FromTime>08:00:00</FromTime>
                  <ToTime>12:00:00</ToTime>
                </WorkingTime>
                <WorkingTime>
                  <FromTime>13:00:00</FromTime>
                  <ToTime>17:00:00</ToTime>
                </WorkingTime>
              </WorkingTimes>
            </WeekDay>
            <WeekDay>
              <DayType>6</DayType>
              <DayWorking>1</DayWorking>
              <WorkingTimes>
                <WorkingTime>
                  <FromTime>08:00:00</FromTime>
                  <ToTime>12:00:00</ToTime>
                </WorkingTime>
                <WorkingTime>
                  <FromTime>13:00:00</FromTime>
                  <ToTime>17:00:00</ToTime>
                </WorkingTime>
              </WorkingTimes>
            </WeekDay>
            <WeekDay>
              <DayType>7</DayType>
              <DayWorking>0</DayWorking>
            </WeekDay>
          </WeekDays>
        </Calendar>
        <Calendar>
          <UID>2</UID>
          <Name>24 Hours</Name>
          <IsBaseCalendar>1</IsBaseCalendar>
          <WeekDays>
            <WeekDay>
              <DayType>1</DayType>
              <DayWorking>1</DayWorking>
              <WorkingTimes>
                <WorkingTime>
                  <FromTime>00:00:00</FromTime>
                  <ToTime>00:00:00</ToTime>
                </WorkingTime>
              </WorkingTimes>
            </WeekDay>
            <WeekDay>
              <DayType>2</DayType>
              <DayWorking>1</DayWorking>
              <WorkingTimes>
                <WorkingTime>
                  <FromTime>00:00:00</FromTime>
                  <ToTime>00:00:00</ToTime>
                </WorkingTime>
              </WorkingTimes>
            </WeekDay>
            <WeekDay>
              <DayType>3</DayType>
              <DayWorking>1</DayWorking>
              <WorkingTimes>
                <WorkingTime>
                  <FromTime>00:00:00</FromTime>
                  <ToTime>00:00:00</ToTime>
                </WorkingTime>
              </WorkingTimes>
            </WeekDay>
            <WeekDay>
              <DayType>4</DayType>
              <DayWorking>1</DayWorking>
              <WorkingTimes>
                <WorkingTime>
                  <FromTime>00:00:00</FromTime>
                  <ToTime>00:00:00</ToTime>
                </WorkingTime>
              </WorkingTimes>
            </WeekDay>
            <WeekDay>
              <DayType>5</DayType>
              <DayWorking>1</DayWorking>
              <WorkingTimes>
                <WorkingTime>
                  <FromTime>00:00:00</FromTime>
                  <ToTime>00:00:00</ToTime>
                </WorkingTime>
              </WorkingTimes>
            </WeekDay>
            <WeekDay>
              <DayType>6</DayType>
              <DayWorking>1</DayWorking>
              <WorkingTimes>
                <WorkingTime>
                  <FromTime>00:00:00</FromTime>
                  <ToTime>00:00:00</ToTime>
                </WorkingTime>
              </WorkingTimes>
            </WeekDay>
            <WeekDay>
              <DayType>7</DayType>
              <DayWorking>1</DayWorking>
              <WorkingTimes>
                <WorkingTime>
                  <FromTime>00:00:00</FromTime>
                  <ToTime>00:00:00</ToTime>
                </WorkingTime>
              </WorkingTimes>
            </WeekDay>
          </WeekDays>
        </Calendar>
        <Calendar>
          <UID>3</UID>
          <Name>Night Shift</Name>
          <IsBaseCalendar>1</IsBaseCalendar>
          <WeekDays>
            <WeekDay>
              <DayType>1</DayType>
              <DayWorking>0</DayWorking>
            </WeekDay>
            <WeekDay>
              <DayType>2</DayType>
              <DayWorking>1</DayWorking>
              <WorkingTimes>
                <WorkingTime>
                  <FromTime>23:00:00</FromTime>
                  <ToTime>00:00:00</ToTime>
                </WorkingTime>
              </WorkingTimes>
            </WeekDay>
            <WeekDay>
              <DayType>3</DayType>
              <DayWorking>1</DayWorking>
              <WorkingTimes>
                <WorkingTime>
                  <FromTime>00:00:00</FromTime>
                  <ToTime>03:00:00</ToTime>
                </WorkingTime>
                <WorkingTime>
                  <FromTime>04:00:00</FromTime>
                  <ToTime>08:00:00</ToTime>
                </WorkingTime>
                <WorkingTime>
                  <FromTime>23:00:00</FromTime>
                  <ToTime>00:00:00</ToTime>
                </WorkingTime>
              </WorkingTimes>
            </WeekDay>
            <WeekDay>
              <DayType>4</DayType>
              <DayWorking>1</DayWorking>
              <WorkingTimes>
                <WorkingTime>
                  <FromTime>00:00:00</FromTime>
                  <ToTime>03:00:00</ToTime>
                </WorkingTime>
                <WorkingTime>
                  <FromTime>04:00:00</FromTime>
                  <ToTime>08:00:00</ToTime>
                </WorkingTime>
                <WorkingTime>
                  <FromTime>23:00:00</FromTime>
                  <ToTime>00:00:00</ToTime>
                </WorkingTime>
              </WorkingTimes>
            </WeekDay>
            <WeekDay>
              <DayType>5</DayType>
              <DayWorking>1</DayWorking>
              <WorkingTimes>
                <WorkingTime>
                  <FromTime>00:00:00</FromTime>
                  <ToTime>03:00:00</ToTime>
                </WorkingTime>
                <WorkingTime>
                  <FromTime>04:00:00</FromTime>
                  <ToTime>08:00:00</ToTime>
                </WorkingTime>
                <WorkingTime>
                  <FromTime>23:00:00</FromTime>
                  <ToTime>00:00:00</ToTime>
                </WorkingTime>
              </WorkingTimes>
            </WeekDay>
            <WeekDay>
              <DayType>6</DayType>
              <DayWorking>1</DayWorking>
              <WorkingTimes>
                <WorkingTime>
                  <FromTime>00:00:00</FromTime>
                  <ToTime>03:00:00</ToTime>
                </WorkingTime>
                <WorkingTime>
                  <FromTime>04:00:00</FromTime>
                  <ToTime>08:00:00</ToTime>
                </WorkingTime>
                <WorkingTime>
                  <FromTime>23:00:00</FromTime>
                  <ToTime>00:00:00</ToTime>
                </WorkingTime>
              </WorkingTimes>
            </WeekDay>
            <WeekDay>
              <DayType>7</DayType>
              <DayWorking>1</DayWorking>
              <WorkingTimes>
                <WorkingTime>
                  <FromTime>00:00:00</FromTime>
                  <ToTime>03:00:00</ToTime>
                </WorkingTime>
                <WorkingTime>
                  <FromTime>04:00:00</FromTime>
                  <ToTime>08:00:00</ToTime>
                </WorkingTime>
              </WorkingTimes>
            </WeekDay>
          </WeekDays>
        </Calendar>
      </Calendars>
    

    diff can't even tell the difference.  Yet, for some funny reason, OpenProj sees it necessary to not only make copies of these, but also copy them wrong:

      <Calendars>
        <Calendar>
          <UID>1</UID>
          <Name>Standard</Name>
          <!-- typical calendar output here -->
        </Calendar>
        <Calendar>
          <UID>2</UID>
          <Name>24 Hours</Name>
          <!-- typical calendar output here -->
        </Calendar>
        <Calendar>
          <UID>3</UID>
          <Name>Night Shift</Name>
          <!-- typical calendar output here -->
        </Calendar>
        <!-- My original "Standard" calendar, err, how's it different? -->
        <Calendar>
          <UID>4</UID>
          <Name>Standard [Export of all projects' tasks]</Name>
          <IsBaseCalendar>1</IsBaseCalendar>
          <WeekDays>
            <WeekDay>
              <DayType>1</DayType>
              <DayWorking>0</DayWorking>
            </WeekDay>
            <WeekDay>
              <DayType>2</DayType>
              <DayWorking>1</DayWorking>
              <WorkingTimes>
                <WorkingTime>
                  <FromTime>08:00:00</FromTime>
                  <ToTime>12:00:00</ToTime>
                </WorkingTime>
                <WorkingTime>
                  <FromTime>13:00:00</FromTime>
                  <ToTime>17:00:00</ToTime>
                </WorkingTime>
              </WorkingTimes>
            </WeekDay>
            <WeekDay>
              <DayType>3</DayType>
              <DayWorking>1</DayWorking>
              <WorkingTimes>
                <WorkingTime>
                  <FromTime>08:00:00</FromTime>
                  <ToTime>12:00:00</ToTime>
                </WorkingTime>
                <WorkingTime>
                  <FromTime>13:00:00</FromTime>
                  <ToTime>17:00:00</ToTime>
                </WorkingTime>
              </WorkingTimes>
            </WeekDay>
            <WeekDay>
              <DayType>4</DayType>
              <DayWorking>1</DayWorking>
              <WorkingTimes>
                <WorkingTime>
                  <FromTime>08:00:00</FromTime>
                  <ToTime>12:00:00</ToTime>
                </WorkingTime>
                <WorkingTime>
                  <FromTime>13:00:00</FromTime>
                  <ToTime>17:00:00</ToTime>
                </WorkingTime>
              </WorkingTimes>
            </WeekDay>
            <WeekDay>
              <DayType>5</DayType>
              <DayWorking>1</DayWorking>
              <WorkingTimes>
                <WorkingTime>
                  <FromTime>08:00:00</FromTime>
                  <ToTime>12:00:00</ToTime>
                </WorkingTime>
                <WorkingTime>
                  <FromTime>13:00:00</FromTime>
                  <ToTime>17:00:00</ToTime>
                </WorkingTime>
              </WorkingTimes>
            </WeekDay>
            <WeekDay>
              <DayType>6</DayType>
              <DayWorking>1</DayWorking>
              <WorkingTimes>
                <WorkingTime>
                  <FromTime>08:00:00</FromTime>
                  <ToTime>12:00:00</ToTime>
                </WorkingTime>
                <WorkingTime>
                  <FromTime>13:00:00</FromTime>
                  <ToTime>17:00:00</ToTime>
                </WorkingTime>
              </WorkingTimes>
            </WeekDay>
            <WeekDay>
              <DayType>7</DayType>
              <DayWorking>0</DayWorking>
            </WeekDay>
          </WeekDays>
        </Calendar>
        <!-- OpenProj's "copy" of my "24 Hours" calendar.  This would be more appropriately 
             labelled the "0 Hours" calendar, or more aptly, the "Public Servant" calendar. -->
        <Calendar>
          <UID>5</UID>
          <Name>24 Hours [Export of all projects' tasks]</Name>
          <IsBaseCalendar>1</IsBaseCalendar>
          <WeekDays>
            <WeekDay>
              <DayType>1</DayType>
              <DayWorking>0</DayWorking>
            </WeekDay>
            <WeekDay>
              <DayType>2</DayType>
              <DayWorking>0</DayWorking>
            </WeekDay>
            <WeekDay>
              <DayType>3</DayType>
              <DayWorking>0</DayWorking>
            </WeekDay>
            <WeekDay>
              <DayType>4</DayType>
              <DayWorking>0</DayWorking>
            </WeekDay>
            <WeekDay>
              <DayType>5</DayType>
              <DayWorking>0</DayWorking>
            </WeekDay>
            <WeekDay>
              <DayType>6</DayType>
              <DayWorking>0</DayWorking>
            </WeekDay>
            <WeekDay>
              <DayType>7</DayType>
              <DayWorking>0</DayWorking>
            </WeekDay>
          </WeekDays>
        </Calendar>
        <!-- Same thing here, seems all the nightshift people will get work-enforced sickies tonight. -->
        <Calendar>
          <UID>6</UID>
          <Name>Night Shift [Export of all projects' tasks]</Name>
          <IsBaseCalendar>1</IsBaseCalendar>
          <WeekDays>
            <WeekDay>
              <DayType>1</DayType>
              <DayWorking>0</DayWorking>
            </WeekDay>
            <WeekDay>
              <DayType>2</DayType>
              <DayWorking>0</DayWorking>
            </WeekDay>
            <WeekDay>
              <DayType>3</DayType>
              <DayWorking>0</DayWorking>
            </WeekDay>
            <WeekDay>
              <DayType>4</DayType>
              <DayWorking>0</DayWorking>
            </WeekDay>
            <WeekDay>
              <DayType>5</DayType>
              <DayWorking>0</DayWorking>
            </WeekDay>
            <WeekDay>
              <DayType>6</DayType>
              <DayWorking>0</DayWorking>
            </WeekDay>
            <WeekDay>
              <DayType>7</DayType>
              <DayWorking>0</DayWorking>
            </WeekDay>
          </WeekDays>
        </Calendar>
    

    Problem #4: "No, that start date and duration can't possibly be right!"

    It seems OpenProj knows better about when a task was scheduled to start, and how long it will take.  Rather than just displaying to the user how the data is reported in the file, and allowing the user to manipulate it, it sees it fit to misread what is written in the file:

    The following is a task in my original file:

        <Task>
          <UID>101</UID>
          <ID>101</ID>
          <Name>[open 99.99%] Install OS and setup environments</Name>
          <Type>2</Type>
          <IsNull>0</IsNull>
          <CreateDate>2012-02-14T10:00:51</CreateDate>
          <WBS/>
          <OutlineNumber>5.7</OutlineNumber>
          <OutlineLevel>2</OutlineLevel>
          <Priority>500</Priority>
          <Start>2011-10-05T20:10:02</Start>
          <Finish>2011-10-06T20:10:02</Finish>
          <Duration>PT24H0M0S</Duration>
          <DurationFormat>7</DurationFormat>
          <Work>PT24H0M0S</Work>
          <ResumeValid>0</ResumeValid>
          <EffortDriven>1</EffortDriven>
          <Recurring>0</Recurring>
          <OverAllocated>0</OverAllocated>
          <Estimated>1</Estimated>
          <Milestone>0</Milestone>
          <Summary>0</Summary>
          <Critical>1</Critical>
          <IsSubproject>0</IsSubproject>
          <IsSubprojectReadOnly>0</IsSubprojectReadOnly>
          <ExternalTask>0</ExternalTask>
          <StartVariance>0</StartVariance>
          <FinishVariance>0</FinishVariance>
          <WorkVariance>0</WorkVariance>
          <FreeSlack>0</FreeSlack>
          <TotalSlack>0</TotalSlack>
          <FixedCost>0</FixedCost>
          <FixedCostAccrual>2</FixedCostAccrual>
          <PercentComplete>99.99</PercentComplete>
          <PercentWorkComplete>99.99</PercentWorkComplete>
          <Cost>0</Cost>
          <OvertimeCost>0</OvertimeCost>
          <ActualDuration>PT24H0M0S</ActualDuration>
          <ActualCost>0</ActualCost>
          <ActualOvertimeCost>0</ActualOvertimeCost>
          <RegularWork>PT24H0M0S</RegularWork>
          <RemainingDuration>PT0H0M8S</RemainingDuration>
          <RemainingCost>0</RemainingCost>
          <RemainingWork>PT0H0M8S</RemainingWork>
          <RemainingOvertimeCost>0</RemainingOvertimeCost>
          <ACWP>0</ACWP>
          <CV>0</CV>
          <ConstraintType>4</ConstraintType>
          <CalendarUID>-1</CalendarUID>
          <ConstraintDate>2011-10-05T20:10:02</ConstraintDate>
          <LevelAssignments>0</LevelAssignments>
          <LevelingCanSplit>0</LevelingCanSplit>
          <LevelingDelay>0</LevelingDelay>
          <LevelingDelayFormat>5</LevelingDelayFormat>
          <IgnoreResourceCalendar>0</IgnoreResourceCalendar>
          <Notes>Notes go here above ** DEBUG **
    ** DEBUG **
    {'assigned': {'id': 4, 'name': u'An Employee'},
     'company': browse_record(res.company, 1),
     'created': datetime.datetime(2011, 9, 23, 16, 55, 50, tzinfo=&lt;UTC&gt;),
     'delegated': &lt;osv.orm.browse_null object at 0xcd6710c&gt;,
     'desc': False,
     'duration': 24.0,
     'finish': None,
     'hours_rem': 0.0024000000000024002,
     'id': 159,
     'maxpri': 500,
     'name': u'Install OS and setup environments',
     'partner': browse_record(res.partner, 1),
     'pri': 500,
     'progress': 99.989999999999995,
     'seq': 3,
     'start': datetime.datetime(2011, 10, 5, 10, 10, 2, tzinfo=&lt;UTC&gt;),
     'state': u'open',
     'subtasks': None,
     'tsb': datetime.datetime(2011, 10, 5, 10, 10, 2, tzinfo=&lt;UTC&gt;),
     'tse': datetime.datetime(2011, 10, 6, 10, 10, 2, tzinfo=&lt;UTC&gt;),
     'type': &lt;osv.orm.browse_null object at 0x932e06c&gt;}</Notes>
          <HideBar>0</HideBar>
          <Rollup>0</Rollup>
          <BCWS>0</BCWS>
          <BCWP>0</BCWP>
          <EarnedValueMethod>0</EarnedValueMethod>
          <ExtendedAttribute>
            <FieldID>188743731</FieldID>
            <Value>project.task</Value>
          </ExtendedAttribute>
          <ExtendedAttribute>
            <FieldID>188743767</FieldID>
            <Value>159</Value>
          </ExtendedAttribute>
        </Task>
    

    And this is what OpenProj coughs up:

        <Task>
          <UID>101</UID>
          <ID>101</ID>
          <Name>[open 99.99%] Install OS and setup environments</Name>
          <Type>2</Type>
          <IsNull>0</IsNull>
          <CreateDate>2012-02-14T20:00:00</CreateDate>
          <WBS/>
          <OutlineNumber>9.12</OutlineNumber>
          <OutlineLevel>2</OutlineLevel>
          <Priority>500</Priority>
          <Start>2011-10-05T20:10:00</Start>
          <Finish>2011-10-10T17:00:00</Finish>
          <Duration>PT24H0M0S</Duration>
          <DurationFormat>7</DurationFormat>
          <Work>PT0H0M0S</Work>
          <ResumeValid>0</ResumeValid>
          <EffortDriven>1</EffortDriven>
          <Recurring>0</Recurring>
          <OverAllocated>0</OverAllocated>
          <Estimated>1</Estimated>
          <Milestone>0</Milestone>
          <Summary>0</Summary>
          <Critical>0</Critical>
          <IsSubproject>0</IsSubproject>
          <IsSubprojectReadOnly>0</IsSubprojectReadOnly>
          <ExternalTask>0</ExternalTask>
          <StartVariance>0</StartVariance>
          <FinishVariance>0</FinishVariance>
          <WorkVariance>0</WorkVariance>
          <FreeSlack>0</FreeSlack>
          <TotalSlack>41760000</TotalSlack>
          <FixedCost>0</FixedCost>
          <FixedCostAccrual>2</FixedCostAccrual>
          <Cost>0</Cost>
          <OvertimeCost>0</OvertimeCost>
          <OvertimeWork>PT0H0M0S</OvertimeWork>
          <ActualDuration>PT0H0M0S</ActualDuration>
          <ActualCost>0</ActualCost>
          <ActualOvertimeCost>0</ActualOvertimeCost>
          <ActualWork>PT0H0M0S</ActualWork>
          <ActualOvertimeWork>PT0H0M0S</ActualOvertimeWork>
          <RegularWork>PT0H0M0S</RegularWork>
          <RemainingDuration>PT24H0M0S</RemainingDuration>
          <RemainingCost>0</RemainingCost>
          <RemainingWork>PT0H0M0S</RemainingWork>
          <RemainingOvertimeCost>0</RemainingOvertimeCost>
          <RemainingOvertimeWork>PT0H0M0S</RemainingOvertimeWork>
          <ACWP>0</ACWP>
          <CV>0</CV>
          <ConstraintType>4</ConstraintType>
          <CalendarUID>-1</CalendarUID>
          <ConstraintDate>2011-10-05T20:10:00</ConstraintDate>
          <LevelAssignments>0</LevelAssignments>
          <LevelingCanSplit>0</LevelingCanSplit>
          <LevelingDelay>0</LevelingDelay>
          <LevelingDelayFormat>5</LevelingDelayFormat>
          <IgnoreResourceCalendar>0</IgnoreResourceCalendar>
          <Notes>Notes go here above ** DEBUG **  ** DEBUG **  {'assigned': {'id': 4, 'name': u'Mark Oellermann'},  'company': browse_record(res.company, 1),  'created': datetime.datetime(2011, 9, 23, 16, 55, 50, tzinfo=&lt;UTC&gt;),  'delegated': &lt;osv.orm.browse_null object at 0xcd6710c&gt;,  'desc': False,  'duration': 24.0,  'finish': None,  'hours_rem': 0.0024000000000024002,  'id': 159,  'maxpri': 500,  'name': u'Install OS and setup environments',  'partner': browse_record(res.partner, 1),  'pri': 500,  'progress': 99.989999999999995,  'seq': 3,  'start': datetime.datetime(2011, 10, 5, 10, 10, 2, tzinfo=&lt;UTC&gt;),  'state': u'open',  'subtasks': None,  'tsb': datetime.datetime(2011, 10, 5, 10, 10, 2, tzinfo=&lt;UTC&gt;),  'tse': datetime.datetime(2011, 10, 6, 10, 10, 2, tzinfo=&lt;UTC&gt;),  'type': &lt;osv.orm.browse_null object at 0x932e06c&gt;}</Notes>
          <HideBar>0</HideBar>
          <Rollup>0</Rollup>
          <BCWS>0</BCWS>
          <BCWP>0</BCWP>
          <EarnedValueMethod>0</EarnedValueMethod>
          <ActualWorkProtected>PT0H0M0S</ActualWorkProtected>
          <ActualOvertimeWorkProtected>PT0H0M0S</ActualOvertimeWorkProtected>
          <ExtendedAttribute>
            <UID>101</UID>
            <FieldID>188743731</FieldID>
            <Value>project.task</Value>
          </ExtendedAttribute>
          <ExtendedAttribute>
            <UID>101</UID>
            <FieldID>188743767</FieldID>
            <Value>159</Value>
          </ExtendedAttribute>
        </Task>
    

    Note that Work seems to have gone from 24 hours (which is 3 working days) to 0 hours.  Is there some documentation on how OpenProj interprets these?  Clearly there's a misunderstanding because I'm doing it wrong, but it's hard to know how it's wrong?  The dutiful reader will note that I am using the <Notes> section to emit the Python dict that is used to construct each task and project.

    For some things there isn't a direct 1:1 correlation, but the Start and Finish dates are as marked, but that's not how OpenProj sees them.

    Problem #5: NullPointerException

    Yes, if I get a tag out of place, or remove a supposedly optional tag (according to the Microsoft spec), I get this exception on the console, with no explaination as to where and why the XML is bad.  All I do know is that it's bad, and that I have to try and hunt for the thing that is breaking it.

    I think that's enough problems to deal with for now, if need be I can generate further test data and submit that in bug reports.  It is a bit concerning to see that the last commit was back in 2009, and moreover, the bits I seem to have the most problems with are magical .jar files in the source code, so are impossible-to-debug black boxes.

    My biggest problem is that I cannot see *inside* some parts of OpenProj to know what is the matter.  I do not know if it is a bug in my XML, or a bug in OpenProj.  I am also targetting Microsoft Project, and I figure if I get it working here, it should mostly work the way we want in the other package, however OpenProj gives me more potential for debugging as it is in theory, open-source.

    I hope through this head-banging, I can help OpenProj improve, but I need your assistance first.

    Thanks in advance.
    Regards,
    Stuart Longland

     
  • Ademar Arvati

    Ademar Arvati - 2013-05-09

    Hello Stuart,

    It has been a while since you posted this, have you suceeded?
    I am interested in this integration too and could try to help where did it stopped.

    Thanks,
    Ademar Arvati

     
  • Stuart Longland

    Stuart Longland - 2013-05-09

    No unfortunately, we abandoned this method in place of using the Faces integration in OpenERP 6.1, building on that instead.

     
  • kalmen chia

    kalmen chia - 2013-11-07

    Hello Stuart,

    Is your code for openerp export of project information somewhere and opensource where i can get it becuase i am interested to explore and continue from what you left out. i am thinking to integrate to gantter for own use... need to save some time if possible...

    Thanks.
    Kalmen

     

Log in to post a comment.