Commit Graph
53 Commits
Author SHA1 Message Date
qsm-odoo b94395b501 [IMP] web, *: share and improve notification system
* barcodes, calendar, partner_autocomplete, web_settings_dashboard

Make the notification system better, using bootstrap toast component,
and make it available in the frontend.

The toast component allowed to remove some JS code and made the
component customizable by themes but it had to be reviewed/fixed to make
it functional (maybe bootstrap will review its work in next versions).

This work should still be improved because there are still too many
ways (deprecated and not deprecated) to instantiate toasts in the
backend. The goal here was however to make the toasts more modern and
make them available in the frontend.

This work is needed for some tasks. @kig-odoo and @fja-odoo made a
pre-work to instantiate toasts in the frontend for their respective
tasks. This commit unifies the system.

Part of https://github.com/odoo/odoo/pull/32793
task-1970731

closes odoo/odoo#32793

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-04-24 13:21:41 +00:00
Juhil SomaiyaandMohammed Shekha 5dc971b1ae [IMP] web, *: add a description to generic widgets
A `description` key has been added on AbstractField and all generic
field widgets ; it is used to display a more user friendly name (both in
the webclient and in Studio).

Non-generic field widgets have an empty string as description.

Related task 1918327

closes odoo/odoo#30131

Signed-off-by: Martin Geubelle (mge) <mge@openerp.com>


Co-authored-by: Mohammed Shekha <msh@openerp.com>
2019-04-24 09:57:56 +00:00
Christophe Simonis 5df4746c9a [MERGE] forward port branch saas-12.2 up to 230ad8c381
closes odoo/odoo#32088

Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-03-25 11:13:41 +00:00
Martin Trigaux 04370bff18 [I18N] export saas-12.2 source terms
closes odoo/odoo#31985

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-03-20 14:59:50 +00:00
Aaron Bohy 0bc24a78a2 [FIX] web,*: adapt autocomplete dropdowns after jquery update
*partner_autocomplete,test_main_flows

In jQuery 3, the active element in autocomplete dropdowns is no
longer identified with class 'ui-state-focus' on the <li/>, but
with class 'ui-state-active' is on its child <a/>. Moreover, the
background color of the active element is now set on the <a/>
instead of the <li/>.

This rev. adapts scss rules accordingly, and selectors in the
main_flow_tour.

Issue reported on the jquery update pad.

closes odoo/odoo#31693

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-03-08 07:25:39 +00:00
5547aa2487 [REF] partner_autocomplete: adapt code after jQuery update
Part of task 1896658

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Christophe Matthieu <chm@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: David Monjoie <dmo@odoo.com>
Co-authored-by: Martin Geubelle <mge@odoo.com>
Co-authored-by: svs-odoo <svs@odoo.com>
Co-authored-by: Vincent Schippefilt <vsc@odoo.com>
2019-03-06 20:07:17 +01:00
Christophe Simonis cf52a04979 [MERGE] forward port branch saas-12.1 up to d3b8422c9c
closes odoo/odoo#30614
2019-01-28 13:58:11 +00:00
Christophe Simonis 3cbc9dd6c0 [MERGE] forward port branch 12.0 up to 6a0675d36d 2019-01-14 10:34:50 +01:00
Pierre Rousseau 700191514e [FIX] partner_autocomplete: ignored field is sent to view
The field ignored is set in javascript on company object to filter the
ones we want to show. As it is not an odoo field, it triggers a
traceback when the trigger_up 'field_changed' is called.

OPW-1921568

closes odoo/odoo#30153
2019-01-11 15:04:34 +00:00
Christophe Simonis 8aa8548d8a [MERGE] forward port branch 12.0 up to 3e4138deaa
closes odoo/odoo#30045
2019-01-09 15:56:53 +00:00
Odoo Translation Bot 652cecffde [I18N] Update translation terms from Transifex 2019-01-06 01:32:05 +01:00
Pierre Masereel 52dd18b8ad [FIX] partner_autocomplete: ignored field is sent to view
The field ignored is set in javascript on company object to filter the
ones we want to show. As it is not an odoo field, it triggers a
traceback when the trigger_up 'field_changed' is called.

OPW-1921568

