Commit Graph
16 Commits
Author SHA1 Message Date
Martin Trigaux cd2f330bec [IMP] *: remove glocal ACL
Specify explicit route for each ,, line
This is part of task 3230280 where global ir.model.access will be
forbidden.
The goal is to make access to public/portal explicit. Too often,
global access was granted with only employees in mind.

Remove ,,0,0,0,0 lines

mail:
employee already had read access to mail.group
still needed to subtypes as in ir.rule domain

mail_group: employee already had read access
pos_mercury: only needed for employees

membership:
move public access for website_membership as needed in the controllers

website_customer: employee already had read access

website_event_booth: no need for category
website_event_exhibitor: retrieved in sudo
website_event_track: not needed for location

Part-of: odoo/odoo#125216
2023-07-11 22:33:47 +02:00
prye-odoo 7694f012cd [FIX] *: handle unlink/create access for reporting views
*: account,event_sale,fleet,hr_attendance,hr_contract,hr_timesheet,
im_livechat,point_of_sale,project

When the user tries to delete a record(s) from the reporting views,  this
traceback will be generated.

Steps to produce (Example only):

- Settings > Technical > Actions > Window Actions
- Search for the Work Entries Analysis. Open it and add a 'tree' as view_mode
in that action.
- Payroll > Reporting > Work Entries Analysis menu and select the tree view.
- Select one or more records and try to delete these records.

Error: A traceback appears: "cannot delete from view "hr_work_entry_report"

Handled the unlink access by using their model access of the reporting models.
similarly, this issue resolves in other reporting models.

Sentry-3975590063

closes odoo/odoo#125697

X-original-commit: 209d8c76ce9bb1d6cc7084d55b5623e939af8fbc
Related: odoo/enterprise#42825
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
2023-07-03 21:55:48 +02:00
Martin Trigaux 604a47ead8 [IMP] *: remove global ACL
THese are rarely intended for all users but often intended only for
employees.

account:
account.incoterms: only used within internal business models
account.journal.group: same as account.journal, add sudo in computed field

account_edi: need access to accounting objects

base_address_extended:
res.city: only employees should access address data

board: only employees uses this (old) module

crm:
crm.stage: internal users business object

hr_recruitment: employees can read

im_livechat: apply same as for the steps

l10n_ar: used on partner, not only invoices
l10n_ec: accessed only through account.move
l10n_latam: accessed on res.partner

mail:
publisher.warrenty.contract: no data, only static models
mail.channel: group_user has already his own rule
mail.group: group_user has already his own rule
mail.message.subtype: group_user has already his own rule
mail.message.all: remove, already has a portal and employee rule

partner_autocomplete: no interaction with public

project:
project.tags: only needed for project sharing

sale_management:
sale.order.option: same as sale.order

utm: employee already has write access

web_editor: test models that have nothing to do here
web_tour: only employees uses tours

website_sale:
product.ribbon: add sudo for access

base:
ir.default: only employees uses set (could probably be converted to group_system)
ir.ui.view.custom: same as ir.ui.view, add sudo when needed
report.*: portal users don't configure reports
res.users.log: create in sudo, no access needed (adapt test to use another model)
res.lang: still needed for public

closes odoo/odoo#118701

Related: odoo/enterprise#41285
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2023-06-12 22:39:26 +02:00
Aurélien WarnonandPatrick Hoste ea680d8595 [IMP] im_livechat: introduce chatbot scripts
PURPOSE

This commit introduces a chatbot operator that works based on a user-defined
script with various steps.

SPECS

A im_livechat.chatbot.script can be defined on a livechat rule.
When a end-user reaches a website page that matches the rule, the chat window
opens and the script of the bot starts iterating through its steps.

The chatbot code is currently directly integrated with the existing livechat
Javascript code.
It defines extra conditions and layout elements to be able to automate the
conversation and register user answers.

AVAILABLE STEPS

A script is defined with several steps that can currently be one of the
following types:

"text"

A simple text step where the bot posts a message without expecting an answer
e.g: "Hello! I'm a friendly robot!"

"question_selection"

The bot will ask a question and suggest answers, the end-user will have to
click on the answer he chooses
e.g: "How can I help you?
  -> Create a Ticket
  -> Create a Lead
  -> Speak with a human"

"question_email"

That step will ask the end user's email address (and validate it)
The result is saved on the linked im_livechat.im_livechatchatbot.mail.message

