Commit Graph
117156 Commits
Author SHA1 Message Date
Laurent Smet ce818f1f8f [REVERT] account, point_of_sale: revert complex taxes computation
Reverts:
f85c8843c9
6c996723b2
455b5aaff8
c6a9bab074
6366150484
33d20a2241
47c0cfc6e7
6e46ba7b46
5afb5ecd04
2017-11-10 15:22:45 +01:00
Géry Debongnie 3120f95fa4 [FIX] web: prevent test interference
In the view dialog test suite, a few tests created a parent widget, then
created a view dialog, and destroyed the view dialog at the end, but not
the parent widget.  As a result, the environment was not properly
restored at the end.

In this case, the test 'SelectCreateDialog correctly evaluates domains'
changed the session (with user_context: {uid: 2}), and this made other
tests crash (web_editor test in particular)
2017-11-10 15:17:28 +01:00
Barad Mahendra 996a817071 [FIX] website_sale_stock: effectively give access to delivery slip on customer portal
If customer has access to its sale order it should have access to the
linked pickings. It checks customer either has access to the delivery
slip record either has an access token coming from the linked sale
order.
2017-11-10 14:54:36 +01:00
Géry Debongnie 350973ff36 [FIX] web: prevent test interference
In the view dialog test suite, a few tests created a parent widget, then
created a view dialog, and destroyed the view dialog at the end, but not
the parent widget.  As a result, the environment was not properly
restored at the end.

In this case, the test 'SelectCreateDialog correctly evaluates domains'
changed the session (with user_context: {uid: 2}), and this made other
tests crash (web_editor test in particular)
2017-11-10 12:06:04 +01:00
Nicolas Martinelli e77fa0051c [FIX] models: blank export
Exporting One2many files gives blank export.

This reverts commit 2c61c54ffa.

opw-781399
opw-781457
2017-11-10 10:35:43 +01:00
Lucas Perais (lpe) 1a253d3ae2 [FIX] web_editor: mediaDialog should trigger change
before this event, when editing an email template from the chatter
by adding an image through the mediaDialog, the message was always empty
if nothing more than the image was present.
this was because the html field was not marked as dirty,
the event responsible for the marking was not triggered.

After this commit, when sending solely an image from the media dialog,
the email sent does contain the image

opw 779167

closes #20817
2017-11-10 10:30:34 +01:00
Aaron Bohy 9bc5009481 [FIX] web(_editor): enable mobile tests
This rev. introduces a new test suite meant to test the webclient
components on mobile devices. The key 'config.device.isMobile' is
forced to true in this test suite, so that mobile specific JS files
are properly executed, which isn't the case in the classic JS test
suite (setting isMobile to true in the test definition is too late,
as the JS files are already processed).

For now, this new test suite contains a single test, which was
skipped until this rev. as it couldn't be executed in the classical
JS test suite.

Both suites are executed at each build of the runbot, and they
can be manually executed from the webclient as well (via the debug
manager).
2017-11-10 10:24:42 +01:00
Nicolas Martinelli a1ad6375ef [FIX] stock: reordering rules on service
1. Create a stockable product
2. Create a reordering rule
3. Ooops, change stockable into service
4. Run scheduler

Odoo created procurement for service products.

We prevent changing the product type if there are active reordering
rules. We could have silently skipped these products when running the
scheduler (in `_get_orderpoint_domain`), but that would have potentially
broke existing installations incorrectly set up.

opw-781128
2017-11-10 08:05:21 +01:00
Joren Van Onder b4debf7e1b [FIX] point_of_sale: take into account extra variant prices
list_price is the base price of a product which does not include
price_extra.

Note that in the backend the pricelist computation uses

product.price_compute('list_price')

to compute the base price on which to apply the pricelist. For
product.product this seems to be equivalent to the lst_price computed
field.

The original list_price field is unused but has not been removed to
avoid breaking any 3rd party code that is using this field.

