Commit Graph
18 Commits
Author SHA1 Message Date
Jorge Pinna PuissantandMichael Mattiello (mcm) c7c2959449 [IMP] web, *: simplification and standardization of the settings arch
The aim of this commit is to simplify and standardize the settings archs.

To do this, a small DSL exclusively for the settings was created. This
new DSL introduces 3 tags: `app`, `block` and `setting`.

The `app` tag is used to declare the application on the settings view.
It creates an entry with its logo on the sidebar of the view. It also
acts as delimiter when searching.

```xml
    <app string="CRM" name="crm">
    ...
    </app>
```

- `string` : The "display" name of the application.
- `name` : The technical name of the application (the name of the module).
- `logo` *optional* : The relative path to the logo. If not set, the
        logo is created using the `name` parameter :
        `/{name}/static/description/icon.png`.

The `block` tag is used to declare a group of settings. This group can
have a title and a description/help.

```xml
    <block title="Title of group Bar">
    ...
    </block>
```

- `title` *optional* : The title of the block of settings (the old h2),
        you can perform research on its text.
- `help` *optional* : The description/help of the block of settings
        (the old h3), you can perform research on its text.

The `setting` tag is used to declare the setting itself. The first field
in the setting is used as the main field (optional). This field is
placed on the left panel (if it's a boolean field) or on the top of the
right panel (otherwise). The field is also used to create the setting
label if a `string` is not defined. The `setting` tag can also contain
more elements (e.g. html), all of these elements are rendered in the
right panel.

```xml
    <setting string="this is bar">
        <field name="bar"/>
        ...More elements
    </setting>
```

- `type` *optional* : By default, a setting is visually separated on two
        panels (left and right), and is used to edit a given field. By
        defining `type='header'`, a special kind of setting is rendered
        instead. This setting is used to modify the scope of the other
        settings. For example, on the website application, this setting
        is used to indicate to which website the other settings apply.
        The header setting is visually represented as a yellow banner on
        the top of the screen.
- `string` *optional* : The text used as label of the setting. If it's
        not defined, the first field is used as label.
- `title` *optional* : The text used as tooltip.
- `help` *optional* : The help/description of the setting. This text is
        displayed just below the setting label (with classname
        `text-muted`).
- `company_dependent` *optional* : If this attribute is set to "1" an
        icon is displayed next to the setting label to explicit that
        this setting is company-specific.
- `documentation` *optional* :  If this attribute is set, an icon is
        added next to the setting label, this icon is a link to the
        documentation. Note that you can use relative or absolute path.
        The relative path is relative to
        `https://www.odoo.com/documentation/server_version`, so it's not
        necessary to hard-code the server version on the arch anymore.

closes odoo/odoo#106425

Task-id: 3081367
Related: odoo/enterprise#34337
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: "Michael Mattiello (mcm)" <mcm@odoo.com>
2022-12-02 14:40:25 +01:00
François (FRC) 377f18013a [FIX] partner_autocomplete, *: fix partner autocomplete dropdown menu hidden
base: The two elements were not distinguishable by an xpath.

partner_autocomplete: Use new ids in xpath

The class `o_text_overflow` set on the fields was also
preventing the dropdown menu from appearing. This class is
now moved to the `input` tag instead of the while `div`.

closes odoo/odoo#78141

Task: 2638570
X-original-commit: fd7bfbccd45f874d5a826e695858bc75c8467700
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
2021-10-11 13:52:31 +00:00
Julien MougenotandSimon Genin 03641610c2 [REF] *: convert all modules to new asset system
Conversion of all modules to the new manifest assets declaration.

Part of task: 2352566

Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Simon Genin <ges@odoo.com>
2021-03-31 13:57:18 +02: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
97f2957821 [IMP] partner_autocomplete: automatically enrich user companies
In order to make a wow effect right after DB install we enrich the base
company based on the given email address or company website at install.
In order to achieve that goal we use the partner_autocomplete service from
IAP. It uses free credits that are offered to new clients on saas platform.

Only the fields that are not filled yet are enriched to avoid erasing user
entered data, except logo. Indeed as partner_autocomplete is probably installed
as a core app (mail -> iap -> partner_autocomplete auto install chain) it is
unlikely that people already updated their company logo.

We consider that having a call to IAP consuming a token is ok for a standard
use case, especially that

  * if no iap service is configured call to IAP won't add much timing;
  * on Odoo SaaS free credits are given and company is enriched;
  * on custom SaaS with custom iap service, at db creation probably no
    credits are given and call will simply give no results back;

We decided to call IAP asynchronously at client web load. Session combined to
a boolean field on company model allows to do this call only once per company.
Doing this allows to avoid adding yet another post init hook. It also eases
behavior tweak through inheritance.

This call is limited to admin for obvious security reasons as well as
performance reason (limiting calls to external providers). As call will be
done once per company generally admin is the first person to log into the
its newly created Odoo.

LINKS

Task ID-2322455
PR odoo/odoo#64600
PR odoo/upgrade#2086

Co-Authored-By: David Beguin <dbe@odoo.com>
Co-Authored-By: Thibault Delavallee <tde@odoo.com>
2021-02-01 13:53:59 +00:00
Thibault Delavallée 323890f7ea [ADD] iap_mail: bridge between mail and iap
PURPOSE

Clean and improve IAP services integration in Odoo. Clean IAP integrations
tools and improve data sharing with base modules, notably for CRM and Partner.

SPECIFICATIONS

In this commit we create a bridge module between iap and mail to hold notably
some notification data. It includes a template shared by several iap modules.

We also move its override in the right file and clearly rename assets file
in crm_iap_lead in order to clean a bit module organization.

LINKS

Task ID-2248367
Community PR odoo/odoo#53214
Enterprise PR odoo/enterprise#11258
Upgrade PR odoo/upgrade#1363
IAP PR odoo/iap-apps#191rade#
2020-08-18 11:41:59 +00:00
Aurélien Warnon 9620721884 [IMP] partner_autocomplete,crm_*: unify displayed "clearbit" information
PURPOSE

We make multiple calls to the clearbit API and the returned information are
shown in various different templates, although they contain the same
information.

The purpose of this commit is to unify the templates into a single one to
reduce code size and improve coherence.

SPECIFICATIONS

Currently, we have 3 ways of reaching out to the IAP clearbit api:
- When creating a partner (autocomplete service)
- When enriching an existing lead based on its email address
- When generating leads using the "Geneate Leads" button or using the website
  visitors

Every time we use the service, we log a note in the model's chatter containing
all the information returned by the cleabit service (estimated annual revenue,
media links, sector, ...).

Though using different endpoints and methods, all the calls essentially return
the same data, and the templates could be unified for consistency.

This is the goal of this commit.

We merge the 3 separate templates of each modules into a unique template that
always renders the same information to the end user.

To do that, we had to find a common module to store the template, we chose
"partner_autocomplete" as it's installed anyway as soon as "crm_iap_lead_*" is
installed.

LINKS

PR #40349
Upgrade PR odoo/upgrade#775
Task 2081471
2020-04-15 07:37:43 +00:00
Julien Mougenot ed38c2adb8 [FIX] web: flatten t-call-assets in test assets bundle
Before this commit, the test assets were called with a `t-call-assets` and contained
themselves some other `t-call-assets` to the back-end assets. According to the current
specification, having nested `t-call-assets` will result in a compilation of the
lower levels regardless of the current debugging mode.

Now, the test bundles (desktop & mobile) have been arranged so that their `t-call-assets`
are all called on the same level.

closes odoo/odoo#49306

Related: odoo/enterprise#9797
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-04-09 14:59:54 +00:00
Julien Mougenot 48ee7272b6 [IMP] *: adapt qunit suite bundle inheritance
Since the test assets bundle name has been changed and its structure is different,
the inheriting assets need to be updated.

Task 2002399
2020-04-07 14:40:53 +00:00
Victor Feyens bbce92b436 [REF] base, various: remove unused views
PURPOSE

Remove dead views to clean dead records

SPECIFICATIONS

Find unused views and remove them, notably specific views that are not used
anymore because generic one is always taken. Notably

  * view_partner_short_form: a short form view on partner that is not used
    anywhere anymore. Indeed it has a priority of 2 whereas default form view
    has a priority of 1 (lower better). It is not referenced in actions
    anymore. It is therefore dead.

LINKS

Task ID 2196317 (Social/Marketing specific)
2020-03-20 15:01:39 +00:00
qsm-odoo d04ca05b2e [FIX] web, *: add lazy loaded libs in the test assets
*: partner_autocomplete

Those cannot be properly lazy loaded by test widgets, so they are loaded
directly through test assets. Testing lazy loading should be part of
a dedicated test system.

Part of https://github.com/odoo/odoo/pull/44596
2020-02-05 10:48:38 +00:00
Kevin Baptiste 6cbe824871 [REV] web: reverts update to fontawesome 5.11.2
This reverts commit ff1c35513a.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 10:33:36 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +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
TWA e609a6ad4c [IMP] partner_autocomplete: improved additional informations template 2018-09-27 10:45:30 +02:00
Rémi Rahir 7838bde2a8 [IMP] partner_autocomplete: diverse improvements
- CRON changed to 60min
- Fixed display/rendering issues with autocomplete widgets.
- Moved 'Insufficient credit' banner
- Editable endpoint for partner_autocomplete service
2018-09-25 22:28:43 +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