Commit Graph
36 Commits
Author SHA1 Message Date
Aaron Bohy ff6e89052d [REF] web,*: regroup custom hooks in core/utils/hooks
*base_automation,iap,im_livechat,point_of_sale

This commit introduces a new file in core/utils: hooks.js
This file contains custom hooks (useEffect, useService, useBus...).

The useHotkey hook is tightly related to hotkeys, so it has been
moved to core/hotkeys.

closes odoo/odoo#74535

Related: odoo/enterprise#20003
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
2021-08-02 11:13:52 +00:00
Michael Mattiello (mcm) 580533ecfb [REF] web, *: change dialog service api
* iap, web_tour

This commit changes the API of the dialog service.

Before, the API gave 2 functions: "open" and "close".
Now, there is only one function "add" which is the same as "open"
but returning a callback that does the close.

closes odoo-dev/odoo#940

Related: odoo-dev/enterprise#171
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
2021-06-18 21:31:33 +02:00
Samuel Degueldre ad9a322a76 [IMP] web, iap: introduce odoo.info.isEnterprise and use it 2021-06-18 21:31:31 +02:00
Samuel Degueldre 4e7187bba0 [REF] iap: adapt include on CrashManager
In iap, we want to handle InsufficientCreditErrors in a special way
(present the user with a prompt to buy more credits) instead of the
usual error handling that shows a crash dialog. Previously, this was
done by doing an include on the crash manager. In wowl, we no longer use
the crash manager in the backend, and replaced it with an error service
that allows developpers to register error handlers for these kinds of
use cases.

This commit adapts what was previously an include on the crash manager
by instead adding a handler to the error handler registry, the file has
also been renamed accordingly.

The file iap_credit.js has also been removed, as it adds an action to
the action registry that is no longer called by anything, and is dead
code.
2021-06-18 21:31:31 +02:00
Adrien Dieudonne b13884fa7a [FIX] *: removal of any possibility of purchasing IAP credit in iOS
According to the app-store guidelines we are not allowed to sell from
the iOS app.

Our updates are currently blocked because of this.
In the rush, we have no choice but to hide certain elements related to
IAP services.

Source: https://developer.apple.com/app-store/review/guidelines/#business

Related PR:
https://github.com/odoo/mobile-ios/pull/102
https://github.com/odoo/mobile-ios/pull/103

Task-id: 2483253
X-original-commit: 657780cc7102c77cafe20998df0d7667cdc4c0df
2021-04-29 10:07:36 +00:00
Urvi Soni e109e476e6 [IMP] various: reorganize the general setting
Purpose of the task is, 'general setting' is not easily understandable
by the user. The user often gets lost. This is especially damaging
through onboarding as some new users like to discover the software by
scrolling through the general settings.

So in this commit, the general setting is well organized and easily
understandable by the user.

Related PR: https://github.com/odoo/enterprise/pull/14707

closes odoo/odoo#61645

Taskid: 2374990
Related: odoo/enterprise#14707
Related: odoo/upgrade#1958
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2021-03-25 15:48:10 +00:00
Krina Oza 036b7720d0 [IMP] various: Updated App icons for various modules
In this commit icons of the following modules are updated:

-fetmail
-hr_skills
-iap
-mail_bot
-microsoft_calendar
-partner_autocomplete
-payment_alipay
-payment_odoo_by_adyen
-payment_payulatam
-sale_timesheet
-sms
-snailmail
-test_exceptions

TaskID:2378861

closes odoo/odoo#62291

Related: odoo/enterprise#14958
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-11-25 11:09:53 +00:00
Krina Oza 42965b16cb [IMP] various: Update the app icons
Purpose of the task is to update the icon of the various modules.

So in this commitn updated App icons of the following modules:

-fetchmail
-iap
-mail_bot
-partner_autocomplete
-sale_timesheet
-sms
-snailmail

Related PR: https://github.com/odoo/enterprise/pull/14408

closes odoo/odoo#60817

Taskid: 2369682
Related: odoo/enterprise#14408
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-10-27 13:19:20 +00:00
Nisha patel e51c341aa0 [IMP] iap: Link to the IAP Portal from each service setting
Purpose of this task is, the current link to the IAP portal is very
well hidden in the general settings, so we are confident most users
won't find it.

