Commit Graph
117156 Commits
Author SHA1 Message Date
Christophe Simonis c0ec09e9d5 [MERGE] forward port branch saas-14 up to be77cf7f5f 2017-07-28 17:25:45 +02:00
Christophe Simonis be77cf7f5f [MERGE] forward port branch 10.0 up to e686385138 2017-07-28 16:56:14 +02:00
Christophe Simonis e686385138 [MERGE] forward port branch saas-11 up to 5e6637a240 2017-07-28 16:26:57 +02:00
Christophe Simonis 5e6637a240 [MERGE] forward port branch 9.0 up to b054902655 2017-07-28 16:24:48 +02:00
Christophe Simonis b054902655 [MERGE] forward port branch saas-6 up to 683a7cb029 2017-07-28 16:23:27 +02:00
Christophe Simonis 683a7cb029 [MERGE] forward port branch 8.0 up to 1644b92fd8 2017-07-28 16:18:08 +02:00
Thibault Francois 1644b92fd8 [FIX] account format error message correctly
Cherry-Pick of a04c1a2ac5244fe2fd3098fc22c59d336e352981
2017-07-28 16:15:35 +02:00
Yenthe V.G d82933d8e7 [FIX] web: change exception name from openerp to Odoo
The crash manager still used the old name for the exception. (PR #18522)
2017-07-28 15:44:18 +02:00
Christophe Simonis a7b7576536 [FIX] test_converter: declare string containing unicode as unicode 2017-07-28 15:41:46 +02:00
Simon Lejeune 7de78e7737 [FIX] stock: add move when picking is available
This completes rev 8822b7cfa4.

The state field was correctly updated by the default_get, however it was
not set to the server because it was set as readonly on the model. For
this specific usecase, we force the readonly to False in the view.

The same issue was happening with the product_uom_id, which is set to
readonly in the view. We mark the field as editable if the move is
additional, and as it does not reserve anything it shouldn't trigger any
other issues.
2017-07-28 15:29:47 +02:00
Thibault Delavallée 55d9c37520 [FIX] payment_authorize: avoid crash when contact ogone without street on partner 2017-07-28 15:07:52 +02:00
Thibault Delavallée 08a958fe09 [FIX] website_portal_sale: fix invoice pdf report link
Link is /my/invoices/pdf/<id> .
2017-07-28 13:53:02 +02:00
Thibault Delavallée c6f9109d4e [FIX] payment_ogone: do not crash if you can't process tx
Due to unexisting variable the method s2s/create controller was crashing
instead of returning an error when it did not successfully create
a token.
2017-07-28 13:51:51 +02:00
Pierre Masereel 0867c3c09b [FIX] stock, stock_account: move, move_lines and quant view
Set views and menu items for quant, moves, move_lines and inventory
valuation.
2017-07-28 13:43:51 +02:00
Pierre Masereel 0fbe90b227 [REF] stock: quant: use in_date field
Set the `in_date` field to now when creating a tracked quant.
Set the correct `in_date` field when moving a quant (this is done by
adding a kw argument to `_update_available_quantity` and adapting the
code that moves quant in stock.move.line).

If quants from the same lot go together in the same location, we merge
them and keep the older date (as the user will have no way to tell the
difference anyway).

We add multiple test cases:
    - `in_date` are only set on tracked quants
    - FIFO and LIFO are correctly applied
    - keep the oldest `in_date` when merging quants
    - editing a done move line or creating one in a done picking is
      correctly working

Joint work with sle-odoo.
2017-07-28 11:38:31 +02:00
Olivier Dony 586b97e17b [FIX] crm: correct duplicate record ID
Introduced by a8c5b7810f

+ spellchecking
2017-07-28 11:19:37 +02:00
Aaron Bohy 2ba72fb224 [FIX] web: graph: reload with correct fields
A traceback occurred when trying to reload a graph view with no
groupBy in the searchview, because the array of fields to read
given to the read_group RPC didn't contain the default groupBy
field (Error "Fields in 'groupby' must appear in the list of
fields to read"), e.g. in Sales > My Pipeline.
2017-07-28 09:27:31 +02:00
David Monjoie 3b3f6f04af [FIX] web: save changes when readonly if force_save is set
In previous versions, readonly used to prevent sending the values
of the fields to the server. However, it was not working properly
for fields which have their own sub-arch in the view, as the value
used to be sent regardless of the readonly value.

In the new views, the readonly modifier is never overlooked, which
created a bug in the stock_picking_return wizard which was not
able to return products received from a po anymore. Basically the
value of the product_id field was not sent so the create crashed.

This commit introduces a new "force_save" modifier which is used
to express that we want to save the value of the field even though
it is readonly from a user interface point of view.
2017-07-28 08:29:12 +02:00
Christophe Simonis c39f7e4987 [FIX] mrp: force help message in unicode 2017-07-27 23:03:02 +02:00
Christophe Simonis 97bac8d64c [IMP] core: capture Warnings though logging 2017-07-27 22:35:47 +02:00
Khoi Nguyen 4e12edc023 [FIX] web: correct domain when using 'all' filters
Since the switch to the new views, 'all' filters such as "Everybody's
calendar" did not work as intended (activating the filter would
sometimes lead to fewer events being shown).
This commit corrects the way 'all' switches affect a domain.

More precisely, the conversion from filters to domain has been changed
in the following way.

- Ticking all visible checkboxes associated with a filter no longer
  means the same as ticking the 'all' checkbox. The former choice was
  particularly problematic when a filter only had one visible checkbox,
  in which case it was not possible to see the list of records
  only associated with that one filter.
- The conversion used to contain an impossible case in which we convert
  a filter into a 'not in' domain. All the related logic has now been
  deleted.
- Minor changes (renaming variables etc.) to make the code more
  readable.
2017-07-27 17:11:41 +02:00
amoyaux 62b8a05368 [FIX] purchase : procurement check fail if one move in cancel
Use case to reproduce the bug:
One procurement is running for a PO. Cancel one move in the picking and
create it again. Pass the picking in done.
--> The procurement stay in running state

It happens because the check method of procurement look if all moves linked
are in done state but in this case, there is one move in cancel and one
move in done.

This commit check instead if all move are in cancel or done and at
least one is in done state.

opw-753177
2017-07-27 16:00:21 +02:00
Nicolas Martinelli 66c22ab20d [FIX] crm: Leads Analysis report
The Leads Analysis report should filter on "Leads" by default.

opw-760265
2017-07-27 15:20:46 +02:00
Aaron Bohy 1efca8d073 [FIX] web_kanban_gauge: correctly render gauge widget
Before this rev., nothing was rendered when the 'gauge' widget was
set on a field (e.g. Sales > Leads Management > Team Assignation),
because the API of the fields in web evolved a lot recently, and
the rendering should now be done in a private function called
'_render', not 'render'.
2017-07-27 15:10:30 +02:00
Aaron Bohy c3691a79cb [FIX] web: grouped list: update row after edition
Grouped lists aren't editable. However, they may contain a widget
allowing the edition in readonly (e.g. priority, toggle_button...).
This is for example the case in Leaves > Reporting > Leave Details.

When the toggle button is clicked, the model is correctly notified
of the change, which is correctly sent to the server. However,
before this rev., the edited row wasn't redrawn in the grouped
list, so the former value of the boolean was still displayed.
2017-07-27 14:35:17 +02:00
qsm-odoo 71eddcd11e [FIX] website_portal: wait for tour to be ready
Commit 3d0cc2d6d2 introduced a new tour
but the test which launches it did not wait for it to be ready. For
unknown reasons, this seemed to never induce any problem... until now.
2017-07-27 14:31:42 +02:00
qsm-odoo 16f0e50318 [REF] web, web_editor, website: always let session load translations
Before this commit, the session object was responsible for loading the
translations in the backend only. There was then ugly code in web_editor
(which is also loaded in backend...) which was doing "if frontend then
load translations by myself". This code was also translating templates
while this is the qweb object's job. Now session is always responsible
for loading translation.

Note: the session object should be refactored/split.
2017-07-27 14:31:42 +02:00
rar-odoo 519ed866d7 [FIX] Stock account: product view (#18482)
In the group 'Stock valuation' the attr should hide the group when the preduct is a service OR if the valuation is manual (not real_time).

Currently the domain check AND, not OR.
2017-07-27 14:15:01 +02:00
Adrien Dieudonne e989d6333c [ADD] test_main_flows
This module defines tours meant to test some cross-app workflows in Odoo.

At this time, it contains a 'tour' that do some important tasks like:
- product creation
- sale order creation
- reordering rule
- invoicing
- reconciliation
- ...
2017-07-27 13:58:58 +02:00
Adrien Dieudonne 17a9e45566 [FIX] web_tour: tour_manager: choose option for select element
Before this commit, it was only possible to set an option with
his value.

For example:
<select name="test">
  <option value="1">One</option>
  <option value="2">Two</option>
</select>

The only way to set the first option was to do the following:
run: "text 1"

With this commit, we can now select the first option with his text value:
run "test One"

We need this because in 'main_flow_tour', some values are generated ids.
2017-07-27 13:58:51 +02:00
Adrien Dieudonne a71f223702 [FIX] web: InputField: don't re-render if dirty
Let's assume that we have a form view with a one2many field
displayed as a list containing two fields A and B (an input field,
e.g. a char field). An onchange on the one2many is triggered as
soon as A changes. This triggers a reset of the one2many which
thus redraws the corresponding line by resetting its widgets.

A problem occured when the user updated A, and directly (before
the onchange returned) updated the input field B, as in this case
the new value in B was erased when the onchanged returned, as the
widget was reset with its former value (or with the value returned
by the onchange, if any). Note that the model was aware of the
change on B, so the model and the UI were actually desynchronized.

This was quite hard to reproduce in practice, by hand, but it
occured in the tour testing 'the flow', in the form view of
account.bank_statement, with fields partner_id and amount of the
line_ids one2many.

With this rev., we don't re-render the input fields if there are
pending changes that haven't been acknowledged by the model.
2017-07-27 13:58:43 +02:00
Christophe Simonis e6b91eb55a [FIX] core: werkzeug 0.12 compatibility
Since werkzeug 0.12, the `BaseWSGIServer.__init__` method expect the
socket to be bound to determine the effective port it listen to [1].
Stop pretend to bind the socket and close it directly after use.

[1] see pallets/werkzeug@1fc28cbb30
2017-07-27 13:40:19 +02:00
Christophe Simonis 48c478513f [IMP] core: log address we listen on in multi-worker mode 2017-07-27 13:39:08 +02:00
Nicolas Martinelli 4fdfdb2f80 [FIX] mrp: domain in picking type
Limit the picking type domain to 'Manufacturing Operation'.

opw-760246
2017-07-27 13:21:53 +02:00
Dhaval Panchal a436645ae8 [IMP] l10n_*: Uniformize the reporting menuitems order and labels
Purpose
=======

Accounting reports are quite confusing for an accountant as the menuitems doesn't to have a clear structure.

Specifications
==============

Move all the localizations menuitems to the first position under `Reporting`

Put the `US GAAP` report menuitem items under the localizations and rename it accordingly
2017-07-27 11:39:52 +02:00
Géry Debongnie ecdcc65a90 [FIX] pad: force writing url, even if it did not change
Before this commit, the pad widget did not force the view to save the
current value, since it did not change (pad values are just the url for
the pad).  However, this is a problem for the server, since it uses the
fact that the web client forces a save to update the description field
in the model (get the data from the pad server and add it to the
database).

This was not a big deal when looking at the pad (the pad widget fetches
its data each time), but it is a problem that the database is not
synchronized with the current data.
2017-07-27 11:34:05 +02:00
Géry Debongnie 72ed3a153a [FIX] web,pad: record is not considered dirty when pad is loaded
The pad widget does something unconventional: it creates the pad url
only when rendering in edit mode.  This was done to prevent creating pad
by default for record in readonly mode.

Because of that, if the user clicks on create, then discard, the record was
considered dirty, so a confirmation modal popped up.  In this commit, we
just make sure that the initial setValue from the rendering does not
'dirty' the record.
2017-07-27 11:34:04 +02:00
Hiral Bhavsar a8a9dbe598 [IMP] account: Correct the settings display according to the enabled options
PURPOSE
=======

Clean accounting new settings.

SPECIFICATION
=============

- When a setting is not active, I don't want to see the green arrow sending back to the configuration part.
  Example : If I unactivate the follow-up levels, I don't want to see the green arrow "Follow-up levels" anymore
- Add checkbox to 'TaxCloud Connection'
- Also visible the label 'Fiscal Localization' and its text only if CoA is not set.
- Set '# of digits' always visible and relabel to '# of digits on accounts'. Also put it inside new setting 'Chart of Accounts'.
2017-07-27 11:31:26 +02:00
Aaron Bohy 3d6420d4b3 [FIX] web,*: display dashboard panel if no content
*board,crm

Before this rev., the dashboard panel (e.g. of the sales team
dashboard) wasn't displayed when there were no record to display,
whereas it should. Only the nocontent helper was displayed.

This was a bug introduced with the new view: the views' controller
was in charge to display the renderer (if there were data to
display) xor the nocontent helper. As the dashboard panel was
rendered by the renderer, it couldn't be displayed alongside the
nocontent helper.

This rev. moves this logic to the renderer. So now, the controller
always contains the renderer, which decides what to render (the
data or the nocontent helper). This way, the dashboards can display
their panel and the nocontent helper.
2017-07-27 10:59:08 +02:00
Christophe Simonis 8a1311bca1 [MERGE] forward port branch saas-17 up to 3d4238f71e 2017-07-26 23:35:06 +02:00
Christophe Simonis 3d4238f71e [MERGE] forward port branch saas-16 up to 98d3a08ebb 2017-07-26 20:36:23 +02:00
Christophe Simonis 98d3a08ebb [FIX] base: mute handled errors 2017-07-26 20:28:32 +02:00
Christophe Simonis 4f501348c4 [MERGE] forward port branch saas-16 up to 46e1104ce1 2017-07-26 19:55:44 +02:00
Christophe Simonis 46e1104ce1 [MERGE] forward port branch saas-15 up to 681f03e309 2017-07-26 19:41:57 +02:00
Christophe Simonis 681f03e309 [MERGE] forward port branch saas-14 up to c4e9b854ff 2017-07-26 18:47:54 +02:00
Christophe Simonis c4e9b854ff [IMP] core: log bad queries as ERROR
Also adapt default config and config mapping.
2017-07-26 17:46:20 +02:00
Pierre Masereel 8a497cdd5f [FIX] stock: quant: _update_reserved_quantity and negative quantity
If we have multiple quants returned when we want to decrease the
reservation of a move line, the min function will always return the
quantity passed in argument because 'reserved_quantity' is always a
positive number and quantity a negative one. This can lead to negative
reserved quantity on a quant, if the quantity to reserve on the first
quant is lower than the absolute value of the quantity to decrease.

To fix this, we correctly separate the behaviors for decrease and
increase.

We add a test that show the, now fixed, bug.
2017-07-26 17:23:55 +02:00
Simon Lejeune 2a0b158d44 [FIX] stock: move: _update_reserved_quantity
When a move line is reserved on multiple quants, we increased it with
the `taken_quantity` variable, which is used to know how much quantity
we try to reserve in total for this move, not what is available on the
quant.

The amount to increase is obviously the one returned by `stock.quant`
and is available in the loop.
2017-07-26 17:23:55 +02:00
Christophe Simonis e8d4a11e6e [MERGE] forward port branch 10.0 up to 0a089f87fb 2017-07-26 16:56:57 +02:00
Pierre Masereel 7a39ab50c5 [FIX] stock: move line: decrease reserved quantity
When we decrease the reserved quantity, the argument 'strict' must be
set to 'True', else we might unreserve quants of another move line.
This behavior has been lost in rev: https://github.com/odoo/odoo/commit/9bb696e13abcbf95c9552fab60b1dfb997afaa59

We introduce a test to show where an issue happened without this
patch: have tracked and untracked quants for the same product in stock,
reserve them and edit the untracked move line in order to set a lot to
it. The first step will be to unreserve the move line without lot, and
if we do not pass a Strict kw, stock.quant's `_gather` will return
quants with lot and unreserve on them. Everything is now inconsistent
and lead to issues upon validation.
2017-07-26 16:42:00 +02:00