Commit Graph
253 Commits
Author SHA1 Message Date
Antoine (ande) 99b257e991 [FIX] base_import: one product imported twice
Steps to reproduce:
1. Install stock
2. Go to Inventory > Products
3. Cog wheel > Import records
4. Make a xlsx document where:
5. the first sheet has at least 2400 records (with header)
6. the second sheet only one record (with header)
7. Upload the document
8. Select the second sheet
9. Set batch limit at 2000
10. Click on import
11. 2 records successfully imported

Cause of the issue:
When initially uploaded, this.state.fileLength
is set to the length of the first sheet
And isn't refreshed when changing sheet

opw-3507544

closes odoo/odoo#139470

X-original-commit: 27f0a0253bc9b44854e5d6436d6e550429cdb93c
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
Signed-off-by: Antoine Demany (ande) <ande@odoo.com>
2023-10-24 07:14:46 +00:00
Gorash ba1a5509fa [IMP] base: Remove context dependencies from get_views method
In this viewtiverse, the heroes remove the context dependencies for
`get_views`, from the views and python fields (such as domain). To reduce
inconsistencies and the number of rpc.

Current issues:
* There may be inconsistencies in views at the JavaScript level. Some
overrides modify the behavior of get_views or domains on fields via
context keys, therefore by changing the action, the rendering may be
different. However, these views are cached. However, the cache key
(Javascript) does not reflect the entire context, and requires additional
post-processing from the server.
* Multiple rpc for the same rendering. get_views being dependent on the
context, as soon as it changes, a new rpc is performed. In most cases,
when JavaScript needs the same view, there is no change depending on the
context, the rpc is useless.
* Inconsistency when rendering subviews, some views could be different
depending on the context, this context can be modified in the view itself
via the context attributes. However, the JavaScript client does not redo
an rpc for each change of these sub-contexts. Therefore the result may be
inconsistent.

Solution:
Limit as much as possible the number of context keys provided when calling
get_views, and use the context provided as a cache key. The authorized
keys are 'lang' and '*_view_ref'. For the cache key, options are added in
the get_views method.
Instead of using the context, it is inserted into python expressions.
This will be evaluated by JavaScript and thus avoids inconsistencies.

task-3414108
task-3414068

closes odoo/odoo#135145

Related: odoo/enterprise#47584
Signed-off-by: Raphael Collet <rco@odoo.com>
2023-09-21 16:52:10 +00:00
Bastien Fafchamps (bafa) e1cf7e93c9 [FIX] base_import: unable to select name, external id or db id separatly
Before this commit, when selecting the field to import, the name, external
id and database id could not be selected separatly while they should.

This commit fixes that by comparing the full field path instead of the id
of the fields.

closes odoo/odoo#135482

X-original-commit: 587ee0797bd0075dc7d3a0393ec95360c8ab0770
Signed-off-by: Luca Vitali (luvi) <luvi@odoo.com>
2023-09-14 17:08:02 +00:00
Damien Bouvy 180de8afe6 [IMP] web, *: replace view all with search more
This partially reverts commit da50ce31ae825ef9f4b527553a2e2caec970d290.

Whilst the behavioral changes done in the task are correct, the wording
is not optimal and was better understood by users before this change.

Task-3483936

closes odoo/odoo#133511

Related: odoo/enterprise#46503
Signed-off-by: Florent Dardenne (dafl) <dafl@odoo.com>
2023-09-04 17:10:05 +00:00
Mahdi Cheikh Rouhou (macr) f1e563f6b2 [FIX] base_import : show meaningful error message on import fail
Issue :
When you try to import a big file it will display a blank error.

Steps to reproduce the error :
1-install inventory and e-commerce
2-go to products and import records
3-upload the file attached the ticket

Reason :
Before, there was a type included in the `reason` but now
it seems that the error has no type neither a message.

Fix:
I tried to just output a general error.

opw-3410954

closes odoo/odoo#133950