closes odoo/odoo#29864
2019-01-03 07:19:35 +00:00
Odoo Translation Bot 91382f691d [I18N] Update translation terms from Transifex 2018-12-30 01:30:16 +01:00
Antoine Prieels (ANP) 186e70ad6c [FIX] partner_autocomplete: Remove companies from suggestions
We wanted to make it possible to manually mark records from the partner_autocomplete service as 'ignored' so that they wouldn't appear in suggestions.
Previously, this was done by removing, in the service, records that were marked as 'ignored' from returned suggestions.
The problem is that, since the record was not present in odooSuggestions, the data from this company was retrieved from clearbitSuggestions and the company was still present in the dropdown.
We fix this problem by also returning ignored companies from the service, marked as 'ignored', so that they can be filtered out after getting additional suggestions from clearbit.

closes odoo/odoo#29785
2018-12-28 08:49:17 +00:00
Christophe Simonis f351dd8cab [MERGE] forward port branch 12.0 up to 047e2b28de 2018-12-12 11:38:25 +01:00
Odoo Translation Bot 47aae6faba [I18N] Update translation terms from Transifex 2018-12-23 01:29:13 +01:00
Odoo Translation Bot ec4ee14c89 [I18N] Update translation terms from Transifex 2018-12-09 01:16:26 +01:00
len-odoo 8f3ac2530f [FIX] base, partner_autocomplete: remove vat from the partner selection field
Commit a6e1eb9f0a
introduced the show_vat context key, that displays the Tax ID of a customer
after its name when present, similarly to show_address.

However it appears on the field when being edited, then disappears at save,
which is confusing.
Other unclean things tended to happen: you would have "name - taxid" on customer
field, but "name" on invoice address and delivery address.
Furthermore a client could edit the name manually to erase the Tax ID, and thus
recreate a new record for the same customer.

We introduce a method to clean the name from the Tax ID, and use it so that it
is directly the client's name that is selected at edit.

Note that we also replace the standard dash in the 'name - taxid'
by a figuredash (‒, U+2012) so as to avoid potential egregious splits
because of legitimate customer names.

Similar to commit: 3cbfc40303
(same thing for show_address)

opw 1911954

closes odoo/odoo#29189
2018-12-03 09:23:33 +00:00
Odoo Translation Bot 1208ac6ce3 [I18N] Update translation terms from Transifex 2018-12-02 01:25:05 +01:00
Antoine Prieels (ANP) 8b930c648d [IMP] partner_autocomplete: Notify when user out of credits
closes odoo/odoo#29309
2018-11-28 10:32:20 +00:00
Christophe Simonis e1f9499d26 [MERGE] forward port branch 12.0 up to 053bb45706 2018-12-05 18:46:15 +01:00
Christophe Simonis d7c5bc02cc [MERGE] forward port branch saas-12.1 up to 8aa8548d8a 2019-01-09 19:59:27 +01: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
Christophe Simonis ce4cc24621 [MERGE] forward port branch 12.0 up to 82a1e1dcc3 2018-11-29 20:06:16 +01:00
Christophe Simonis 7a0243ec15 [MERGE] forward port branch 12.0 up to b3052b690f 2018-11-23 12:11:32 +01:00
Odoo Translation Bot b60f9bb739 [I18N] Update translation terms from Transifex 2018-11-18 01:28:38 +01:00
Géry Debongnie abf32b8b21 [REF] *: update js test suite to use helpers
This rev. introduces robust helpers to use in the JS tests suite to
interact with DOM and components, and starts using them (almost)
everywhere.

All the helpers are exposed though testUtils.js.

There are 2 kinds of helpers:

