[FIX] l10n_it_edi: imap seen/unseen flag more compatible
In 7dd5437a65 the usage of imagelib was changed to match the one of general fetchmail so the flag sent to IMAP server was (\Seen) and not \Seen which is often accepted but not always. From recent reports, it seems that the method `uid` and `store` may have some difference (base on using message-id rather than UID) so this commit is reverting 7dd5437a65 and using the parenthesis around the flag explicitely. opw-2853609 closes odoo/odoo#93158 X-original-commit: 550f9e77625a7917bffd693f18aafe10a04276c9 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
This commit is contained in:
@@ -84,9 +84,9 @@ class FetchmailServer(models.Model):
|
||||
|
||||
# To leave the mail in the state in which they were.
|
||||
if "Seen" not in data[1].decode("utf-8"):
|
||||
imap_server.store(uid, '+FLAGS', '\\Seen')
|
||||
imap_server.uid('STORE', uid, '+FLAGS', '(\\Seen)')
|
||||
else:
|
||||
imap_server.store(uid, '-FLAGS', '\\Seen')
|
||||
imap_server.uid('STORE', uid, '-FLAGS', '(\\Seen)')
|
||||
|
||||
# See details in message_process() in mail_thread.py
|
||||
if isinstance(message, xmlrpclib.Binary):
|
||||
|
||||
Reference in New Issue
Block a user