To be displayed correctly on odoo app (In a given category and not only in all or hidden)
the module category in the __openerp__.py file should be one of these:
"Accounting",
"Discuss",
"Document Management",
"eCommerce",
"Human Resources",
"Industries",
"Localization",
"Manufacturing",
"Marketing",
"Point of Sale",
"Productivity",
"Project",
"Purchases",
"Sales",
"Warehouse",
"Website",
"Extra Tools",
'Accounting & Finance' will not work, as 'Project Management', ...
Before this revision, it wasn't possible to invite new users
(in the Settings Dashboard) multiple times without reloading
the dashboard
e.g. Invite one user, then fill again the textarea, and click
again the `Invite` button
This is because a new widget is created at each reload,
because of:
```
load_invitations: function(data){
return new DashboardInvitations(this, data.users_info).replace(this.$('.o_web_settings_dashboard_invitations'));
},
```
and
```
reload:function(){
return this.parent.load(['invitations']);
},
```
and `this.$('#user_emails').val().` is empty at the second reload,
because the textarea retrieved with this selector is the textarea
of the previous widget, which is now empty.
It should probably be proper to make another mechanism for the reload,
that doesn't create a new widget each time,
but we don't take the chances in a stable release. Therefore,
we just use the event delegate target to retrieve the right
textarea.
opw-677680
Odoo add the extra letter "s" to the translated word "Active User".
This is caused by adding "s" at the end of the word directly from the template,
which makes no sense in many language.
This prohibits translators from translating the plural form in any language.
The plural form and singular form of "Active User" should be translate
separately.
Fixes#12469Closes#12470
When a user has the access rights "Configuration" or "Access Rights"
regarding the "Administration" module category, the click on the
"Settings" menu leads to an access error.
This is because the dashboard fetches data about the number of installed
modules ("installed_apps"), which requires access to "ir.module.module".
Since it is not easily possible to hide a parts of the dashboard (the
static templates do not recognize the "groups" attribute), we simply
hide the dashboard for these users.
opw-678531
Searching on `log_ids` field is slow when there is a lot of users.
Count the number of active/pending users directly in sql.
Only show the last 10 pending users. Add a link to the full list view.
Writing frequently to master data, and particularly to res.users
records is dangerous because it can temporarily delay/abort
concurrent transactions due to FK locking/serializability
heuristics. (Even with PostgreSQL 9.3+)
The `login_date` field updated when a user is authentiocated
is still useful but better handled in a separate table that
exclusively receives independent INSERTs (no UPDATE/DELETE).
This minimizes the chances of transactional conflicts.
This commit moves the login_date info into a separate
`res.users.log` table for this purpose, replacing it
with a related field. The user and login date info are
automatically handled by the magical fields (create_uid,
create_date) in `res.users.log`.
The related field must not be stored because that would
create the same problems as the original field.
In order to cleanup redundant entries in res.users.log
the 'auto-vacuum' cron job used for TransientModels was
extended to be a generic "internal data vacuum cleaner",
and now takes care of this as well.
The code for updating last login and vacuuming was split
up into smaller methods to make extensions easier.
Fixes#8585Fixes#8590