Commit Graph
114991 Commits
Author SHA1 Message Date
Christophe Monniez 48b967fde0 [FIX] web,website,tests: fix typo in test tags
This typo prevented two tests to run.
2018-01-19 09:06:09 +01:00
Alexandre Kühn a87d761fdb [IMP] core: menu tip ux/ui improvement
We would like to make the "no item found" screens more appealing.

Before this commit, it shows a small help tip in the top-left
corner of the screen, just below the "Create" button.

With this commit, these help tips have been replaced by onboarding
screens, which consist of a picture and some text below, both of which
are horizontally centered.

The texts have been slightly changed, so that they are shorter and clearer.

Considered modules:

(A)
    account,
    account_asset,
    account_budget,
    account_test,
    account_voucher,
    analytic
(B)
    barcodes,
    base,
    base_automation,
    board
(C)
    calendar,
    contacts,
    crm
(D)
    delivery
(E)
    event
(F)
    fleet
(G)
    gamification,
    google_drive
(H)
    hr,
    hr_attendance,
    hr_contract,
    hr_expense,
    hr_gamification,
    hr_holidays,
    hr_payroll,
    hr_recruitment,
    hr_timesheet
(I)
    im_livechat
(L)
    l10n_fr_sale_closing,
    link_tracker,
    lunch
(M)
    mail,
    maintenance,
    mass_mailing,
    membership,
    mrp
(N)
    note
(P)
    payment,
    point_of_sale,
    post_mercury,
    pos_restaurant,
    product,
    project,
    purchase,
    purchase_requisition
(R)
    rating,
    repair,
    resource
(S)
    sale,
    sale_timesheet,
    sales_team,
    stock,
    stock_account,
    stock_landed_costs,
    stock_picking_batch,
    survey
(U)
    utm
(W)
    web,
    website,
    website_blog,
    website_customer,
    website_event_track,
    website_forum,
    website_quote,
    website_sale,
    website_sale_digital,
    website_slides
2018-01-18 21:43:29 +01:00
stefanorigano 1f1c5f62c7 [ADD] web: empty_states, add pictures
Add 3 pictures to illustrate empty states across several modules.
Width 120px,  variable height.
2018-01-18 19:17:17 +01:00
Christophe Monniez ad7bf6b9c9 [REM] config, loading: remove test-commit and test-report-directory
As there are few use cases for the --test-commit and --test-report-directory
options, they are removed.
2018-01-18 13:27:33 +01:00
Christophe Monniez b356b19033 [IMP] tests: Add the possibility to tag tests
Purpose: When running tests, all the tests for the installed/updated
files are done. This commit adds a 'tagged' decorator that can be used to
tag tests. Combined with a new 'test-tags' CLI option, it adds the ability
to filter which tests are executed. For example, @tagged('slow') will
add a tag 'slow' to the test. The CLI option 'test-tags="slow"' will
only run tests tagged 'slow'.

One can use prefixes to select cases with tags.
'+' or no prefix means that the tests tagged with this tag are selected
for execution. '-' prefix will exclude the tests tagged with this tag.
Exclusion takes precedence over inclusion.

Also, by default, all Odoo tests cases are tagged 'standard' and with
the technical name of the module.
This means that when selecting tests with the 'test-tags'
parameter, if '-standard' is not specified, all tests tags are
going to be executed.
When tagging tests, one can remove such automatic tag by prefixing the
tag name with '-'. E.g. @tagged('-standard') will remove the standard
tag from the test.

Another example, if one wants to test the 'sale' module alone,
even without adding any 'tagged' decorator thos tests can be selected
like that: --test-tags="sale"

Tests are selected or deselected using a TagsSelector. When instanciated,
 a string is passed with comma separated tests selectors like