X-original-commit: 95cc5c84c3b4529cd269cf278fd4ab289f28685f
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Mahdi Cheikh Rouhou (macr) <macr@odoo.com>
2023-09-01 15:09:58 +00:00
Pierre Pulinckx (pipu) c07181b20b [REF] *: Replace env._t() by _t()
In this commit, all usages of env._t() are replaced by _t().
In templates files, env._t() didn't work because terms used
in attributes where not extracted into the translation files.
Only string are exported from .xml files to translation files.
So, to make it works, we set a variable that is then used
in attributes.
For example :

<t t-set="string_to_translate">String to translate</t>
<Dialog title="string_to_translate>...</Dialog>

task-3292454

closes odoo/odoo#131390

Related: odoo/enterprise#45631
Signed-off-by: Michaël Mattiello (mcm) <mcm@odoo.com>
2023-08-18 19:17:16 +02:00
Jorge Pinna Puissant e338487028 [REF] *: remove owl="1" from the templates
As all the templates are now imported in the owl app, there is not need
anymore to specify the owl="1" attribute in the templates.

Part of task~3443861

Part-of: odoo/odoo#130467
2023-08-11 14:32:30 +02:00
Louis Wicket (wil) f1722c7334 [IMP] *: unify sprintf and gettext
Improve gettext to directly handle value injection within translations,
removing the need for sprintf.

closes odoo/odoo#123932

Related: odoo/enterprise#45370
Signed-off-by: Samuel Degueldre (sad) <sad@odoo.com>
2023-08-10 18:14:04 +02:00
Michael (mcm) 9d6b380a24 [REF] *: adapt patches after new patch function
In the commit [1], the patch has been refactored to support the
native keyword `super`. The current commit just adapts the codebase
to that change.

task 3410198

[1]: 19ea1ac08043e22a811630968e44715cc3bfc495

Part-of: odoo/odoo#125716
2023-08-02 17:29:05 +02:00
Julien Carion (juca) 6abd149259 [IMP] web, *: replace search more with view all
This commit changes the behavior of the "Search More..." option in
Many2XAutocomplete and analytic distribution by making it available
as long as there's at least one record in the search results and by
renaming it to "View all".

task-3258625

closes odoo/odoo#126041

Related: odoo/enterprise#43660
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
2023-07-07 15:27:50 +02:00
25f43c2161 [FIX] web, *: cogMenu visual flaws
*: account, base_import, board, website

This PR enhances the "cog menu" by fixing several UX flaws.
Notable improvements include:
- Reordering entries in a more logical manner, enhancing user intuitiveness.
- Assigning icons to common actions for quick comprehension.
- Grouping both print actions and module-specific actions for better organization.

Enterprise:
- https://github.com/odoo/enterprise/pull/41851

task-3337951
task-3355224 (milk post-merge fixes)
part of task-3326263

closes odoo/odoo#124413

X-original-commit: 596772885a87016d29f002cd4e41b5a973965e40
Related: odoo/enterprise#42212
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Co-authored-by: Brieuc-brd <brd@odoo.com>
Co-authored-by: Pierre Paridans <app@odoo.com>
Co-authored-by: stefanorigano (SRI) <sri@odoo.com>
2023-06-09 17:01:06 +02:00
Chrysanthe (chgo) d5bf431aba [FIX] base_import: cp button spacing
=== ISSUE ===

If you go to PLM > click on a primary button > click on the cog >
import  records, the buttons have a `.m-1` which is added on top
of a `.gap-1`.This result in a double margin, which is not consistent
with other CP's behavior and affects the whole CP layout.

=== AFTER ===

We remove these unnecessary `.m-1`, making sure that no matter how many
buttons are shown they have a correct spacing.

task-3355375
part of task-3326263

closes odoo/odoo#124337

X-original-commit: 40666bfe89ff5bc9013fbb20928c18001b66c6ad
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
2023-06-09 10:54:53 +02:00
Pierre Paridans eef262abf4 [FIX] *: adapt QUnit tests and tours
[FIX] *: selectors in tours

[FIX][TMP] account: CogMenu selector in tours

[FIX][TMP] web*: Breadcrumb targetting in tours

Adds a `o_breadcrumb` class to target the whole breadcrumb, no matter
how much elements it contains (collapsed parts, visible path, single
name...).

add classname on last breadcrumb item

[FIX][TMP] project: View buttons selector in tours (moved away from CP)