So in this commit, we added 'View my Services' link below the
'Buy credits' in various IAP settings like: crm, account
and settings.

closes odoo/odoo#57063

Taskid: 2157984
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-09-11 10:47:13 +00:00
Florimond Husquinet (fhu) f25b730b2f [FIX] iap: take into account the new path of InsufficientCreditError
in the `crash_manager.js` of the iap module.

closes odoo/odoo#56262

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-08-21 07:34:27 +00:00
Sébastien Theys c2918c139b [IMP] web, *: improve mock server and replace most mail mockRPC
Improve mock server:

- add support for mocked `fetch`
- add support for `active_test`
- add support for x2m `in` in domains
- add support for default values computed from a function
- implement a more natural "next id" compute
- allow initial data without ids
- ensure write and x2m commands integrity
- improve bad data/bad commands error messages
- always warn for failing RPC, not only in debug mode
- fix all existing tests that had inconsistency data

Other changes done in mail (or dependents) that are not just related to tests:

- remove `direct_partner` from formatter result
  ->`correspondent` can be computed from other keys, especially `members`

- fix `livechat_visitor` convertData
  -> only process if there is value

- add `current_partner` and `current_user_id` as `init_messaging` result
  -> easier to mock than session

- remove usage of `need_moderation`
  -> that was just a search indirection to `moderation_status`

- adapt `partner_id` -> `res_partner_id` key in `_notification_format`
  -> to be consistent with field name

- add name in result of `mail_partner_format`
  -> sometimes display_name is not the same

- remove usage of `is_moderator`
  -> that was just an indirection to `moderation_channel_ids`

Enterprise counterpart: https://github.com/odoo/enterprise/pull/11523
task-2287171

closes odoo/odoo#55854

X-original-commit: 7ba3fecb3377a720d1eb70e7515a0c45da73836d
Related: odoo/enterprise#12391
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2020-08-13 16:26:35 +00:00
fleodoo 1a36d98e5f [ADD] crm_iap_lead_enrich: enrich leads based on email address
PURPOSE

Allow the user to enrich a lead based on the domain of the email address of
the client.

SPECIFICATIONS

Following fields will be populated if found using clearbit and if they are
not yet populated :

* description
* partner_name
* reveal_id
* website
* street, street2, zip, city, country_id, state_id
* phone (using the first number found in clearbit)
* mobile (using the second number found in clearbit, else the same as phone)

A message will also be logged in the chatter.

If no data is found using clearbit no credit is used and a message will be
logged. If the user has no credits he will be redirected to buy credits for
the service.

It is possible to enrich using the 'enrich' action in listview or with a
cron that will run every hour on leads not older than 1 hour.

Add a "Lead Enrichment" setting in CRM installing lead enrichment.

LINKS

Task 193185

closes odoo/odoo#36419

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-09-05 15:17:14 +00:00
aca 78565b1dc9 [REM] web_settings_dashboard: Merge module into base_setup
Purpose
=======

Currently, when we click on “Settings” on the Home Dashboard, we arrive
on a new Dashboard with several pieces of information like Installed Apps,
invite new users, or translations. Some informations are reachable in
several ways, which is not necessary.

We would like to remove this page and replace it with the General Settings
page directly. That makes more sense to the user who click on “Settings”. The
present informations will be dispatched in the menu or in the general settings
for a better usability.

Specification
=============

This commit move code from web_settings_dashboard in order to put the features
in settings directly. To do so, we choose to move code to base_setup, and create
widget on the settings form view to keep features. Concerned features are: invite
users, dev tools, odoo edition number and IAP account link.

TaskID: 2006910

closes odoo/odoo#34290

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-26 09:53:46 +00:00
fja-odoo f8fe314e78 [IMP] web, *: display warning/error in frontend
* = account, iap, point_of_sale

Removing the CrashManager templates from base.xml and moving
it to a new file (crash_manager.xml) to allow lazy loading the required
xml only when a crash occurs (necessary for the frontend as no xml is
pre-loaded).

All rpc errors/warnings are now displayed using the same modal system as
the backend (crash_manager.js).

CrashManager will now return the WarningDialog and ErrorDialog
in addition to the CrashManager itself.
In some cases an instance of CrashManager was created just to
display a warning/error dialog.

