Commit Graph
66 Commits
Author SHA1 Message Date
Louis Wicket (wil) c8cfc58ea8 [IMP] mail, *: rename messaging initializer model
Rename javascript model `mail.messaging_initializer` to
`MessagingInitializer` in order to distinguish javascript models from
python models.

Part of task-2701674.
* = crm_livechat, im_livechat, mail_bot

closes odoo/odoo#81387

Related: odoo/enterprise#22889
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2021-12-15 00:10:51 +00:00
Louis Wicket (wil) 2cb3f774a1 [IMP] mail,*: change model declaration syntax
* = calendar, crm_livechat, hr, hr_holidays, im_livechat, mail_bot, sms,
     snailmail, website_livechat

This commit will change the declaration of the models with the aim of
getting closer to a plain JSON-object. It allows us to eliminate a wide
portion of boilerplate code, making the declaration shorter, more
declarative, and less redundant, but mainly, it prepares the ground for
further changes.

Task-2695223

closes odoo/odoo#79259

Related: odoo/enterprise#22042
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-11-23 17:53:46 +00:00
std-odooandnounoubensebia cd8e0e9f46 [IMP] base, *: hide non-relevant fields for portal users
Purpose
=======
Hide non-relevant fields for a portal user. E.G. we want to hide the
notification type,  the menu customization... Because those fields
make no sense for a portal user.

Force the non-internal user to receive notifications by emails since
they can not open Discuss.

Task-2508521

Part-of: odoo/odoo#77766
Co-authored-by: nounoubensebia <neb@odoo.com>
2021-11-09 14:45:49 +00:00
Florent de Labarre d9300962c1 [REF] base: add _is_public on partner
To be use in mail, ... and prevent issue with archived partner

closes odoo/odoo#70665

Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-10-29 14:07:43 +00:00
Louis Wicket (wil) 80d74e7ee0 [IMP] mail, web, *: add support for guest users
* = crm_livechat, hr, hr_holidays, im_livechat, mail_bot, purchase, sms,
    snailmail, survey, test_discuss_full, test_mail, web_editor, website,
    website_livechat

 - Create new model `mail.guest` for guests.
 - Rewrite some RPCs to target routes rather than model methods so that
   guests are able to use them.
 - Patch JS and python models to support guests.
 - Create a stand-alone page and boot the channel in it.

task-2494829

closes odoo/odoo#75496

Related: odoo/enterprise#20417
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-09-02 00:43:34 +00:00
Sébastien Theys 7582625ba7 [IMP] mail, *: remove magic from channel commands
* = crm_livechat, im_livechat, mail_bot, test_mail_full

Those are hard-coded methods just like any other, remove the magic call and the
need to forward them to the client at init.

Part of task-2622462
2021-08-11 18:02:37 +00:00
Xavier-Do 288595f558 [FIX] *: add explicit license to all manifest
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.

closes odoo/odoo#74245

Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-26 13:09:57 +00:00
Martin Trigaux 6758868731 [I18N] *: export saas-14.4 source terms
Without demo data

closes odoo/odoo#73560

X-original-commit: 802e46541117573e028b711ea33dad9df9075a39
Related: odoo/enterprise#19602
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-12 10:57:37 +00:00
Florent de Labarre 43de70124c [FW][FIX] crm_livechat: do not set public user partner as lead customer usign /lead command
Before this commit, when you create a lead from livechat with the command /lead, the public user is used inside the lead.
Because the public user is archived, and self.env.ref('base.public_partner').user_ids return an empty recordset.

closes odoo/odoo#71792

X-original-commit: 04ff97e40e3869b1350dca325251747629443e69
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2021-06-07 08:17:22 +00:00
dht-odoo 586ae4bcc4 [IMP] crm: improves description field type from text to html
Replace text fields to html fields as we have our own 'OdooEditor'.
Indeed, it gives more options to users in the way they format their
content without weighting too much on the UI
(tools appear on demand and not by default).

Models -> Fields

1) crm.lead -> description
2) event.event -> note

Task Id: 2499504

