← Back to team overview

openerp-india team mailing list archive

[Bug 1295621] [NEW] hr_evaluation error on install

 

Public bug reported:

When installing the Employee Appraisals module the following error is
generated if the Administrator Employee record has previously been
deleted:

    Integrity Error
    
    The operation cannot be completed, probably due to the following:
    - deletion: you may be trying to delete a record while other records still reference it
    - creation/update: a mandatory field is not correctly set
    
    [object with reference: name - name]

Steps to recreate this error:

1. Create a new database (without Demo data).
2. Install the Employee Directory module
3. Create a test employee
4. Delete all employee records
5. Add a test employee
6. Attempt to install Employee Appraisal module.

Error is generated.

Further information:
It looks like hr_evaluation_data.xml is attempting to assign a default appraisal plan to 'employee 0'.

    <data noupdate="1">
        <record id="hr_evaluation_plan_phase_sendtoemployee0" model="hr_evaluation.plan.phase">
            <field name="plan_id" ref="hr_evaluation_plan_managersevaluationplan0"/>
            <field name="name">Send to Employee</field>
            <field eval="0" name="send_anonymous_manager"/>
            <field eval="1" name="sequence"/>
            <field name="company_id" ref="base.main_company"/>
            <field name="action">self</field>
            <field eval="0" name="send_anonymous_employee"/>
            <field eval="0" name="send_answer_employee"/>
            <field name="survey_id" ref="hr_evaluation.survey_2"/>
            <field eval="0" name="send_answer_manager"/>
            <field eval="0" name="wait"/>
        </record>
    </data>

    <data noupdate="1">
        <record id="hr.employee" model="hr.employee">
            <field name="evaluation_plan_id" ref="hr_evaluation_plan_managersevaluationplan0"/>
        </record>
    </data>

If this employee has been previously deleted then the system recreates
it without a name and then attempts to propagate this record to the
resource_resource table where there is a 'not null' constraint on the
name field.

** Affects: openobject-addons
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of OpenERP
Indian Team, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/1295621

Title:
  hr_evaluation error on install

Status in OpenERP Addons (modules):
  New

Bug description:
  When installing the Employee Appraisals module the following error is
  generated if the Administrator Employee record has previously been
  deleted:

      Integrity Error
      
      The operation cannot be completed, probably due to the following:
      - deletion: you may be trying to delete a record while other records still reference it
      - creation/update: a mandatory field is not correctly set
      
      [object with reference: name - name]

  Steps to recreate this error:

  1. Create a new database (without Demo data).
  2. Install the Employee Directory module
  3. Create a test employee
  4. Delete all employee records
  5. Add a test employee
  6. Attempt to install Employee Appraisal module.

  Error is generated.

  Further information:
  It looks like hr_evaluation_data.xml is attempting to assign a default appraisal plan to 'employee 0'.

      <data noupdate="1">
          <record id="hr_evaluation_plan_phase_sendtoemployee0" model="hr_evaluation.plan.phase">
              <field name="plan_id" ref="hr_evaluation_plan_managersevaluationplan0"/>
              <field name="name">Send to Employee</field>
              <field eval="0" name="send_anonymous_manager"/>
              <field eval="1" name="sequence"/>
              <field name="company_id" ref="base.main_company"/>
              <field name="action">self</field>
              <field eval="0" name="send_anonymous_employee"/>
              <field eval="0" name="send_answer_employee"/>
              <field name="survey_id" ref="hr_evaluation.survey_2"/>
              <field eval="0" name="send_answer_manager"/>
              <field eval="0" name="wait"/>
          </record>
      </data>

      <data noupdate="1">
          <record id="hr.employee" model="hr.employee">
              <field name="evaluation_plan_id" ref="hr_evaluation_plan_managersevaluationplan0"/>
          </record>
      </data>

  If this employee has been previously deleted then the system recreates
  it without a name and then attempts to propagate this record to the
  resource_resource table where there is a 'not null' constraint on the
  name field.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/1295621/+subscriptions


Follow ups

References