In the backend all rpc errors but sessionExpired will be logged.
If the exception is a warning, NotFound (403) or except_orm, it will be
a warning log. The rest will be exception log.

In the frontend all rpc errors will be logged using console.debug
instead of console.warn and console.error. This way we can trigger
rpc errors in tests without failing them. If a real error happend
during a test it will fall back on the backend logger to fail the test.

Part of https://github.com/odoo/odoo/pull/32132
task-1894820
2019-06-28 08:53:52 +00:00
Pierre Rousseau 047e0ba708 [IMP] iap: align buy credits to the left
In the settings, align the link 'buy credits' to the left.

Task-ID: 2007611

closes odoo/odoo#34027

Signed-off-by: Pierre Rousseau (pro) <pro@odoo.com>
2019-06-11 11:52:35 +00:00
Christophe Simonis 8c29df10e0 [MERGE] forward port branch saas-12.1 up to 93d736e905 2019-02-11 17:00:35 +01:00
Pierre Masereel 4de183a966 [FIX] iap: logo svg text
The IAP logo is an svg file, and contains a text tags with font
specified in it. It leads to wrong display in some browser and/or
operating systems when the font is not installed.

To avoid this wrong display we changed the text into a path in the svg.

closes odoo/odoo#30995
2019-02-11 08:44:38 +00:00
Pierre Rousseau 405705de2b [IMP] crm, iap, sms, snailmail_account, partner_autocomplete: replace credit checker widget
Remove the check of the balance for the IAP accounts in the settings.
Add a link to buy credits to all of the services in the settings.

Task #1909302
2019-01-02 10:22:12 +00:00
Antoine Prieels (ANP) 8000638ade [IMP] iap: Add full div to Web Settings Dashboard
The IAP link in Web Settings Dashboard used to be a simple text link in DashboardApps, now we've created a full div

closes odoo/odoo#28566
2018-11-12 16:15:49 +00:00
Rémi Rahir 134411710a [FIX] iap: make link visible in SAAS
When we switched to bs4, we changed the style of the dashboard and put
the iap recap link inside a specific div which elements are hidden for
saas users.
2018-10-25 12:40:11 +00:00
Alexandre Kühn 4f3e051891 [FIX] web_settings_dashboard: browse apps
Before this commit, it was not possible to access
apps from 'Browse apps' in the Settings menu when
at least one app was installed.

This is caused by the clickable DOM element being a `<a>`
with `href='#'`. This redirects to the 1st app, usually
the 'Discuss' app, which prevents opening the kanban view
with apps.

This commit fixes the issue by preventing the browser to
change the URL in the address bar when clicking on
'Browse apps' from the 'Settings' application.

Closes #27434
Closes #27442
2018-10-10 15:39:25 +00:00
TWA 0dd92f7f21 [FIX] partner_autocomplete: No auto-create IAP Account in the settings
Instead of forcing the creation of iap account to consult its balance,
since it will most likely be 0 at creation, we only generate it on
explicit user action (e.g. Click to recharge the account).
2018-10-01 16:29:45 +02:00
TWA c51d4c2d05 [FIX] partner_autocomplete: Catch error on get credit balance 2018-09-29 11:30:21 +02:00
TWA 9adbd587d3 [FIX] iap: fix double rpc in get credit widget 2018-09-27 10:45:30 +02:00
TWA 302bd149dc [IMP] iap: Check Credit Widget moved to IAP module 2018-09-25 22:28:43 +02:00
Antony Lesuisse a6e1eb9f0a [ADD] partner_autocomplete: Added autocomplete on partners fields
For Name field or M2O, gives a list of companies
Data comes from Odoo IAP Service
2018-09-21 14:02:22 +02:00
TWA 947194c03d [IMP] iap: Adapt insufficient credit message
based on enterprise and trial
2018-09-18 08:55:26 +02:00
Rémi Rahir 0354579c98 [IMP] iap,snailmail: support new trial system 2018-09-17 12:45:05 +02:00
qsm-odoo e1a734df3a [FIX] web_settings_dashboard, *: try restoring settings dashboard design
* iap

