Commit Graph
115219 Commits
Author SHA1 Message Date
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
Pierre Rousseau bd760f0746 [FIX] sms: use correct format for sending sms
To send a sms, the number must be in international format. If phone_validation is installed and phone_international_format is set to no_prefix, the number is not in international format.
2018-01-17 09:28:49 +01:00
Pierre Rousseau 637bfc2862 [FIX] phone_validation: fix behavior with prefix option
This commit fixes the behaviour of the phone_format function when phone_international_format is set to prefix.
2018-01-17 09:28:49 +01:00
Goffin Simon 733ce266ef [FIX] base, hr_holidays: Printing leaves by department report with no logo
When calling the function report_action from write_company_and_print_report,
it failed because all the required data from the transient model "hr.holidays.summary.dept"
were lost.

opw:803051
2018-01-17 09:13:35 +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
Martin Trigaux 22e458775a [I18N] l10n_ch: translate l10n_ch
Export source terms that are not l10n_multilang related

Courtesy of Frederic Clementi

opw-804477
2018-01-16 17:02:50 +01:00
Goffin Simon 73c9b3d014 [FIX] mail: Cannot send new message from Event Track
When the Speaker address is False, it crashed.

opw:805361
2018-01-16 15:58:41 +01:00
Christophe Simonis f05b2b1200 [MERGE] forward port branch saas-15 up to 5e474bb3f9 2018-01-16 15:32:10 +01:00
Yenthe V.G 37849225fe [FIX] base: add Timor-Leste phone code
Closes #22272
Fixes #10596
2018-01-16 15:29:54 +01:00
Christophe Simonis 5e474bb3f9 [MERGE] forward port branch saas-14 up to 64dbc5fbb9 2018-01-16 15:22:32 +01:00
Nicolas Lempereur 23a2bac3fa [FIX] hr_equipment: no technician subscribe in 9.0
In 9.0, an "Human Resources / Employee" see only hr.equipment for which
they are set as the "Employee".

But the code automatically subscribed the "Technician" because the field
name was named technically "user_id" which is automatically subscribed
by the system.

This led to a possible issue with read / unread message because of
feature that just happen by coincidence.

For 9.0 only (in 10.0 the field has been renamed technician_user_id and
access rules have been changed).

opw-805185
closes #22273
2018-01-16 15:09:45 +01:00
Christophe Simonis 64dbc5fbb9 [MERGE] forward port branch 10.0 up to ef8cd11a6b 2018-01-16 13:55:47 +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
Aaron Bohy cae3364783 [FIX] mail: Activity systray: missing context
Before this rev., terms in the activity systray dropdown weren't
translated because the user_context (containing the user language)
wasn't passed.

Complete c591e4e6

opw-805431
2018-01-16 11:22:26 +01:00
Lucas Perais (lpe) aa08bc58e6 [FIX] website_sale: pending message do not disappear
On the payment confirmation page, when the payment is still pending.

Before this commit:
the user friendly message disappeared and a warning icon took its place

After this commit, the warning icon is prepended to the message.

OPW 787799
2018-01-16 11:15:48 +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
Arnold Moyaux b609743dfc [FIX] mrp: Unbuild what has not be build
Since commit 55c0221e38 it is
not possible to unbuild what has not been build by ourself.

However we won't block the customer and let him unbuild everythings.
2018-01-16 09:30:34 +01:00
Florent de Labarre 2bd10fa757 [FIX] mrp: unbuild use the MO instead of BOM
When the user unbuild a product with a MO specified
the system will generate the inverse moves from the BOM.
However the BOM could have change.

This commit instead use the MO specified in order to
generate the inverse moves.
2018-01-16 09:30:27 +01:00
Vincent Schippefilt 3ede4c72df [FIX] requirements: update for windows compatibility
problem: installing from the source on windows includes manual modification of the requiremnets, as well as
not supported package versions

solution:
- increased the version of lxml, werkzeug and pillow to the latest supported version in debian, it
will fix already a number of issues on windows
- automatically include or exclude dependencies from requirement.txt using requirement specifiers

Note that for lxml on windows, we will always install the latest version because the version 3.7.1 does not exist on
windows in WHL.
2018-01-16 09:22:21 +01:00
Aaron Bohy f7ddaf4de9 [FIX] mail: activate test of Discuss in mobile
This test couldn't be executed within the classic JS web suite,
because it relies on mobile specific files that are rejected in
desktop. Now that a second web suite (for mobile) has been
introduced (see 9bc500948), we can activate this test.
2018-01-16 09:16:29 +01:00
Nicolas Martinelli 6139840796 [FIX] product_expiry: date on lot
- Create a product tracked by lot with some date values != 0
- Create a MO for this product, click on 'Produce'
- Create a new lot.

The various dates are not registered on the lot.

The product ID is located in the context in this case, not in the
values.

opw-803790
2018-01-16 09:09:28 +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
Nicolas Martinelli d20c74dd65 [FIX] stock_picking_batch: no edit
- Select several pickings
- Click 'Add to Batch'
- Create a new batch and do 'Create and Edit'

The selected picking do not appear in the list.

The wizard was not really designed to handle such use cases. Hide the
possibility to 'Create and Edit', since this is just confusing for an
end user.

opw-804359
2018-01-16 08:16:27 +01:00
Rémi Rahir 6135e82d73 [IMP] doc: iap new functionality
Added documentation related to the new 'charge' in IAP that allows one
to capture a smaller amount of credit than authorized if needed.
related to 73ef4b0374ab40e2e02168adc74137a6795d20fe
2018-01-15 18:09:53 +01:00
Rémi Rahir 1bbee97e3c [IMP] iap: support flexible credit capture
Added a possibility to authorize a certain credit amount and capture another (smaller or equal) at the end of the transaction.
For instance, you want to print 2 jobs and one of them fails, you will be able to only print the one that succeeded.
2018-01-15 18:09:53 +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