opw-781629
2017-11-09 16:05:07 -08:00
Christophe Simonis 26257ad7a1 [FIX] test_performance: bump query count
When `rating` is installed, a few more queries are executed...
2017-11-09 20:35:54 +01:00
Christophe Simonis e74ef6cfb9 [FIX] test_performance: bump query count
Recent changes in tracking fields add a new query. Adapt tests.
2017-11-09 19:44:38 +01:00
Christophe Simonis de93645fe3 [MERGE] forward port branch saas-16 up to 82add438f2 2017-11-09 19:16:05 +01:00
Christophe Simonis 82add438f2 [MERGE] forward port branch saas-15 up to 90ca872071 2017-11-09 18:05:49 +01:00
Yenthe V.G ab1ad38485 [FIX] stock,project: make planner translatable
Titles of the sections was not present

Closes #20825
Closes #20833
2017-11-09 17:18:57 +01:00
Yenthe V.G acd26691ee [IMP] stock: Show title instead of id in breadcrumb
Closes #20801
2017-11-09 16:54:20 +01:00
Christophe Simonis 90ca872071 [MERGE] forward port branch saas-14 up to d171f282c3 2017-11-09 16:49:41 +01:00
Christophe Simonis d171f282c3 [MERGE] forward port branch 10.0 up to f8540501ac 2017-11-09 16:19:21 +01:00
Martin Trigaux f8540501ac [FIX] hr_expense: verify the constrain server side too
The groups were set only on the view which does not prevent abuses.
The fact that users can bypass the groups on the view is not critical as the
changes are logged but this should be improved nevertheless.

In master, proper record rules should be set.

Closes #20427
2017-11-09 15:51:14 +01:00
Christophe Simonis 9c634b5b30 [MERGE] forward port branch 10.0 up to a63ecee47a 2017-11-09 15:16:57 +01:00
Géry Debongnie ae4501da9c [FIX] web: do not lose onchange info in some rare cases
Here is a situation where we had a problem:
- a form view with a one2many field, which has no inline views
- the (non inline) list view has a field A, and is not editable
- the (non inline) sub form view has fields A and B, with an onchange on
  B which modifies A

In that case, the user could do this:
- go to edit mode
- click on 'add' a new one2many line
- change the value of B in the form view, this changes the value of A
- click on save to close the modal form view
- click on the new o2m record to reopen the modal form view
- rechange B
=> the onchange does not work

The explanation is that when we reopen the modal, we update the known fields
information, but we had to perform a fieldviewget to fetch the list
view, so we have a full knowledge of the fields.  However, the code did
not update the fields info (because it uses _.default), which means that
the onchange information contained in the form view is lost.

Note: the test system had to be adapted to more closely simulate what
actually happens.  In particular, the onchange flag is no longer added
by the mock server, since it should be done by the data manager, like
'real' code.  This change broke the basic model tests, which had to be
modified accordingly, by setting manually the onchange flag.
2017-11-09 14:03:35 +01:00
Simon Lejeune a29ec80082 [FIX] stock: _assign_picking
Commit[1] tried to improve the usability of the pick + pack + ship + a
fixed procurement group scenario by erasing the origin value on the
groupped ship that refered wrongly to only the first downstream document
(and in fact refered to multiple).

We forgot the scenario into which we add a sale order line. In this
scenario, we also go through `_assign_picking` and, if an existing open
picking is found, we also wiped its partner and origin value, which was
indeed wrong.

We fix this scenario by being more precise on the erasing condition.

[1] 4a5f07654f
2017-11-09 13:07:00 +01:00
Adrien Dieudonne fe4f63d325 [FIX] web: create in editable grouped list views
Before this commit, an issue occured when you tried to
create a new record in a editable grouped list view.
A new line was created with an undefined group.

Editable grouped list views are not supported.
So now, we have to switch on the form view when
you click on create. This behavior is already implemented
when you open an existing record.
2017-11-09 11:45:04 +01:00
Goffin Simon a63ecee47a [FIX] website_sale: Wrong apply of the fiscal positions when choosing shipping address
In 11.0, this part of the code has been removed.

When choosing the shipping address in the cart, if a tax has been mapped
by a fiscal position, the subtotal was not correctly computed.

