OCA / timesheet

Odoo Timesheet Management Addons
GNU Affero General Public License v3.0
121 stars 346 forks source link

hr_attendance_analysis error on installation #27

Closed marcok closed 9 years ago

marcok commented 9 years ago

When I try to install hr_attendance_analysis on current V8 I get this error, what can I do?

file "/opt/odoo/sources/odoo/openerp/models.py", line 1266, in _validate_fields
    raise ValidationError('\n'.join(errors))
ParseError: "ValidateError
Field(s) `arch` failed against a constraint: Invalid view definition

Error details:
Field `day` does not exist

Error context:
View `hr.attendance.analysis`
[view_id: 924, xml_id: n/a, model: hr.attendance, parent_id: n/a]" while parsing /opt/odoo/additional_addons/hr_attendance_analysis/hr_attendance_view.xml:19, near
<record id="view_attendance_analysis" model="ir.ui.view">
            <field name="name">hr.attendance.analysis</field>
            <field name="model">hr.attendance</field>
            <field name="priority" eval="17"/>
            <field name="arch" type="xml">
                <tree string="Employee attendances analysis">
                    <field name="employee_id"/>
                    <field name="name" string="Start date time"/>
                    <field name="end_datetime"/>
                    <field name="duration" sum="Total hours" widget="float_time"/>
                    <field name="outside_calendar_duration" sum="Overtime" widget="float_time"/>
                    <field name="inside_calendar_duration" sum="Within working schedule" widget="float_time"/>
                    <field name="day" invisible="1"/>
                </tree>
            </field>
        </record>
eLBati commented 9 years ago

Hello @marcok hr_attendance_analysis has not been ported to 8.0 yet: https://github.com/OCA/hr-timesheet

marcok commented 9 years ago

we are porting it (at least we try :) and make a pull request. ok?

dreispt commented 9 years ago

@marcok Of course!

marcok commented 9 years ago

@dreispt it works now inV8. But I guess we have to add some more features. I would like to discuss it with you, do you have time for a skype session?

eLBati commented 9 years ago

@marcok my suggestion: make a PR just to port the module to 8.0 Then, another PR for new features

dreispt commented 9 years ago

@marcok If you want to discuss a possible feature, I suggest opening an Issue here. This allows any interested party to participate.

tafaRU commented 9 years ago

@marcok I'm planning to work on it next week. When have you planned to make the PR?

marcok commented 9 years ago

@tafaRU Actually we did already: https://github.com/stclaus-hg/hr-timesheet/tree/overtime-calculation

Regarding to the new feature: We recognized that timesheet analysis does not enough for us. It calculates overtime based on hours outside of the working period. But in our thinking overtime is the hours spent more than the daily duty hours (08:00-18:00 means 10h duty hours). And it doesn't matter if the empl. works from 7-17 or 8-17.

This is how overtime is calculated in most of the companies. So we created a new module for that: https://github.com/stclaus-hg/hr-timesheet/tree/overtime-calculation/hr_timesheet_dh

But i was thinking about to create a complete new module (Employee time clock) which unites those two, Im not a huge fan for this small purpose modules. And overall we also need the full control over the repo, since we build mobile apps based on that module...

----Module Desc so far-----

Employee Time Clock

Employee Time Clock calculates over and undertime based on attendances and contracts/time schedules. Over- undetime is displayed and stored in employees timesheets. The manager see the current saldo of the timesheet and the overall saldo from beginning as well. There are two type of overtime calculated:

The module adds an additional report as well, where managers can analyse attendances, worked hours and over- undertime. Several analysis settings can be configured, like:

So what was your plan to work for on this module?

tafaRU commented 9 years ago

@marcok at the moment we just planned the migration of the module hr_attendance_analysis. Could you provide a PR goes in this way deducing it from your branch? Otherwise no problem, I will make a new one next week.

marcok commented 9 years ago

If its just about make it 8.0 compatible you can take : https://github.com/stclaus-hg/hr-timesheet/tree/overtime-calculation/hr_attendance_analysis it should be ok. as I said, atm we have the over-undertime functionality in another module