Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
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.
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 3/13/14, 6:29 AM|
|Seen: 1451 times|
|Last updated: 7/3/16, 8:53 AM|