The layout is still not ok and should be improved but this commit at least
make it functional.
2018-07-27 12:36:54 +02:00
kujiu f90cf060a3 [FIX] Syntax of icons (#25577)
Description of the issue/feature this PR addresses:

Accessibility improvements forbids the use of the syntax
`<i class="fa fa-check"/> Some text`
to create a labelled icon. But, by this, some fonts are changed.

Desired behavior after PR is merged:
The old syntax can be used.
2018-07-04 09:55:52 +02:00
kujiu 9de1bc0eef [IMP] Improve compatibility with screen readers (accessibility) (#24574)
Today, Odoo is really tricky to use without seeing the screen, it must be improved to be usable.

This PR forbid to use labels without a "for" attribute, add some title, rule and aria attributes in HTML. With that, Odoo will be fully usable with a screen reader.


* [IMP] Labels must have a for attribute. Improve accessibility.
* [IMP] Better error message when trying to read a missing cached value
* [FIX] Add some aria-label and title attributes for screen readers.
* [FIX] Template name is not included in the error message in case of SyntaxError in QWeb
* [FIX] Improve the Tour failed at step error message to be more explicit.
* [IMP] Add aria-labels
* [FIX] Add missing aria-label on failing test
* [IMP] aria-hidden means hidden. Fix all bad aria-hidden and hide aria-hidden for all.
* [IMP] Color names on kanban views and many2many tags
* [IMP] Add some checks on views for accessibility.
* [IMP] Add `alt` attribute on `img` tags.
* [IMP] Add aria-label and title on non-described icons
* [IMP] Add button role to widgets with btn class
* [IMP] Translate aria and formatted attributes.
* [IMP] Remove wrong aria-labelledby
* [IMP] Add menu role on dropdowns
* [IMP] Buttons must be focusable
* [IMP] Add aria attributes on progress bars
* [IMP] Improve accessibility of basic widgets
* [IMP] Change main layout to more semantic tags
* [IMP] Add menuitem role when missing
* [IMP] Remove wrong role='presentation'
* [IMP] Improve accessibility of tab panels
* [IMP] Add aria-invalid on invalid fields
* [IMP] Add aria-sort on ordered columns
* [IMP] Add role on alerts
* [IMP] Use dialog role, header, main and footer tags for modals
* [IMP] Add labels on o_status
* [IMP] Improve accessibility of kanban view with feeds and articles
* [IMP] Add alerts in case of new messages
* [IMP] Add widget, navigation or img role to aria-labelled items
2018-06-22 21:22:21 +02:00
Géry Debongnie b17ba359db [REF] web,*: introduce the concept of AbstractAction
Before this commit, a client action was simply a subclass of Widget.
This is quite simple, but not really enough for the ActionManager. The
ActionManager needs to handle client actions in a different way that
view actions. Sometimes, it needs to check if a method exists before
calling it.

With this commit, we introduce a new abstraction: the AbstractAction
class, which defines a common API for all actions managed by the web
client.

Note that the API proposed in this commit is just the beginning. We will
introduce other methods in the future, to manage the focus, or the
scroll position, for example.
2018-03-08 16:48:54 +01:00
Rémi Rahir 4669a4a91f [FIX] iap: account link not wworking in saas
Before this commit, the dashboard pill taht allows the user to consult
his iap accounts was hidden for saas users as it is grouped with the
app store and theme buttons which are not supposed to be shown since
they are not available in saas.

This commit ensures taht the button will be shown both on saas and premise instances.
2018-01-28 16:32:14 +01:00
Rémi Rahir ae57243dfb [FIX] iap: translation terms
Added missing translation on iap error modal.
2017-12-18 17:32:21 +01:00
Rémi Rahir a46b79f185 [FIX] iap: fixing display in the crash manager
Before this commit, there was a default behaviour reducing the padding of the qweb render
to 0 in order to display bakcground images correctly. Unfortunately, this doesn"t take in account
cases where images or more generally, qweb template were not provided in the InsufficientCreditError
message.

This commit solves this situation.
2017-12-18 17:32:21 +01:00
Antony Lesuisse 6b22476e20 [ADD] iap: In app purchase
IAP allow app publishers to charge for ongoing services. In that context, Odoo
acts mostly as a payment platform between the service user (client) and the service
provider (Odoo App developer).
2017-10-04 20:22:22 +02:00