X-original-commit: 524e2f089a611d897b98d86001bda5d17263db66
2021-06-07 05:24:08 +00:00
Thibault Delavallée e5338146e7 [REF] mail: make message belongs to a single thread without listener channels
RATIONALE

Channel model is a mail.thread enabled model behaving strangely with followers,
notifications and discuss. Its code should however be simplified to be more
self contained and avoid unwanted side effects on other models.

PURPOSE

Remove channel ability to follow records as it mainly adds noise without a lot
of added value. Simplify channel notification flow by using directly members
and not a delegation through a channel self-following trick. Remove followers
being channels and posting with added listeners being channels.

SPECIFICATIONS

In this commit we force messages to belong to a single document using
``model`` / ``res_id`` pair. It is not possible anymore to link a message
to channels using ``channel_ids``. A message belongs to a document and
is displayed in that document's chatter.

This change implies modifying a lot of domains, notably in chatter. Indeed
discuss for channels does not use ``('channel_ids', 'in', [3])`` domains.
They now use ``('model', '=', 'mail.channel'), ('res_id', 'in', [3])`` like
other documents fetching their messages.

This commit also removes ``channel_message_ids`` field on ``mail.channel``
model. As channels are now considered as standard documents they will use
``message_ids`` field like all other documents. Linking a channel on a message
is possible only as a link in message from now on. It is not possible to push
it into a channel anymore (no more listener channels, no more channel link).

Finally a global cleaning also linked to all previous commits is done.

LINKS

Task ID-2070632 (main task)
Task ID-2419762 (followup task)
COM PR odoo/odoo#62859
ENT PR odoo/enterprise#15172
UPG PR odoo/upgrade#2005
2021-03-17 18:16:35 +00:00
Thibault Delavallée 62dc6a6173 [REF] mail, mass_mailing, hr, {(website_)im_/crm_}livechat: clean use of channel members in various code place
RATIONALE

Channel model is a mail.thread enabled model behaving strangely with followers,
notifications and discuss. Its code should however be simplified to be more
self contained and avoid unwanted side effects on other models.

SPECIFICATIONS

Purpose of this commit is to better differentiate channel members technical
model from partner members in code :

  * ``channel_partner_ids``: contacts member of a channel, filtering notably
    on active and checking ACLs on res.partner business model. This one
    should be used whenever we deal with members of a channel at business
    level;
  * ``channel_last_seen_partner_ids``: memberships of a channel and technical
    model. This one should be used for internal processes and members
    management;

Also containing

  * clean naming or API of methods managing channel members. This should
    not change anything functionally as only code renaming / cleaning is
    performed;
  * improve performances of channel member auto subscription by aggregating
    all members to add and creating them at once;
  * check the use of ``mail.channel.partner`` and ``res.partner`` records
    through ``channel_last_seen_partner_ids`` and ``channel_partner_ids``
    Channel fields;

Functionally nothing should change with this commit. It only cleans code
in order to prepare future modifications.

LINKS

Task ID-2070632 (main task)
Task ID-2419762 (followup task)
COM PR odoo/odoo#62859
ENT PR odoo/enterprise#15172
UPG PR odoo/upgrade#2005
2021-03-17 18:07:25 +00:00
Thibault Delavallée 473b07e34c [FIX] crm_livechat: do not set public user partner as lead customer usign /lead command
When chatting with visitors, operator may use /lead command to directly create
a lead from discussion. That way commercial discussion can follow visitors
inquiries.

Anonymous (public) users may be part of channels, notably since f5fe11cf1e.
In that case we don't want new leads to be associated with those users. Indeed

  * they are not real users, just technical users for website / frontend;
  * merge processes may think all leads having public users as customer are
    duplicates and should be merged, which means loosing information and
    leads;

We therefore set the following heuristics

  * if a public user is member of a channel -> consider this is a livechat
    with an anonymous and set customer_id to False;
  * otherwise try to find a share partner in channel members and link the lead
    to that partner;

Task ID-2389564

closes odoo/odoo#62192

X-original-commit: 7fbeda3f7d92fa501c2752c873be2255697f5d97
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-11-23 14:58:06 +00:00
Martin Trigaux 90d85eb9c5 [I18N] export saas-13.5 source terms
Without demo data