[FIX][TMP] project: Kanban selectors in tours (quick create)

[FIX][TMP] *: SearchBar selectors in tours (toggle menu)

[FIX][TMP] *: ButtonBox selector in tours

[WIP][IMP] web: add toggleSearchBarMenu in search helpers

adapt and unskip 3 list tests

adapt and unskip calendar tests

unskip web_tour test that actually pass

post rebase fix

allow to lose cell focus after multi edition (given to searchbar) - bug reported, to check later

post rebase fixes

fix

Part-of: odoo/odoo#116641
2023-05-12 22:59:22 +02:00
Brieuc-brd 418413e499 [IMP] web, *: directional icons
This commit adapts the directional icons to improve the usability and
maintain consistency with the ui icons library.

task-2818586

Part-of: odoo/odoo#116641
2023-05-12 22:59:22 +02:00
Pierre Paridans ffc359dc5c [IMP] web,*: CP's CogMenu rework to add misc items from favorite
Part-of: odoo/odoo#116641
2023-05-12 22:59:17 +02:00
Romeo Fragomeli c8ca9da7bc [IMP] web: move views' buttons into the view itself
Were previously in the ControlPanel.

Part-of: odoo/odoo#116641
2023-05-12 22:59:17 +02:00
Pierre Paridans caef16ee4e [REF] web,*: ControlPanel layout
This commit brings the ControlPanel into a single line with 3 main
sections:
- buttons & breadcrumb
- layout related actions (ie. the SearchBar in multirecord view or
  ButtonBox in formView)
- navigation (pager, switch view...)

Add new search bar menu, this is a merge of the following components
into one big component display in column:
* comparison_menu
* favorite_menu
* filter_menu
* group_by_menu

Also adapt navigation hook.

Part-of: odoo/odoo#116641
2023-05-12 22:59:16 +02:00
luvi 01715de04a [IMP] base_import: improve date(time) formatting options
This commit improves the suggestions displayed to the user when editing
the date or datetime options in the sidebar of the Import action.
A tooltip is also displayed next to each label, to let the user know how
to format properly the date if he wants to write a custom one to match
his own needs.

Since commit [1], a legacy utils was imported to convert a moment format
to strftime. Since this file was legacy, it was needed to remove its import
from the import action and replace it with a newer utility function. Because
this function was not imported elsewhere, it could be removed completely.

In dates.js, a new function allow a user to write a date format in a
human readable format, while converting it to a valid Python strftime
format, to send back to the server the right date.

A test has been added for this improvement.

[1]: 2361f021c3

task-3248787

closes odoo/odoo#117750

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-05-10 13:21:44 +02:00
Achraf (abz) b303b20e7d [FIX] base_import: prevent traceback of Unsupported file format text/csv
When we try to import bank statement CSV file with all required columns and
set the encoding format as koir8_r we get (ValueError: Unsupported file format
text/csv, import only supports CSV, ODS, XLS and XLSX) this error.

steps to reproduce:
    1. Go to accounting and then import bank statement.
    2. Select a csv file to import with all required columns.
    3. Set Encoding format as koir8_r and then click on 'TEST' or 'IMPORT'.
    4. The error will occur.

see this traceback: https://tinyurl.com/24bxk7bt

Applying this commit will fix this issue.

sentry-4049996747

closes odoo/odoo#120054

X-original-commit: 7270bbf589a9d3d794e399b3cf3ad18acf7a2ed6
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-04-28 13:33:22 +02:00
luvi 22cc9660ed [FIX] web: fix SelectMenu object shallowEqual
With commit (1), the clear button is only displayed when a selected
value is found from the available choices. But since we used
shallowEqual to find the corresponding choice, we couldn't use objects
containing objects in its values, since a simple comparison was made
in the utility function. This was a wrong usage of the SelectMenu and
we don't want to support objects and arrays as values. The value
attribute should only be a string, and it's the parent responsability
to handle any object related to this string.

The test using an object and an array as values has been removed since
it had no purpose after the removal of this partial and wrong support.

With this fix, an assertion for the presence of the clear button has
been added instead for the import action.

(1): d760b81271

closes odoo/odoo#119298