'+slow,-standard'. When the 'check' method is called  with a test as argument,
it returns True or False if the test has to be executed or not.
2018-01-18 13:20:37 +01:00
jem-odoo 079e1a0c31 [IMP] project_timesheet_holidays: better log message when test fails
For some unknown reason (for now), this module tests fails when comparing
generated timesheet number and leaves duration (in days).
By improving the log message, we can have more informations to understand
why the failure happens 'randomly'.
2018-01-17 14:13:23 +01:00
Alexandre Kühn e3333d5e07 [IMP] mail: chatter creation message in formview
Before this commit, when we create a new object (e.g. task, product, ...),
the part of the form for the chatter was blank.

After this commit, it displays the chatter with a single temporary message
'Creating a new record...'

This message is only visible by the user that is creating the task, and goes away
when saving the newly created task. Any interaction with the chatter (buttons and
widgets at the top of the chatter, including the message itself) are disabled, so
that no interaction from the user is possible.
2018-01-17 11:46:20 +01:00
Thibault Delavallée 175671c59c [FIX] website: correctly propapate field renaming
At commit faf6165e03 some configuration fields have been
renamed as config field naming has been hardened. However renaming
has not been properly propagated through the code. This commit
fixes that.
2018-01-17 10:14:39 +01:00
jem-odoo 0f2470f817 [IMP] project: subtask level constraint
Add contraint to limit the level of subtask to
only one. A task can either be 'mother' or 'child'
but not both ! For now, the UI only prevent this,
but xml rpc script can do whatever it wants.
Also move the recursive check from hr_timesheet
to project, since subtask mecanism is now native
from project module.
2018-01-17 09:34:24 +01:00
Akash Bhavsar 2ac5888a8d [IMP] hr_timesheet: hour fields calculation
This commit aims to improve duration field calculation
with subtask. So this commit :

- provides `subtask_planned_hours`as the total of planned our from
children tasks
- removes useless/unclear fields : delay_hours and total_hours
- makes progress computation independent from the stage (before,
progress
of task in fold stage was 100%)
- split the `hour_get` compute method into smaller ones in order to
improve
performances and code readability.
- makes 'progress' and subtask effective hours not including allocated
hours

Task: 38498
2018-01-17 09:34:18 +01:00
Akash Bhavsar 66a0e5a541 [IMP] project: drop project substask constraint
This commit improves subtask mecanism, on several points:
1) Drop the project constraint: before this commit, creating
subtask in non parent project was not possible. Now you can move
subtask to any project.
The default project of a subtask is the one from the parent.
2) When setting a parent task, we want to force some field to have
the same value as its parent, like `partner_id` or the `sale_line_id`.
The idea is here, we work for the same client; a subtask count for the
same goal (SO line or customer). Those fields should be readonly on the
view.
3) Refactor some methods

Task: 38498
2018-01-17 09:34:11 +01:00
Aaron Bohy 7b6056a0b5 [MERGE] web,*: ActionManager/ViewManager refactoring
This branch is the first part (out of 3) of the refactoring of the
ActionManager and ViewManager layer of the webclient.

The main changes are:
  - there is no ViewManager anymore, its work is now handled by the
    ActionManager itself, but isolated in a specific file ; this
    eases a lot of things, as the breadcrumbs handling for example.
  - the ActionManager code is converted to the new coding principles
    and guidelines ; mainly, children widgets communicate with it by
    triggering events up, and not by function calls anymore.
  - the ActionManager layer is now testable, and a lot of tests have
    already been written.
  - the code in other addons has been adapted consequently.

What's coming next:
  - introduce the 'AbstractAction' Widget, and make client actions
    and view controllers inherit from it ; this widget will
    implement a common API that could be used uniformly by the
    ActionManager (e.g. restore(), canBeLeft(), renderButtons(),
    getTitle()...).
  - move the ControlPanel handling from the ActionManager to the
    AbstractAction.