closes odoo/odoo#56869

X-original-commit: 33f251b6489455cd7221f2c62dee0400a69784b8
Related: odoo/enterprise#12836
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-01 11:18:00 +00:00
Florent LejolyandThibault Delavallée d13dba106c [REF] crm : use stored editable r+w fields
PURPOSE

Try to move from onchange / default_get to stored editable computed fields.
Behavior should be the same (computed or set by user), with support of
create / write / onchange field update without additional code.

SPECIFICATIONS

Update classic fields updated in some cases by onchange and/or default methods
by fields with store=True, readonly=False. It means their value comes either
from manual user input, either from trigger based computation.

Remove onchange and default_get when possible, leading to an unique computation
method and clearing fields definition.

Also clean some fields definition inconsistencies, notably required fields
that should instead be correctly computed or default that have no real meaning.

SPECIFIATIONS: CONSTRAINT USER_ID / TEAM_ID

In this commit we also remove all the better implementations of "not really a
constraint" constraint about user_id and team_id. Indeed as this is a computed
field normally we should not have to call the onchange manually, even through
a hackish call to a falsy constraint (see fdc8749, 222cca2, 4e8ebc7 ). You are
all inferior to SM team.

SPECIFIATIONS: DATE_OPEN

Assignment field, namely ``date_open``, has a random definition as it seems
linked to assignation, with several behaviors intended

  * ce39ca8a97 : reset only when going from
    no salesman to a salesman (aka, keep assignation when changing)
  * 8e540558ee: reset when changing salesman

We choose to keep first implementation as it seems a bugfix broken again
by second commit. It will also replace the ``assign_date`` defined in
``website_crm_score`` module.

SIDE EFFECTS

Several side effects occur with this commit. Indeed behavior is not always
exactly the same, notably as code rewriting allowed to fix some issues,
incoherent behavior or was simply not able to achieve exactly the same
result. Notably

  * at lead creation: default probability is the one coming from PLS and not
    0.0 anymore, since field is already computed. Synchronization with PLS
    still works the same way (change probability, you are out of syn);
  * various user_id / team_id combinations notably in convert / merge wizards
    may change, notably we do not reset team_id if user_id is reset. We
    consider we could keep a team_id set without user_id;

LINKS

Task ID 2088565 (crm: from onchange to compute)
Upgrade PR odoo/upgrade#781

Co-Authored-By: Thibault Delavallée <tde@odoo.com>
Co-Authored-By: Florent Lejoly <fle@odoo.com>
2020-03-23 11:42:12 +00:00
Jigar Patel 199af375aa [FIX] crm_livechat: convert leads from livechat discussions
Fixes a7b8907003

opw-2078313

X-Original-Commit: 8ab09cad3101519a2d805699d927ef598343b17b
2019-12-20 09:09:12 +01:00
David Beguin dc101d12a5 [IMP] website_crm_livechat : link visitor to lead on /lead command
If an operator executes the /lead commands, the visitor was not linked to the
lead. This commit fixed that. The visitor is now linked to the lead but the
visitor does not take the lead's name.
(As '/lead leadName' creates a lead with 'leadName' as name but not as contact
name and the visitor needs the contact name of the lead)

Task ID: 2081534
PR #38706

closes odoo/odoo#41960

X-original-commit: 8c257a6219f72118af4e81c14fb2c6c9f320df17
Signed-off-by: David Beguin <dbeguin@users.noreply.github.com>
2019-11-20 13:33:08 +00:00
Martin Trigaux b7d91ba25b [I18N] *: remove es_AR translations
Followup of a425695e
The terms were back in 12.0
Courtesy of Juan José Scarafía

closes odoo/odoo#41624