opw:778405
2017-11-09 11:44:38 +01:00
Fabrice Henrion 053209fb0e [FIX] mail: add missing space
Closes #20782
2017-11-09 10:58:38 +01:00
Martin Trigaux b1bf99b7e3 [FIX] base: correct Model Overview report
Since 3d04e448, the reports must start with a `article` class, not `page`.
The report was not adapted.

Fixes #20066
2017-11-09 10:56:52 +01:00
Lucas Perais (lpe) 7c486b4d0c [FIX] mail: visitor to portal_user should keep livechat channel
adapting #20279 to v10

Before this commit, when starting a livechat session as a public user and continuing as a portal user, the livechat crashed
(the poral user couldn't see the channel created before as Admin)

After this commit, the conversation is kept and security insured by the uuid in the cookie

OPW 775568

closes #20281
2017-11-09 10:44:37 +01:00
Lucas Perais (lpe) bb38c7047e [FIX] im_livechat, mail: visitor to portal_user should keep livechat channel
Before this commit, when starting a livechat session as a public user and continuing as a portal user, the conversation was lost
(the poral user couldn't see previous messages posted as a public user)

After this commit, the conversation is kept and security insured by the uuid in the cookie

OPW 775568

closes #20279
2017-11-09 10:42:36 +01:00
Martin Trigaux da68d1d573 [FIX] fleet: harmonize terms 2017-11-09 09:54:48 +01:00
qsm-odoo c7171795f8 [FIX] web_editor: restore snippet option data parameter
Snippet options were not receiving proper data parameter on
instantiantion due to a websitepocalypse wrong adaptation. Those
data are parameters to tweak an option behavior, directly defined
on the option's <div/> in the XML. By mistake, they were now taken
on the child <li/> element (main DOM element of the option).

A visual example of the bug is the overlay colorpicker displaying
"Background Color" as a title instead of "Overlay Color".
2017-11-08 18:28:48 +01:00
Christophe Simonis 9342517fcf [MERGE] forward port branch 9.0 up to 35aa2a977f 2017-11-08 17:30:45 +01:00
Martin Geubelle 191f9d0598 [FIX] web: reuse the same BasicModel instance
Before this revision, only the FormView allowed to reuse the same datapoint.
This was only used when opening a FormViewDialog when opening the form view
of record in a one2many field.

However, this could be useful in other places for other views. In Studio for
example, we need to instantiate a x2m view without the parent view ; we thus
need to be able to reuse the same model for all basic views.
2017-11-08 17:19:28 +01:00
Martin Geubelle c13c9e0b5c [FIX] web: invalid domain in DomainSelector
A domain could contain the key `parent` (in an embedded subview), like:

    domain="[('display_name', '=', parent.display_name)]")

This is currently not handled by the DomainSelector.

This will probably be handled in a future version but for this stable version,
this case that triggered an error is now catched and an error message is
displayed in the widget.

This was causing a traceback when opening a domain with `parent` in the edition
of a subview with Studio.
2017-11-08 17:19:28 +01:00
Raphael Collet b206d83c03 [FIX] ir_cron: refactor _acquire_job to retrieve useful information
The method `_process_jobs` provides an alternative API to process the cron
jobs, that does not catch exceptions and log them.  This makes the processing
of cron jobs easier for scripting.
2017-11-08 16:03:16 +01:00
Raphael Collet 763d714f0e [FIX] ir_cron: do not run cron jobs during module installation/upgrade 2017-11-08 15:57:33 +01:00
Nicolas Lempereur 9f0bc83788 [FIX] web: calendar IE9+ incompatibility
The "Event" API is not the same between IE9 till IE11 and all the other
browser (eg: IE Edge, google chrome, firefox, ...).

For example here is a seemingly accepted polyfill to have it working the
'same' on most browsers using CustomEvent:

https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent/CustomEvent#Polyfill

This commit just trigger the event with jQuery which attains the same
result but work everywhere.

opw-780056
closes #20759
2017-11-08 15:55:40 +01:00
Martin Trigaux abf8568879 [FIX] fleet: fix typo
Courtesy of translator teams
2017-11-08 15:52:30 +01:00
Martin Trigaux 0f10589eb4 [FIX] base,sale_timesheet: English
Thoses -> those
Add model description

Courtesy of translators for report
2017-11-08 14:27:48 +01:00
Jeremy Kersten 35aa2a977f [FIX] website_slide: fix traceback when slide is a google doc or youtube link
In case we are not uploading a file but add a slide based on google doc url
or youtube link, post['datas'] is not set and the code will crash.

Javascript don't check the onError, so the user never see the error and wait
 that nothing happend.
2017-11-08 13:00:07 +01:00
Thibault Delavallée a25358eae3 [REM] hr: remove unimported file
Leftover of 78ac6de52d code about mail gateway was moved to
mail_alias.py but mail_thread.py file was not removed.
2017-11-08 12:55:33 +01:00
Thibault Delavallée 20d8025036 [FIX] mail: followers alias check on models not inheriting from alias mixin
You could try to check followers on a model not inheriting from mail alias
mixin. In that case current code would check followers on a void mail
alias mixin record, meaning no followers found. Instead we now
differentiate the class method from the method checking record properties.
2017-11-08 12:51:13 +01:00
Thibault Delavallée d6a5c126e7 [FIX] mail: correctly return and log error message when checking aliases
Mesage should be message otherwise it is not displayed in the logs.
2017-11-08 12:47:12 +01:00
Nicolas Lempereur 54d5678696 [FIX] board: manage modifiers on save
With da136d83 we have modifiers on every elements but when saving them
for dashboard they have to be stringified to be used.

Also a part of a previous code was still present that removed context
and domain from a saved dashboard when modifying it.

opw-779071
closes #20725
2017-11-08 12:43:55 +01:00
Odoo Translation Bot 43e5f5a67f [I18N] Update translation terms from Transifex 2017-11-08 11:08:53 +01:00
Géry Debongnie 9e97ad8dce [FIX] web: prevent useless discard dialog from showing up
Here is a scenario that could cause an issue:
- open a form view with a many2one
- click on edit button
- click on small external button for many2one. this opens a modal form
  view
- click on save in the modal (without changing anything)
- click on save in the main record
- exit form view. this opens a discard dialog

There were two issues here:
- saving the modal dialog automatically marks the many2one field as changed.
  This was necessary to force reloading the data, because editing a sub value
  in the modal form view could have changed the display_name of the manyone
  field.  However, this is not necessary when no change was done.
- when saving a record, the _isDirty flag was reset to false only if an
  actual rpc was done.  However, it may happen that the flag is set to
  dirty (for example, when modifying a value inside a many2one), but the
  main record has no changed fields.

In this commit, we also remove the on_save handler in the
formviewdialog.  This is a small refactoring in a stable version, but no code
currently use it, and I believe that it will make the code much easier
to maintain (the previous code was really awkward), so I think that the
tradeoff is acceptable.
2017-11-08 10:50:12 +01:00
Thibault Delavallée 53ad585bfc [FIX] mail: ease activities management through documents
This commit improve the daily use of activities by delegating activities
management to the document. Activities are already managed on document
through the UI either in form view or in kanban view.
2017-11-08 10:42:31 +01:00
Martin Trigaux 36caadaf6a [IMP] calendar: translate calendar reminders name
and rename the alarms by email for a better name

Makes sense to be translated as general and useful to have it as data.

Fixes #20634
Closes #20644
2017-11-08 10:23:45 +01:00
Lucas Perais (lpe) 324d4bfb56 [FIX] web: fields set in fieldDependencies should have their "options" set
Bug brought by f45edfb

Before this commit, the debug manager crashed when clicking on "set defaults" on a view fetching a fieldDependency.
This was because the "options" key on the field was not set when the field originated from the fieldDependency of a widget.

After this commit, the data_manager ensures that key is present

OPW 780071

closes #20730
2017-11-08 10:21:32 +01:00
Thibault Delavallée f8c974cf6e [FIX] mail: speedup tracking values computation when reading messages 2017-11-08 10:00:47 +01:00
Wolfgang Taferner 13f9d8a502 [FIX] stock: key error due to bad search/replace -> typo 2017-11-08 08:41:31 +01:00
Martin Trigaux c7e0a802a6 [FIX] sale_payment: correct plural form
To make it translatable
2017-11-07 16:50:41 +01:00