2018-01-16 20:50:19 +01:00
Géry Debongnie b20a6f60ae [IMP] web: add some action_manager tests 2018-01-16 20:49:19 +01:00
Aaron Bohy e73b1b1cce [REF] web: ActionManager: report actions
Adapt code to the ActionManager refactoring, and to the new coding
guidelines. Also add some tests.
2018-01-16 20:49:19 +01:00
Aaron Bohy 80db9f232b [MOV] web: move and rename qwebactionmanager.js 2018-01-16 20:49:19 +01:00
Aaron Bohy 32b8cec536 [REF] web,*: ActionManager/ViewManager refactoring
This rev. is the first part (out of 3) of the refactoring of the
ActionManager and ViewManager layer of the webclient.

The main changes are:
  - there is no ViewManager anymore, its work is now handled by the
    ActionManager itself, but isolated in a specific file ; this
    eases a lot of things, as the breadcrumbs handling for example.
  - the ActionManager code is converted to the new coding principles
    and guidelines ; mainly, children widgets communicate with it by
    triggering events up, and not by function calls anymore.
  - the ActionManager layer is now testable, and a lot of tests have
    already been written.
  - the code in other addons has been adapted consequently.

What's coming next:
  - introduce the 'AbstractAction' Widget, and make client actions
    and view controllers inherit from it ; this widget will
    implement a common API that could be used uniformly by the
    ActionManager (e.g. restore(), canBeLeft(), renderButtons(),
    getTitle()...).
  - move the ControlPanel handling from the ActionManager to the
    AbstractAction.
2018-01-16 20:49:19 +01:00
Aaron Bohy 9bee25a9df [REF] account,web(_tour): close rainbowman on click
This rev. makes the Rainbowman stop listening to event
'clear_uncommitted_changes' on core.bus, as this event is about to
be removed (in a next commit). It was using it to destroy itself
when such an event was triggered (basically, when the current view
was left).

Instead, we removed the option 'click_close' as, when set to true,
which was the default, the rainbowman was destroyed as soon as the
user clicked outside the raibowman.
2018-01-16 20:49:19 +01:00
Aaron Bohy de27eaa971 [FIX] web: config.debug and session.debug equivalence
Before this rev., config.debug was always a boolean, whereas it
should also encode the special value 'assets', as done in session.
2018-01-16 20:49:19 +01:00
qsm-odoo 285d95e946 [IMP] website: more intuitive image and link edition
- Remove useless snippet background suggestions (only one button to
  open the media dialog directly)
- Show meaningful-only tabs in the media dialog (no document as
  background, ...)
- When editing a background shows the background suggestions first and
  show the background suggestions last for standard images. Technically,
  this is done by filtering on the name/fname of the attachments and
  adding magic name parts to the fname on image upload (e.g. when
  uploading an image from the media dialog when customizing a bg, the
  uploaded image will automatically be marked as a background). Note:
  there were discussions to implement this feature with a tag system for
  ir.attachment/s but the implementation's cost was too great in regards
  to the feature.
- When editing an existing link or creating one from selected text, do
  not show the "Link Label" field in the dialog; it was confusing. Only
  show that field when adding a link at the cursor location with no
  selected text.
2018-01-16 17:03:16 +01:00
qsm-odoo abde8bddf8 [REF] web_editor, website(_*): refactore media & link dialogs
* blog, gengo, sale
2018-01-16 17:03:15 +01:00
qsm-odoo 0dd41128ff [FIX] web_editor: fix 8ca92330b3
The existence of $li is not sure, especially in themes override.
2018-01-16 17:03:10 +01:00
Thibault Delavallée 0b32d3fe61 [MERGE] base, various: add native support of config parameters in res configs
This commit adds native support of config parameter in res config. Using
a new config_parameter attribute on fields setter and getter of parameters
are automatically managed by the config class. It allows to remove
duplicater and error-prone code in a lot of configuration screens
updattng config parameters.

Configs are now also more strict on naming conventions leading to some
fields being renamed.