"question_phone"

Same logic as the 'question_email' for a phone number
We don't validate the input this time as it's a complicated process
(requires country, ...)

"forward_operator"

Special type of step that will add a human operator to the conversation when
reached, which stops the script and allow the visitor to discuss with a
real person.

The operator will be chosen among the available operators on the
livechat.channel.

If there is no operator available, the script continues normally which allows
to automate an "answering machine" that will redirect the user in case no
operator is available.

e.g: "I'm sorry, no operator is available right now, please contact us by email
at 'info@company.com', we will try to respond as soon as possible!".
(Or even something more complex with multiple questions / paths).

"free_input_single"

Will ask the visitor for a single line of text.
This text is not saved anywhere else than in the conversation, but it's still
useful when combined with steps that create leads / tickets since those print
the whole conversation into the description.

"free_input_multi"

Same as "free_input_single" but lets the user input multiple lines of text.
The frontend implementation is made by waiting a few seconds (currently 10) for
either the next submitted message or the next character typed into the input.

This lets visitors explain their issue / question with multiple messages.
Which is very useful since new messages are sent every time you press "Enter".

LINKS

Task-2030386

Part-of: odoo/odoo#84000
Co-authored-by: Patrick Hoste <pko@odoo.com>
Co-authored-by: Aurélien Warnon <awa@odoo.com>
2022-04-01 18:49:56 +02:00
Jérome Maes 132e96accb [IMP] im_livechat : refactoring + improving performance by removing rpc call 2015-09-01 20:58:11 +02:00
Jérome Maes 95b97d1010 [REF] im_livechat : refactoring, make it compatbile with the nw mail module, change reporting sql view (split them in 2), adapt view, ... 2015-09-01 20:16:09 +02:00
Jérome Maes a80219e292 [MIG] bus, im_chat, im_livechat, website_livechat : migration to new API.
Migrate the models and controller to new API. Renaming xml id according to convention, renaming openerp tag into odoo tag. Add comment strings and documentations.
2015-04-28 17:04:16 +02:00
Jérome Maes 6dcad6d0ec [IMP] im_livechat : add rule to display (or not) the support button. 2014-11-21 15:21:17 +01:00
Jérome Maes 85dda405e8 [IMP] im_chat, im_livechat : add reporting view, quit conversation, option dropdown menu, feedback for live support, better access rules and shortcode model. 2014-10-03 12:08:02 +02:00
Antony Lesuisse c60798d3b0 MERGE] odoo bus, im_chat and im_livechat
Add a generic bus for instant communication based on postgres LISTEN/NOTIFY and HTTP comet.
Both threaded and gevent greenlet mode are supported. Chat should now work on every platform.

im_chat improvements
- proper support for multiple windows
- present, away and offline status
- improved data model for multi user chat session

im_livechat improvements
- standard css js assets are now used
- qweb templates are now used instead of jinnja
2014-06-29 04:01:13 +02:00
Christophe Simonis c202dc1c52 merge upstream
bzr revid: chs@openerp.com-20140129190834-xfcat3ulfbg5omhn
2014-01-29 20:08:34 +01:00
Denis Ledoux f13dd8cee7 [FIX][ADD] im, im_livechat: fix security rules and add history when opening a conversation
bzr revid: dle@openerp.com-20140128162649-aptjndl85ocmem8a
2014-01-28 17:26:49 +01:00
Thibault Delavallée 3ecb289c1e [FIX] addons: fixed some references to portal.group_portal -> base.group_portal
bzr revid: tde@openerp.com-20131008132616-6rhc4xuzfgtyvweg
2013-10-08 15:26:16 +02:00
Christophe Matthieu 6a9bbba17e [IMP] remove portal_anonymous, create group_public in server and public user in website
bzr revid: chm@openerp.com-20130726090445-4mmd1xlx5uwd6vmx
2013-07-26 11:04:45 +02:00
Thibault Delavallée 9dec66ed63 [FIX] im_livechat: fixed missing access rules for portal users.
bzr revid: tde@openerp.com-20130524133341-5k17letufzurpuek
2013-05-24 15:33:41 +02:00
niv-openerp 296b9fbbb4 Renammed modules
bzr revid: nicolas.vanhoren@openerp.com-20130315112153-ftm3i021erfnqp01
2013-03-15 12:21:53 +01:00