Related: odoo/enterprise#40177
Signed-off-by: Géry Debongnie <ged@odoo.com>
2023-04-25 09:38:00 +02:00
Arnaud Baes cec7436b8e [FIX] base_import: Don't convert properly formatted date format
When importing documents that have a `date` or a  `datetime` field
a conversion is done on the format string in case it was still in the
old moment format (e.g. YYYYMMDD).

The problem is that this conversion was done regardless if the format
string was valid or not. This was producing botched format strings that
would prevent any import having a date or datetime field with proper
format string.

closes odoo/odoo#119340

X-original-commit: 20f4102e9aef42c557c6f7e0b5b5e591a18b1b4f
Signed-off-by: Luca Vitali <luvi@odoo.com>
2023-04-22 05:52:09 +02:00
Guillaume (guva) 2361f021c3 [FIX] base_import: date/datetime format on import
Add support for converting moment.js date formats
to strftime format in BaseImportModel

Steps:

- Try to import csv with date_format "YYYYMMDD"
- ImportValidationError:
-> "Column date_format contains incorrect values"

error is raised because the date format is not
converted before being send to the python import
method.

opw-3247615

closes odoo/odoo#118308

X-original-commit: ee940fc6911656263fb56f9ce63a564f45cdc16b
Signed-off-by: Luca Vitali <luvi@odoo.com>
Signed-off-by: Guillaume Vanleynseele (guva) <guva@odoo.com>
2023-04-13 04:08:50 +02:00
Abdelouahab (abla) c8cbde1ff2 [FIX] base_import: import subfields
To reproduce
============
- on any app try to import a record that has subfields
- subfields are not matched and not even found on the list

Problem
=======
comparing to 16 **Allowing subfields matching** is disabled here in 16.1,
because of this condition that is checking the list of fields on a variable `fields`,
but this variable is not set before importing the file, so the condition is always true.

Solution
========
apply the condition on `res.fields` instead

opw-3209365

closes odoo/odoo#115639

X-original-commit: 284fab64e33ca398a0ebf69d3d6d59685480156d
Signed-off-by: Luca Vitali <luvi@odoo.com>
2023-03-17 11:47:29 +01:00
Bastien Fafchamps (bafa) a16361f96d [FIX] base_import: Fix relationnal fields not being correctly mapped
This commit fixes a couple of issues linked to relational fields:

- When previewing a file with relational fields/ids, they were not
correctly mapped to their respective fields in the selects, the fields
were also not correctly mapped in the arguments given for the import.
- The select label was also only showing the name of the last sub-field
while it should show the full path ("External ID" vs "Company / External
 ID").
- Some errors were not correctly displayed: wrong field name, not in a
column when it should be.

Task ID: 3210337
opw-3203704 + opw-3192403

closes odoo/odoo#114490

X-original-commit: 871690afdc2ce4da2770a144cc4fc5ed038e6f73
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2023-03-07 09:03:06 +01:00
Bastien Fafchamps (bafa) ae619e6a41 [FIX] base_import: Fix filtered fields shown in select menu
During the conversion to Owl of the base_import action, the fields
mapping for each column was made incorrect.

The fields are now properly sorted between the suggested, additional and
relational categories and the subfields are also correctly handled (no
more duplicates and correct labels).

closes odoo/odoo#109416

Signed-off-by: Luca Vitali <luvi@odoo.com>
2023-01-09 20:08:48 +01:00
luvi 850c821f7e [FIX] base_import: set the correct default separator
In the default import options, some separators had a wrong value by
default. This commit fixes those, which will fix some failing imports.

A test has been added to verify the default options set.

closes odoo/odoo#108710

Signed-off-by: Bouvy Damien (dbo) <dbo@odoo.com>
2022-12-27 15:49:26 +01:00
luvi afd5408bf5 [REM] base_import, debian: remove state-machine library
This commit removes the state-machine.js library. It can be remove as
this library was mainly used to handle the import action process, and
that it has been rewritten without the need of the library.

Copyright mentions to the library have also been removed, since it is no
longer necessary.

closes odoo/odoo#106265

Related: odoo/enterprise#34249
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-12-23 17:03:37 +01:00
luviandBastien Fafchamps 0566b5f6ba [REF] base_import, web: convert import action to Owl
This commit reimplements the import action view to fully use Owl instead
of its legacy implementation. Different components have been created to
separate the UI in smaller blocks, and a model file contains the main
aspects of the import logic.

The SelectMenu component is now used instead of the jquery select2, and some
other web components and hooks have been used or modified to bring this
action to a better state. A custom ImportBlockUI component is used, to
support custom messages and the use of components. It was required to
reimplement the loading progress and indicator used by the view.

The set_file route in the base_import controller has been adapted to remove
the usage of jsonp type of code for this situation since it is no longer
needed nowadays.

On top of the rewrite, js tests have been added to make sure the feature
behaves correctly, and to assert the intended specs.

Finally, legacy files have been removed, since they are no longer required.

Enterprise PR: https://github.com/odoo/enterprise/pull/34249

task-3092474

Part-of: odoo/odoo#106265
Co-authored-by: Bastien Fafchamps <bafa@odoo.com>
2022-12-23 17:03:37 +01:00
Aaron Bohy 37f9c31231 [FIX] base_import,web: do not allow import if create="0"
This commit is three-fold:
 1) we now honnor attributes `create` and `import` which can be
    set to a falsy value in archs (and in these cases, we disable
    the import feature)
 2) we converted the base_import test suite to use the owl views
 3) we whitelisted the base_import addon for the lint/prettier
    script