See sub-commits for more details.
2018-01-16 13:35:04 +01:00
Thibault Delavallée 1fd711b133 [REM] base_setup: remove unused field
This field is not used anywhere anymore. We can remove it.
2018-01-16 13:34:29 +01:00
Thibault Delavallée faf6165e03 [REF][FIX] base_setup, sale, website: update config field name for config_parameter fields
Those fields are prefixed by default_ which now strictly means they
should be linked to a default value for a given model. Their name
is updated so that it does not conflict with the strict verification
done recently for settings.
2018-01-16 13:34:29 +01:00
Raphael Collet c434d7f947 [IMP] base: make res.config.settings strict about field definitions
This way we avoid wrongly configured fields and triggering a behavior
without knowing it.
2018-01-16 13:34:29 +01:00
Richard Mathot a18bd499ac [REF] various: convert res.config.settings to use ir.config_parameter integration
This commit updates the various res config of Odoo addons to use the
newly-introduced config_parameter field attribute.
2018-01-16 13:34:29 +01:00
Richard Mathot 098788b407 [IMP] base: order config parameters by key
This convenience ordering helps finding parameters.
2018-01-16 13:34:29 +01:00
Richard Mathot a0dd81bfab [IMP] base: add native support for ir.config_parameter in res.config
Res config currently have some native behavior to support features
like default_XX (setting global default value), group_XX (adding
implied groups) and module_XX (installing or removing modules). This
commit add support of config_parameter attribute on other fields that
automatically links a config parameter to the field. It allows to
hide the set and get of config parameter and their value conversion
as everything is now handled by the base settings class.

Thanks to @rco-odoo for his help and review when working on this
feature.
2018-01-16 13:34:29 +01:00
Hiral Bhavsar 66aefb1723 [IMP] mass_mailing: make basic theme behave like gmail
- Not any text by default
- No padding in sent layout (add padding to the editor for readability)
- Apply font size like gmail
- Line spacing should behave like in gmail, so no margin on <p> tags
- Ordered and unordered lists should have proper margin and bullets
  should have black color
2018-01-16 13:26:08 +01:00
Raphael Collet 2ed137af3e [REF] models: refactor code to update parent_left/parent_right
Put the code to update the MPTT in specific methods, and reduce the number of
queries being made (from 5-6 queries to 2-3 queries).  Add test on MPTT to
validate the refactoring.
2018-01-16 10:47:13 +01:00
Raphael Collet 869f062e08 [REF] models: improve code of _create/_write
Also remove method `self._check_selection_field_value`, and perform the check
in field method `convert_to_column`.
2018-01-16 10:47:13 +01:00
Raphael Collet be0f24a96b [REF] models: make _create/_write deal with stored fields only
Improve methods `create`/`write`, and update parent records in them instead of
methods `_create`/`_write`.
2018-01-16 10:47:13 +01:00
Prakash Prajapati 964aefada2 [IMP] web_tour: close tip on click on touch devices
Task #34856
2018-01-16 10:20:12 +01:00
Akash Bhavsar 762eb49e09 [REF] website_links: remove ZeroClipboard lib
... and use Clipboard instead, which is already in web (put in the
assets_common).

Task #33274
2018-01-16 10:19:39 +01:00
jem-odoo 04cd3771c4 [MERGE] hr_expense: clean accounting entries generation and module
This commit aims to clean the code generating account
moves when posting expenses. This code was old and
its design was too complex. Refactoring was needed
for maintenability and readability.

This commit also renames some files and methods to
fit odoo coding guidelines.

Functionnal scope should not be impacted by these
changes; those commits are purely technical. See
each one of them for more details.
2018-01-16 08:44:56 +01:00
jem-odoo 9f35ae0602 [MOV] hr_expense: move files to fit guidelines 2018-01-15 17:16:05 +01:00
Jérome Maes 15fa0c23d9 [IMP] hr_expense: clean accounting object generation
This commit clean the code generating account
moves and line when posting expenses.
The code was 'spaghetti', using too many
temporary structure and badly name method.
The purpose is here to make the code more
understandable and readable.
Nothing should have change functionnaly speaking.
2018-01-15 17:16:05 +01:00
Jérome Maes fba1d0a7ce [IMP] hr_expense: make proper constraints
Instead of manually call a checking method, use
the contraints mecanism provide by the ORM.
2018-01-15 17:16:05 +01:00
jem-odoo 357a8b7292 [IMP] hr_expense: make test smarter
This commit make expense test depending on the
same common class as the other (in sale_expense).

