This is related to revision 84b45515bd
It's actually the user on which the `active` field should be checked,
as this is possible to disable a user without disabling his partner,
but it should no longer be possible to mention him as soon
as the user is disabled.
opw-673719
Otherwise recomputation may fail with "record does not exist or has been
deleted" when creating records with a value directly set for e.g.
'image_mediun' on a new product.
The issue comes from the storage of the images. When creating a product, the
creation of an attachment for storing the field `image_medium` triggers the
recomputation of that field before its dependency `image` is set. As `image`
is initially null, `image_medium` is recomputed as null, and this deletes the
attachment just created before the latter has completed its creation! As a
consequence, some code at the end of `create` for the attachment crashes
because the record has been deleted.
The following models have been fixed: `fleet.vehicle.model.brand`,
`hr.employee`, `im_livechat.channel`, `mail.channel`, `payment.acquirer`,
`pos.category`, `product.template`, `product.public.category`, `res.partner`.
opw 666330
Closes#11516
While this is important to read the replies
you get in the threads you follow, `Unread messages`
is more accurate to describe what these filters
displays.
opw-666739
The purpose of this commit is to improve the overall performance of the mention
mechanism of the client action and chatter composer, by pre-fetching some data.
First, the employees are fetched at chat initialization (basically, at web
client initialization), if hr is installed.
Second, when focusing on the composer of a channel, the members of this channel
are fetched. In the case of a chatter, the members are already known as they
are the followers of the document.
When the user types a mention, we first display suggestions from the pre-fetched
partners, and we only perform an RPC when there are no more result matching the
search string. This RPC searches among user, and then partners if there aren't
enough matches.
A few side changes occurred:
- auto_join set to True on user_ids field of res.partner to boost the query
that searches partners that are users
- the '/mail/read_followers' route now returns follower's email as well, as
we need it for the mention;
- a partner can now be mentionned several times in the same message;
- mentionned partner previsualization has been removed, mainly because of
the previous point, but also because it simplifies the code;
Setting a value for the `date` field on a partner of
an employee leaded to a crash in the employees
kanban view.
This last login field on the employee kanban
had as goal to display the last connection hour
of each employee, if the last
login happened within the current day.
Since 7.0, the last login date field on `res.users`
has been renamed from `date` to `login_date`,
and became a date instead of a datetime.
Nevertheless, the `last_login` related field
on `hr.employee` remained on the field `date`,
which is set on the `res.partner` model,
but is not used as a connection date field. The
related should have been updated to use
`res.users`.`login_date`, probably, but it
wasn't the case.
From saas-6, the `date` field is no longer available
on the `res.partner` form.
We can therefore safely assume that this feature
is no longer used nor needed, as:
- It should display the last hour of connection within a day
- but it uses the wrong date field
- and it uses a field type for which the hour is not stored (date).
- even by updating the related to use `login_date`,
it would still be a field where the hour is not stored.
opw-654313