closes odoo/odoo#100026

Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-09-14 01:52:47 +02:00
aliya 514ff773a2 [IMP] account, base_import: improve accounting import
- Remove FEC from res.config.settings - everything is now linked in the import guide (in enterprise)
- Compute debit and credit from opening_balance
- Update import templates for account.account, account.move, res.partner
- Small UI changes in base_import: add an action title and improve the template button design

task-2888243

closes odoo/odoo#96291

Related: odoo/enterprise#29627
Related: odoo/upgrade#3794
Signed-off-by: Cedric Snauwaert <csn@odoo.com>
2022-08-26 17:16:52 +02:00
Romeo Fragomeli 1fcd098af5 [REF] *: BS5: migration
Automated change made by a lot of RegEx to change all think that is
possible to automate.

https://getbootstrap.com/docs/5.1/migration

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
Romeo Fragomeli 9b5c9484fe [REF] *: BS5: adapt changes in media query mixin
> Media query mixins parameters have changed for a more logical approach

> media-breakpoint-down() uses the breakpoint itself instead of the next
> breakpoint (e.g., media-breakpoint-down(lg) instead of
> media-breakpoint-down(md) targets viewports smaller than lg).
> Similarly, the second parameter in media-breakpoint-between() also
> uses the breakpoint itself instead of the next breakpoint (e.g.,
> media-between(sm, lg) instead of media-breakpoint-between(sm, md)
> targets viewports between sm and lg).

https://getbootstrap.com/docs/5.1/migration/#sass

Task ID: 2766483

Part-of: odoo/odoo#95450
2022-07-07 13:30:24 +02:00
Lucas Perais (lpe) 2cafc7be88 [REF] web, base, website_sale_loyalty: remove unnecessary flags on action
action act_window can have a "flags" field which contains tweaking parameter for the views.
A little inventory:
- ation_buttons: if true displays on List and Kanban the buttons that trigger action
  in the control-panel bottom left area. It is true by default in JS.
- withControlPanel: whether to display the ControlPanel as a whole. True by default.
- search_view: not used or dealt with.
- mode ("readonly"|"edit") whether to initiate a form view in that mode.
  (used and practical -- but will be outdated when the edit mode by default is implemented)

This commit removes the occurences of those flags keys that are useless

closes odoo/odoo#94078

Related: odoo/enterprise#28620
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2022-06-22 14:28:43 +02:00
Géry Debongnie 87ed548bc9 [FIX] base_import: properly display controlpanel buttons
Problem: open any (multi record) view, open the "favorites" menu and
select the import action. The import client action now opens, but no
button is visible in the control panel.