Some data were badly defined (test data), using
field only existing when sale is installed. So move
this part in sale_expense.

Expense tests now check analytic entries when
sumbitting an expense.
2018-01-15 17:16:05 +01:00
Jérome Maes ef3e6f740a [IMP][GDL] hr_expense: make the module conform to guidelines
This commits:
- extract default method from lambda of field
definition to avoid too long code line
- reorder method, according to guidelines
- rename method as guidelines says
- fix linting issues

This is the first step of a good code
cleaning of this module.
2018-01-15 17:16:05 +01:00
Christophe Simonis b3f44032c1 [FIX] web: adapt test to new dom structure 2018-01-15 15:48:45 +01:00
RomainLibert 6187ffa258 [MERGE] hr_holidays: split model hr.holidays and clean code
* Remove unused 'Remaining Leaves' report
* Split hr.holidays into hr.leave and hr.leave.allocation
* Split/Rename models/views according to guidelines
* Remove 'only-used-once' inline methods
2018-01-15 10:40:01 +01:00
RomainLibert 58c22bb33b [REF] hr_holidays : Remove 'only-used-once' inline methods
Purpose
=======

These methods were used only once in the models as they were very short
we decided to simplify the code by inlining them
2018-01-15 10:38:31 +01:00
RomainLibert a0f4f6548b [REF] hr_holidays: Split/Rename models/views according to guidelines
Purpose
=======

Follow the coding guidelines (https://www.odoo.com/documentation/11.0/reference/guidelines.html)

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

* each model has now its own .py file
* view files have better names
* reordered the methods for readability
* reimplemented email subtypes
2018-01-15 10:38:31 +01:00
RomainLibert f61687a4cd [IMP] hr_holidays : split hr.holidays into hr.leave and hr.leave.allocation
Purpose
=======

Have a clear distinction between leave and allocation requests instead of
using the same model to mix 2 different concepts.

Splitting the model will allow different business code to be run on each
model as allocations and leaves are not exactly the same thing; this
will add some code but simplify future improvements

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

1/ Completely separate the models

Model hr.holidays has been split into leave.request and
leave.allocation.

2/ Make reporting working again by using an SQL view aggregating data
from leaves and allocations

A new report has been added in order to aggregate
datas from both allocations and requests. The views have been modified
accordingly.
2018-01-15 10:38:31 +01:00
RomainLibert 1103dda8ae [REM] hr_holidays: Remove unused 'Remaining Leaves' report
Purpose
=======

This report was not used anywhere so we decided to remove it
2018-01-15 10:38:31 +01:00
RomainLibert 1734b8f8de [IMP] crm: onboarding
- Add missing tour stage in crm creating opportunity and minor fixes
- Label, Placeholder and Tip IMP
- Restrict Create new sales channel
- No Content Help Improvements
- Schedule Activity Button Layout Change
- Chatter Log IMP
2018-01-15 10:23:13 +01:00
RomainLibert ae58fd5bd3 [IMP] WEB: Progressbar Subgroup count in Sumfield
The idea is that when we click on either the green, orange or red part
of the progressbar the count on it's right changes to whatever the value
of filtered records should be.
2018-01-15 10:23:13 +01:00
RomainLibert e5330857b7 [REM] Removed mass archiving from kanban view
As discussed with fgi and apr mass archiving has been removed in kanban
it has been judged too dangerous for the new users that won't be abble
to easily revert the archived records
2018-01-15 10:23:13 +01:00
RomainLibert 8aa27eeefd [IMP] Base: Forwarding missing model context
This change allows us to get the model context in order to know if we
have a lead or an opportunity which is important to display the right
word.
2018-01-15 10:23:13 +01:00