This question has been flagged
3 Replies
3293 Views

Hi !

I am new to OpenERP. Just installed v7, and tried the Ontario Payroll module. I get this error :

"AttributeError: View definition error for inherited view 'l10n_ca_on_hr_payroll.hr_contract_form_inherit' on model 'hr.contract': Element '<xpath expr="/form/notebook/page/group/field[@name='working_hours']">' not found in parent view 'hr_contract.hr_contract_view_form'

when I try to create a Contract.

Moreover, now when I log in I am greeted with the message:

"except_orm: ('ValidateError', u'Error occurred while validating the field(s) arch: Invalid XML for View Architecture!')"

I am just finding my way around OpenERP, but have good knowledge of XML and programming. Any pointers of where to start fixing this would be appreciated.

Cheers, Raul

Avatar
Discard

try contacting the people who developed the ontario payroll module,

Author

This is why I posted the question, since there is no contact I could find for the developer

Author Best Answer

As per Yannick's advice, replacing

expr="/form/notebook/page/group/field[@name='working_hours']"

with

expr="//field[@name='working_hours']"

in "l10n_ca_on_hr_payroll_view.xml" was enough to make it work. Not sure yet if it caused other problems, or if this is the only problem porting to v7.

Avatar
Discard
Author Best Answer

This is why I posted the question, since there is no contact I could find for the developer.

Avatar
Discard
Best Answer

It seems Ontario Payroll isn't ported yet to v7.0 so you have a view inheritance issue. Did you took the v6.1?

Avatar
Discard
Author

That is true, I picked the 6.1. Now, I need some pointers on how to resolve this. I started looking at the view definitions, hope it's just a question of modifying the xpath in question to match the new location of the element in V7 of 'hr_contract.hr_contract_view_form'. Will post if that worked.

Try to replace the xpath expr by a relative one

expr="/form/notebook/page/group/field[@name='working_hours']"

by

expr="//field[@name='working_hours']"
Author

Thanks Yannick ! That did it. How can we make this available to other interested parties ?

To contribute, you should read this: how-can-i-contribute-to-openerp And for this specific canadian module, try to contact Maxime Chambreuil on launchpad.net, he is the creator of the lp:openerp-canada project.