Since a recent owl update, the import client action did not display its
control panel buttons (upload file, cancel, ...). This is caused by an
unfortunate situation: the control panel buttons are rendered, but after
the control panel was rendered, so owl does not add them in the DOM.  It
worked by chance before: the props were completely reactive, and the
code actually modifies in place some object received in props. So, a
render was forced on the controlpanel, which means that it properly
picked up the buttons.

Now, this render was accidental, so the new owl code is actually
correct. This commit fixes the issue by simply rendering the buttons
before the controlpanel is even rendered, so it now works as expected.

closes odoo/odoo#92810

X-original-commit: f185f543452abf65b9948e907aeb45e918cf3bed
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-06-02 21:45:27 +02:00
Jorge Pinna Puissant bc20eb4790 [IMP] test_lint, *: enable no-unused-vars rule
Part-of: odoo/odoo#85569
2022-03-02 13:05:42 +00:00
Michael (mcm) b81861233d [REF] *: use LegacyComponent
This commit replaces Component by LegacyComponent when the component
uses removed features from owl 1 like getting its `el` or `trigger` an event.
It also adds `useService("rpc")` when component needs it.

closes odoo/odoo#85389

Related: odoo/enterprise#24745
Signed-off-by: Géry Debongnie <ged@odoo.com>
2022-03-01 09:57:39 +00:00
Antoine Vandevenne (anv) adf70bf9dc [FIX] *: retarget documentation links to master
closes odoo/odoo#84990

X-original-commit: 39bdf46
Related: odoo/enterprise#24582
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2022-02-21 17:01:02 +00:00
+2 318cdcc0b8 [REF] *: adapt code to owl 2
Owl 2 changelog: https://github.com/odoo/owl/blob/a9f29c4caad4f32d06be1ec4780572825781cd9b/CHANGELOG.md

Part-of: odoo/odoo#80156
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: Francois (fge) <fge@odoo.com>
Co-authored-by: Michael Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: luvi <luvi@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
2022-02-10 07:46:13 +00:00
Hubert Van de Walle (huvw) d72754bbae [FIX] base_import: allow importing a new file after one has been imported
Steps to follow:

  - Go to the Accounting Dashboard
  - Click on Bank > Import statements
  - Follow the flow to import a file
  - Once redirected to the reconciliation, go back to the import from
    the breadcrumbs
  - Load a new file

Cause of the issue

  The state machine used to handle events didn't allow going from
  imported to filed_loaded

opw-2706505

closes odoo/odoo#83219

X-original-commit: a19a0bdca369c9038a7a34363a1d9b7ee06f899d
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Signed-off-by: Hubert Van De Walle <huvw@odoo.com>
2022-01-22 14:13:41 +00:00
Martin Trigaux a8e50921af [FIX] *: correct typos and English errors
closes odoo/odoo#80181

X-original-commit: efd178daee689192d4e930a075475587038b3e0d
Related: odoo/enterprise#22439
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-11-22 14:48:04 +00:00
Victor Feyens ab022ec12d [FIX] *: target v15.0 documentation with doc links
X-original-commit: acc95ec204baa1dddbe292c379a1768fe1deccbf
Part-of: odoo/odoo#77923
2021-10-07 17:59:52 +00:00
Julien Mougenot 53f9b5f235 [REF] *: adapt modules to action and view contexts
This commit handles the adaptation of any component using the search
model's 'action' and/or 'view' key, now replaced by the environment
keys 'actionContext' and 'viewContext'.

Affected modules are:
- base_import
- board
- crm
- google_spreadsheet
- project

