[trunk] [contract] circular reference when creating new employee

Bug #634412 reported by Ruud Riem-Vis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Invalid
Undecided
Unassigned

Bug Description

First install a fresh new database and enable contract management in the human resources section.
Now when you try to create a new employee, it requires a reference to the contract in order to be able to save it.
On the other hand, creating a new contract requires the employee to exist.
This is a circular reference which prevents new employees to be added when you have installed the hr_contracts module.

Revisions are up to date.

Revision history for this message
Ravindra Mekhiya(OpenERP) (rme-openerp) wrote :

Hello Rudd,

I have checked the issue.

While creating a record for an employee, contract is not a fillable field. So it would not ask you to fill that up and save the employee.

However, you can still add contracts from the Employee form.

Let me know if this is no clear.

Thanks.

Revision history for this message
Ruud Riem-Vis (ruud-riem-vis) wrote : Re: [Bug 634412] Re: [trunk] [contract] circular reference when creating new employee

  On 13.09.2010 14:10, RME(OpenERP) wrote:
> Hello Rudd,
>
> I have checked the issue.
>
> While creating a record for an employee, contract is not a fillable
> field. So it would not ask you to fill that up and save the employee.
>
> However, you can still add contracts from the Employee form.
>
> Let me know if this is no clear.
>
> Thanks.
>
Hi RME,

In my configuration, the contract field is a mandatory field when you
try to create an employee. Therefore you get the error of the missing
contract and thus the circular reference (see attachments for an example).

Ruud

Revision history for this message
Ravindra Mekhiya(OpenERP) (rme-openerp) wrote :

Hello Rudd,

       Contract is not a mandatory field however if you're making it mandatory then you must have a contract It's a normal behavior. IMHO in the case of contract it'll never be a mandatory field.

Thanks.

Changed in openobject-addons:
status: New → Invalid
Changed in openobject-addons:
milestone: none → 6.0
Revision history for this message
Ruud Riem-Vis (ruud-riem-vis) wrote :

  On 14.09.2010 08:49, RME(OpenERP) wrote:
> Hello Rudd,
>
> Contract is not a mandatory field however if you're making it
> mandatory then you must have a contract It's a normal behavior. IMHO in
> the case of contract it'll never be a mandatory field.
>
> Thanks.
>
> ** Changed in: openobject-addons
> Status: New => Invalid
>
For me it isn't mandatory either but the module does make it mandatory
(see the red fields in the screenshots).
I totally agree that the contract should not be mandatory (as is the
case in the stable branch).
But in the trunk version, when you create a new employee and then try to
save it you get the error that you need to provide a contract (fields
shown in red).
The attached screenshots show hat you get after you create a new
employee, enter his name, and then try to save it. Note that also the
fields under the accounting tab are red (and thus mandatory). These
fields concern the property_banl_account, salaray_account and
employee_account which are all required in the hr_payroll implementation..
Ruud

Revision history for this message
Ravindra Mekhiya(OpenERP) (rme-openerp) wrote :

Hello Rudd,

In "Employee" form view, "Contract" view is "List" view and that will not ask you to fill mandatory fields untill and unless you click on "NEW" contract.

I have also attached video file of existing behavior at our end.

Would you please check it and notify us ?

Hope it will help you.

Revision history for this message
Ruud Riem-Vis (ruud-riem-vis) wrote :

  On 14.09.2010 14:15, RME(OpenERP) wrote:
> Hello Rudd,
>
> In "Employee" form view, "Contract" view is "List" view and that will
> not ask you to fill mandatory fields untill and unless you click on
> "NEW" contract.
>
> I have also attached video file of existing behavior at our end.
>
> Would you please check it and notify us ?
>
> Hope it will help you.
>
> ** Attachment added: "HR_Contract.ogv"
> https://bugs.launchpad.net/openobject-addons/+bug/634412/+attachment/1582669/+files/HR_Contract.ogv
>
Hi RME,

Thanks for the video which I analyzed in detail.
The first parts of your video and my system are the same. However, the
following part differs and may explain the problem: in the contracts tab
my screen show "1/1 of 0" which means that a new contract is already
implicitly created. I've already reported bug 637852 which shows a
similar behavior.
Of course when a new (empty contract) is implicitly created when you
create a new employee, then the error detection is correct.

The behavior is exactly the same with the GTK client. However, here I
can first delete the implicitly created contract then I can save the new
employee correctly (after defining the bank, employee and salary accounts).

So the problem could be on the server side I suppose.
Ruud

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hi Ruud,

I am using an updated code.
While I am creating a new employee, I see List view of contracts which won't stop me creating a new employee.

Kindly have an update and check again.

Thanks.

Revision history for this message
Ruud Riem-Vis (ruud-riem-vis) wrote :

  On 14.09.2010 21:15, Jay (OpenERP) wrote:
> Hi Ruud,
>
> I am using an updated code.
> While I am creating a new employee, I see List view of contracts which won't stop me creating a new employee.
>
> Kindly have an update and check again.
>
> Thanks.
>
Hi Jay,

I've updated to version 3292 and applied the patch. Still the direction
is wrong (clicking on the left should scroll to the right vice-versa).
In addition, the scroll buttons are missing in IE now (see screenshot).

Regards,

Ruud

Revision history for this message
Ruud Riem-Vis (ruud-riem-vis) wrote :

  On 14.09.2010 21:15, Jay (OpenERP) wrote:
> Hi Ruud,
>
> I am using an updated code.
> While I am creating a new employee, I see List view of contracts which won't stop me creating a new employee.
>
> Kindly have an update and check again.
>
> Thanks.
>
Hi Jay,

Sorry for the wrong previous post (belonged to another bug report).
I've updated the code and still get the problem of having a "1/1 of 0"
indication in the "Contracts" tab even when starting with a completely
fresh new database.

Regards,

Ruud

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hi Ruud,

The issue you mention is posted here https://bugs.launchpad.net/openobject-client-web/+bug/637852 and will be taken care.

Thanks.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.