X-original-commit: 85d0c7001a997748d7691205bbb8d066597591a5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-10 10:00:18 +00:00
Odoo Translation Bot b6e7ed6c7b [I18N] Update translation terms from Transifex 2019-10-07 09:11:11 +02:00
Odoo Translation Bot 40deff7cbe [I18N] Update translation terms from Transifex 2019-10-01 21:21:46 +02:00
Odoo Translation Bot d7b8831ea8 [I18N] Update translation terms from Transifex 2019-09-29 01:22:33 +02:00
Victor Feyens 07631a5185 [IMP] * : manifest module categories cleanup
closes odoo/odoo#35754

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-09-25 14:03:45 +00:00
Odoo Translation Bot e80b81dca1 [I18N] Update translation terms from Transifex 2019-09-15 01:30:37 +02:00
Odoo Translation Bot 0d51520083 [I18N] Update translation terms from Transifex 2019-09-08 01:29:12 +02:00
Odoo Translation Bot 86809804f9 [I18N] Update translation terms from Transifex 2019-09-01 01:28:13 +02:00
Martin Trigaux 8be6470a82 [I18N] *: export saas-12.4 source terms 2019-08-13 11:53:38 +02:00
Jeremy Kersten 378e448a89 [IMP] crm_livechat: add source on lead cmd
Auto add source Livechat when lead created from livechat command /lead

task:internal-request

closes odoo/odoo#34763

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-10 15:28:37 +00:00
Odoo Translation Bot 1208ac6ce3 [I18N] Update translation terms from Transifex 2018-12-02 01:25:05 +01:00
Odoo Translation Bot b60f9bb739 [I18N] Update translation terms from Transifex 2018-11-18 01:28:38 +01:00
Odoo Translation Bot dcc077afc5 [I18N] Update translation terms from Transifex 2018-11-11 01:26:46 +01:00
Odoo Translation Bot 790bd62f14 [I18N] Update translation terms from Transifex 2018-11-04 01:27:12 +01:00
Odoo Translation Bot 29dc21ae4b [I18N] Update translation terms from Transifex 2018-10-28 01:25:21 +02:00
Odoo Translation Bot de265ce63e [I18N] Update translation terms from Transifex 2018-10-21 01:25:56 +02:00
Odoo Translation Bot e774b2cb1c [I18N] Update translation terms from Transifex 2018-10-14 01:23:43 +02:00
Odoo Translation Bot b6c8919444 [I18N] Update translation terms from Transifex 2018-10-07 02:27:57 +02:00
Odoo Translation Bot 1d79bf0273 [I18N] Update translation terms from Transifex 2018-09-23 02:29:29 +02:00
Odoo Translation Bot 53908da50c [I18N] Update translation terms from Transifex 2018-09-18 18:08:33 +02:00
Martin trigaux 710f67ad4b [I18N] export saas-11.5 source terms
To match new model_terms syntax
2018-09-18 14:30:04 +02:00
Odoo Translation Bot e9111f46a6 [I18N] Update translation terms from Transifex 2018-09-16 02:21:25 +02:00
Odoo Translation Bot 0b2349ee41 [I18N] Update translation terms from Transifex 2018-09-14 11:30:58 +02:00
Odoo Translation Bot e8606ce00b [I18N] Update translation terms from Transifex 2018-09-02 02:24:05 +02:00
Odoo Translation Bot f22e61dc74 [I18N] Update translation terms from Transifex 2018-08-29 14:19:27 +02:00
Odoo Translation Bot 0da9da4c44 [I18N] Update translation terms from Transifex 2018-08-26 02:17:37 +02:00
Odoo Translation Bot 10c9f07286 [I18N] Update translation terms from Transifex 2018-08-24 15:22:47 +02:00
Odoo Translation Bot 935bac15df [I18N] Update translation terms from Transifex 2018-08-03 10:55:14 +02:00
Odoo Translation Bot 8aed99b0bd [I18N] Update translation terms from Transifex 2018-08-02 14:39:54 +02:00
Odoo Translation Bot 0b927cf590 [I18N] Update translation terms from Transifex 2018-04-01 07:07:32 +02:00
Martin Trigaux 7d86bdca21 [I18N] *: export source terms of saas-11.2 2018-03-22 15:19:07 +01:00
Odoo Translation Bot 09923c7bf6 [I18N] Update translation terms from Transifex 2018-02-11 07:05:39 +01:00
Odoo Translation Bot a39491d459 [I18N] Update translation terms from Transifex 2017-12-31 07:10:12 +01:00