1. Assertions
-------------
 * assert.containsNone, containsN, containsOnce check that the DOM
   (or a specific part of the DOM) contains a `selector`. It
   generates a correct error message automatically.
    ex: assert.strictEqual(form.$('.o_form_editable'), 1, "msg");
        -> assert.containsOnce(form, '.o_form_editable');
 * assert.isVisible, isNotVisible check that the DOM has an element
   visible or not. They also check that the element is actually in
   the DOM (before most tests didn't verify this).
 * assert.hasClass, doesNotHaveClass, hasAttrVAlue, check specific
   properties of a DOM element, and also validate that it is
   applied on a single existing DOM element (before most tests
   didn't verify this).
    ex: assert.notOk(form.$('button').hasClass('btn-primary'));
       -> assert.doesNotHaveClass(form.$('button'), 'btn-primary');

2. Utilities
------------
The goal of the utilities is to centralize the definition of many
standard components and interactions, ensuring that when we
refactor the JS framework, we do not need to change all the tests.

Existing mock utilities (addMockEnvironment, intercept, path,
patchDate, unpatch and fieldsViewGet) are moved to
'testUtils.mock.*'.
Existing DOM utilities are moved to 'testUtils.dom.*'.
New dom utilities are created for opendDatePicker, click,
clickFirst and clickLast. Helper `click` verifies that there is
exactly 1 element visible in the DOM you click on, `clickFirst`
and `clickLast` verify that there are more than one element on the
DOM.
 ex: form.$('button').click();
     -> testUtils.dom.click(form.$('button'));

New Form utilities: (testUtils.form.*)
 clickEdit, clickSave, clickCreate, clickDiscard, all clicks on
 the control panel buttons of the form.
 `reload` reloads the form data.

New modal, graph, kanban and pivot utils (testUtils.pivot.*,
testUtils.kanban.*, etc.).

New fields utils: (testUtils.fields.*)
 * editInput, editSelect: allow to change the value of a field,
   using a selector to identify it. They validate that the input
   exists and trigger the change event automatically.
 * editAndTrigger: allow to modify a field and trigger specific
   events after the value change
 * many2one (testUtils.fields.many2one.*)
   clickOpenDropdown, clickHighlightedItem, clickItem,
   searchAndClickItem: use a field name instead of a selector and
   do all the complex mechanism to open, filter and highlight
   many2one fields.

Joint work with aab, dam, ged, mge, svs and vsc.
2018-11-19 11:24:28 +00:00
Odoo Translation Bot dcc077afc5 [I18N] Update translation terms from Transifex 2018-11-11 01:26:46 +01:00
Antoine Prieels (ANP) 96a795f177 [FIX] partner_autocomplete : Do not crash other tests when partner_autocomplete server fails
Add a check to see if we're in test mode that returns an InsufficientCreditError to avoid failing other tests if partner_autocomplete server fails

closes odoo/odoo#28324
2018-10-31 16:11:31 +00:00
Moises Lopez 8f36b246d0 [I18N] clean es_MX old translations
Only keep the useful ones

closes odoo/odoo#28351
2018-11-02 09:38:23 +00: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
Pierre Paridans 60d3fc736c [FIX] partner_autocomplete: autocomplete not defined in mobile
Bugfix to prevent traceback in mobile apps due to override
of Many2one widget with native implementation.
Happens in every form view containing a partner field.

Implemented as defensive programming.
The goal of the included test is to prevent a silent error for the
webclient. It doesn't test the actual behavior in mobile (where there is
no DOM for Many2one).

Task #1896641

closes odoo/odoo#27967
2018-10-23 16:58:58 +00: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 07f6b8ef57 [I18N] Update translation terms from Transifex 2018-11-25 01:26:32 +01:00
Martin Trigaux 57884ccdc8 [I18N] all: convert remaining model: translation entries
It should be model_terms:

Fixes odoo/docker#219

closes odoo/odoo#27664
2018-10-11 09:49:01 +00:00
Odoo Translation Bot b6c8919444 [I18N] Update translation terms from Transifex 2018-10-07 02:27:57 +02:00
Martin Trigaux d77000aef3 [I18N] export saas-11.5 source terms
Reflect module moved to enterprise and remove fields after c9837ac5d
2018-10-02 13:15:40 +02: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
Odoo Translation Bot a01c1bf5bf [I18N] Update translation terms from Transifex 2018-09-30 02:25:45 +02:00
TWA 73f0cc21ce [FIX] partner_autocomplete: Enrich data even if get logo returns error 2018-09-29 11:30:21 +02:00
TWA c257b8f0a9 [FIX] partner_autocomplete: prevent possible concurrent flag update 2018-09-27 10:45:30 +02: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
Odoo Translation Bot 5a439a85ef [I18N] Update translation terms from Transifex 2018-09-25 15:32:59 +02:00
Odoo Translation Bot 1d79bf0273 [I18N] Update translation terms from Transifex 2018-09-23 02:29:29 +02:00
Martin Trigaux ae1fed50d5 [I18N] export saas-11.5 source terms 2018-09-21 16:32:59 +02:00
Yannick Tivisse c67ac34ee4 [IMP] base: Add missing _description on models 2018-09-21 16:13:59 +02:00