X-original-commit: 40f1ae87e1436192a70a8a7432eb72d379cfa6dc
Part-of: odoo/odoo#77463
2021-09-30 10:38:30 +00:00
36988d0edc [IMP] *: use new dropdown in legacy too
This commit replaces the control panel dropdowns with the new <Dropdown/> component, in order to get consistent through the new/legacy views (because the current Odoo version is in a state where some views uses the new infrastructure and some others are still not converted - see odoo/odoo#73311).

The diff seems massive, but it is mostly due to tests adaptations.

closes odoo/odoo#77001

X-original-commit: d679cd0d8ba9a2420e81a42a698763e9be2327e1
Related: odoo/enterprise#21077
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2021-09-23 07:17:43 +00:00
aeb8e49972 [IMP] web,*: view infrastructure
We refactor the action service and allow the legacy and new views to share
a global state within a same action.

We introduce two new components View and WithSearch along with
the search infrastructure: ControlPanel, FilterMenu,...

Part-of: odoo/odoo#73311
Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Michaël Mattiello <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
Co-authored-by: Stefano Rigano <sri@odoo.com>
2021-09-07 10:04:35 +00:00
Julien Mougenot add86e4abd [REF] base_import: Move legacy files
This commit moves the content of the static base_import files to a
dedicated `legacy` folder to mark the transition with the new Owl
environment.

Part-of: odoo/odoo#73311
2021-09-07 10:04:35 +00:00
Nikunj LadavaandMohammed Shekha 662ecf4e20 [IMP] base_import: improve import wizard preview
PURPOSE

Improve import wizard as followup of recent improvements.

SPECIFICATIONS

Preview lines

  - make the preview lines more visible
    - set font-weight: 500 on o_import_header_name
    - remove the text-muted class from the data preview line

  - allow the user to preview the first 5 non-empty values
    - when hovering on the data preview span, display a tooltip with the first
    5 non-empty values of the file column (with 'Preview' as the tooltip title)

  - In the 'when a value cannot be matched' dropdown:
    add a new 'skip record' option for the following field types: boolean,
    many2one, many2many, selection
    add a new 'set empty' for the following field types: many2one, many2many,
    selection hide this option if the field is required

When a value cannot be matched:
  the 'skip record' option will make sure that lines with an unmatched value
  will not be imported (i.e. skipped at import)
  the 'set empty' option will set the field value to False when the value
  cannot be matched

  - Restore colored background on alert boxes by removing some css rules

Task-2504343

closes odoo/odoo#73713

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2021-09-02 12:57:13 +00:00
David BeguinandAurélien Warnon 409ccc833d [IMP] base_import: add import progress bar for batch mode
This commit adds a progress bar that is displayed during the import (or import
test). It is only displayed when importing in batch mode.

The user can decide to stop the import. If it's the case, the current
batch is finalized and the import is interrupted afterwards.

The user can easily resume the import later starting from the line where the
batch was interrupted
e.g: interrupted after 300 / 500 lines, when you resume, it will start from
line 301.
(The above behavior is not applied in test mode, we never alter the starting
line when testing).

Side note: This commit also removes the alert-info box from batch import
disclaimer, for design beauty purpose.

Task-2567591

closes odoo/odoo#73243

Related: odoo/enterprise#19467
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Aurélien Warnon <awa@odoo.com>
2021-08-23 09:02:08 +00:00
+1 14bffd983e [REF] *: adapt code to new owl webclient
This commit adapts the community codebase to the rewriting of the
/web application in owl.

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Bruno Boi <boi@odoo.com>
Co-authored-by: Géry Debongnie <ged@odoo.com>
Co-authored-by: Samuel Degueldre <sad@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
Co-authored-by: Simon Genin (ges) <ges@odoo.com>
Co-authored-by: Francois (fge) <fge@odoo.com>
Co-authored-by: Michael Mattiello (mcm) <mcm@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais (lpe) <lpe@odoo.com>
Co-authored-by: Jorge Pinna Puissant <jpp@odoo.com>
2021-06-18 21:31:27 +02:00
Sébastien Theys c6716847aa [IMP] web, *: clean up notification API
task-2476867

closes odoo/odoo#67009

Related: odoo/enterprise#16760
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
2021-05-27 13:47:23 +00:00
Victor Feyens 0348b95aee [FIX] *: update documentation links
Following the recent reorganisation of the documentation in 12.0+,
the majority of the documents have been moved and their old links are no longer valid.
Some redirection rules will soon be deployed, but those rules might be dropped in some years
and we want the links to still work, which is why we still replace the links to the new ones.

FW-Port of odoo/odoo#70675 (13.0)

closes odoo/odoo#70920

X-original-commit: bc9c1eef538ba6095e74c19d5d9ed9e01625ec7c
Related: odoo/enterprise#18361
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2021-05-17 19:26:27 +00:00