[6.1][hr] employee work address has wrong domain

Bug #985853 reported by Carlos Vásquez (ClearCorp)
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Confirmed
Low
OpenERP Publisher's Warranty Team

Bug Description

In the hr.employee from view, the address_id field is:
<field name="address_id" colspan="2" on_change="onchange_address_id(address_id)" domain="[('partner_id', '=', partner_id)]"/>

It has a domain that filters addresses by partner using the employee partner_id. This field is a related one that gets the partner associated with the employee's HOME address partner. This is used to associate a partner to an employee. In this case the address_id field is the WORK address.

The correct domain should be "[('company_id.partner_id', '=', partner_id)]" in order to constraint the work address to be a employer (company) address.

Tags: hr

Related branches

Revision history for this message
Carlos Vásquez (ClearCorp) (cv.clearcorp) wrote :

No, excuse me, the correct domain should be "[('partner_id.ref_companies', 'in', (company_id))]".

I wrote this report too fast, sorry.

Anyway, I am doing a merge proposal right now with this fix.

Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Jignesh Rathod(OpenERP) (jir-openerp) wrote :

Hello Carlos Vásquez ,

Currently hr.employee from view improved in trunk , So this issue is does not
affect any more in trunk.it only affect to 6.1 stable that's why I am assigning
this issue to opw.

Thank you!

Changed in openobject-addons:
assignee: OpenERP R&D Addons Team 3 (openerp-dev-addons3) → OpenERP Publisher's Warranty Team (openerp-opw)
Revision history for this message
Carlos Vásquez (ClearCorp) (cv.clearcorp) wrote :

Status?

We are running the changes in the attached branch in production without errors. Could you check it and merge it if everything is good, or get back at us if it isn't.

Thank you

Revision history for this message
Alexis de Lattre (alexis-via) wrote :

Just hit this bug and, after a Google search, I arrived here. This fix should really be merged in addons/6.1 !

Revision history for this message
Alexis de Lattre (alexis-via) wrote :

I have tested the proposed merge and I fully disagree with it. The partner of the employee is NOT the same partner as the partner of the company. In fact, each employee should have it's own dedicated partner (because he has its own accounting account and it's own bank account !).

Revision history for this message
Alexis de Lattre (alexis-via) wrote :

For me, the problem we have here is a usability problem : the domain on the field address_id is OK, but the user doesn't know that he needs to set the "Home address" first, before selecting the "Working address". So he tries to select the "Working address", but he can't access the partner address that he created for the employee... and he doesn't know why until he looks at the XML code of the view !

tags: added: hr
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.