I installed a module named Super Calendar and when I try to configure events using calendar configurator and try to Generate Calendar,an openerp warning box is shown as The 'User' field of record amc (account.analytic.account) does not refer to res.users.Here the lines created are Model-analytic account,user field-customer,Description type-field,Description field-full name,description-contract detail and start date field-start date.The problem is I am not able to generate calendar with the Lines that I create.
I've tested on my side, and i get the same "error message" (the only difference is on the record name, "amc" in your case).
You can delete the "amc" Account, but you will get the same error for another existing Analytic Account.
The only case i've not tested, is when there is no Analytic Account defined.
I've tried many cases, and get always the same error (with a difference on the "record name" - the Account Name of an Analytic Account ) when this Analytic Account is not related to res.users.
What does it mean?
"Super Calendar" was designed as an organizer for users of OpenERP.
And as you noticed, you can link the "Lines" in "Super Calendar Configurator" to a user (OpenERP User) by the field "User field" (user_field_id).
So, when you filter any value for the field "User field", there is a condition in the method "generate_calendar_records" which will test if the value of the field user_field_id is not equal (!=) to res.user, and if it is True, Raise the Error _("The 'User' field of record %s (%s) does not refer to res.users").
This is stated in the code for the test condition in "generate_calendar_records":
for current_record_id in current_record_ids:
current_record = current_pool.browse(cr, uid, current_record_id, context=context) if line.user_field_id and \ current_record[line.user_field_id.name] and current_record[line.user_field_id.name]._table_name != 'res.users': raise osv.except_osv(_('Error'), _("The 'User' field of record %s (%s) does not refer to res.users") % (current_record[line.description_field_id.name], line.name.model))
Now try to not select any value for the field "User field", you will see that when you click on "Generate calendar", the error will not be raised.
The error message is just a Warning, telling that for this value the action "Generate Calendar" is not applicable (or it has no meaning .....).
Maybe, this error can be handled in much more better way !
Conclusion: Super Calendar can only be used on Models that can be related to res.users.
Hope this can help.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 3/13/14, 6:29 AM|
|Seen: 1169 times|
|Last updated: 7/3/16, 8:53 AM|