Commit Graph
117156 Commits
Author SHA1 Message Date
Christophe Simonis 9aa5f7e3d9 [MERGE] forward port branch 10.0 up to 82f00af29c 2017-10-24 11:58:33 +02:00
Martin Trigaux a93c8616cb [I18N] Update v11 translation source terms 2017-10-24 11:19:01 +02:00
Nicolas Martinelli 26c44130fb [FIX] l10n_co: partner without VAT
If the user removes the VAT number of a partner, `len(partner.vat)`
crashes since `partner.vat` is a boolean.

opw-777757
2017-10-24 11:16:19 +02:00
Christophe Simonis 82f00af29c [MERGE] forward port branch 9.0 up to 7bd8f9a5b2 2017-10-24 11:13:46 +02:00
Nicolas Martinelli d72b109b6f [FIX] point_of_sale: image instead of image_medium
The image of the form view is set to be `image_medium`. However, the
method `image_resize_images` which is called during create or write
won't resize the image provided.

Therefore, the `image_medium` is not resized, leadnig to potential
issues if the user uploaded very large images.

We change the view to `image`, so that all images are properly resized.

opw-776943
2017-10-24 11:05:13 +02:00
Nicolas Martinelli 08dfbab137 [FIX] point_of_sale: do not preload image catgories
This is actually not necessary since the image is retrieved thans to
`get_image_url`.

opw-776943
2017-10-24 11:05:13 +02:00
Jérome Maes 7fe7439c32 [FIX] sale_timesheet: generated task should be non assigned 2017-10-24 10:51:56 +02:00
qsm-odoo 7bd8f9a5b2 [FIX] web_editor: replacing selected text in a hierarchy on Firefox
When following these steps on Firefox:
- Select all text in a bold link (triple click)
- Type some text

The typed text did not replace the selected text but was instead put
at the front of it.
2017-10-24 10:50:18 +02:00
Thibault Delavallée 4cb63567f0 [FIX] mail: fix popup using partner when custome is more user-friendly 2017-10-24 10:26:23 +02:00
Thibault Delavallée 5d963d0c68 [FIX] phone_validation: add missing spaces in help message 2017-10-24 10:26:23 +02:00
Thibault Delavallée 55568164e8 [FIX] project: fix display of project kanban reporting menu
Fixed issues

 * Tasks link redirecting to a Task reporting view not allowed
   to project user; link is not available only for project
   managers;
 * Whole : trigerring the menu that should be displayed only
   for project managers as it is displayed empty otherwise;

This commit is XMO approved.
2017-10-24 10:26:23 +02:00
Goffin Simon 6babbbbbc8 [FIX] stock_account: Anglo Saxon Accounting and Vendor Bills
In 9.0 and 10.0 if anglosaxon accounting is active, creating a vendor
bill should generate the following entry :

Debit:Stock Input
Credit:Payable

But due to this fix: e9d6dcf16f

Debit:Expense
Credit:Payable

This reverts commit e9d6dcf16f to keep the same behavior in 11.0.

opw:777837
2017-10-24 10:09:45 +02:00
Laurent Smet 9bf4b70287 [FIX] account: fix price included taxes in reconciliation widget
Suppose a bank statement of 11$ and a tax 10% price_included.
The result shown by the reconciliation widget is

 D | C
11 |
   | 10
   | 1

that is correct. However, after clicking on validate, the result is

 D | C
10 |
   | 9.09
   | 0.91

because the taxes are recomputed python-side and the values of the account.move.line are
amount = 10, tax_id = 10% incl. Then, the tax is recomputed on 10 instead of 11$.

-opw: 776644
2017-10-24 09:14:48 +02:00
Joren Van Onder 33d20a2241 [FIX] point_of_sale: allow negative prices again
5afb5ecd04 rewrote the tax computation
in both account and point_of_sale to fix complex tax computations but
it no longer allowed negative prices in the point of sale.

opw-778013
2017-10-23 14:57:17 -07:00
Joren Van Onder 47c0cfc6e7 [FIX] point_of_sale: don't redeclare sign
var is function-scope (not block-scope) so this happens to work, but
it's confusing.
2017-10-23 14:57:08 -07:00
Aaron Bohy 58ed404a32 [FIX] web: editable lists: partial backport of 3b70961 2017-10-23 16:49:19 +02:00
Aaron Bohy c3a7037afd [FIX] web: restore scroll position when leaving form views
For instance, open a list view with enough records so that there is
a scrollbar, scroll, open a record of the bottom of the list and go
back using the breadcrumbs: the scroll position should be restored.

Before this rev., it wasn't the case: the scroll position was reset
to the top of the list (i.e. to 0).

This was due to the form renderer which manually triggered the event
DOM_updated on the main bus to ensure that textareas were correctly
autoresized. However, this wasn't done at the right place, and it
impacted the way scroll positions of views were saved/restored.
Indeed, this was only necessary when switching from readonly to edit
mode, i.e. when the form view was actually already in the DOM, but
not at each rendering as they may be performed outside the DOM (and
in this case, the DOM_updated event is triggered by the view_manager
when the view is really appended to the DOM).

Note that this whole scroll mechanism relying on the DOM_updated
event will probably change soon in master, with the refactoring of
the upper part of the webclient.
2017-10-23 16:49:19 +02:00
Andrew Latham cd5f61df6d [FIX] setup: typo in command line
Sign CLA

Closes #20321
2017-10-23 16:37:27 +02:00
Nicolas Martinelli 148cde0695 [FIX] l10n_ch: typo on data 2017-10-23 16:15:18 +02:00
Lucas Perais (lpe) 9e3c723c19 [FIX] account: fix rounding of taxes in invoices
Set the round_globally method on the company.
Have an invoice with several lines and some of them having two (or more) taxes.
See the OPW 775501 for exact numbers.
It is a practical example case where
round(0.003 + 0.004) = 0.007 ~ 0.01
BUT
round(0.003) + round(0.004) ~ 0.00 + 0.00 = 0.00

Before this commit there could be a difference between amount_residual and amount_total on invoices.
This was because the two amounts are based on something different:
AMOUNT RESIDUAL
It computed in function of account_move_lines of the invoice.
For such an invoice the structure of those lines would be 1 line per tax + 1 line in the receivable account
Here the amount tax of each line is rounded before the addition.
In summary, the total amount of each tax are rounded and then added to each other

AMOUNT TOTAL
It is computed in function of the on-the-fly computation of the taxes with two cases:
- round per line: obviously each invoice_line gets its taxes rounded before addition, which isn't problematic as regards to the previous paragraph
- round globally: Here lied the problem. the rounding of the tax_line_ids was made **after** each tax amount was added to each other, which contradicts the above argument

After this commit, we round tax_line_ids before their addition, it is rather logical and matches the expectation one can have reading the tooltip of the rounding method field
>> If you select 'Round per Line' : for each tax, the tax amount will first be computed and rounded for each PO/SO/invoice line and then these rounded amounts will be summed, leading to the total amount for that tax.
If you select 'Round Globally': for *****each tax*****, the tax amount will be computed for each PO/SO/invoice line, then these amounts will be summed and eventually ***this total tax amount*** will be rounded <<

OPW 775501

After this commit, it is expected that the behavior of sale.order and purchase.order won't be the same as the invoice in the same conditions.
See PR #20349 for an explanation
2017-10-23 16:08:15 +02:00
Lucas Perais (lpe) cf3235e134 [FIX] account: get correct values when switching chart of account
Before this commit, switching chart of accounts (namely from SKR03 to SKR04 in german accounting), "old" values of the res_config_settings were kept, including default taxes.
These default taxes being inexistent in the target chart of account, the installation crashed.

After this commit, the installation succeeds as the wizard responsible for the installation is updated

OPW 777217

closes #20323
2017-10-23 15:59:32 +02:00
Raphael Collet c7d1466996 [FIX] mail: prevent action type "add followers" on a non-mail-thread model (#20386)
OPW 777454
2017-10-23 14:51:32 +02:00
Ayman Nedjmeddine 5f0b7942d5 [FIX] base: Add filter names
To be able to use xpath on it

Closes #20305
2017-10-23 13:44:14 +02:00
Ayman Nedjmeddine d0e71fccf8 [CLA] IOAyman's signature
Done at #20305
2017-10-23 13:43:33 +02:00
Christophe Matthieu b2327b8bf0 [FIX] web: reduce the number of changes when use handle widgets 2017-10-23 12:18:29 +02:00
Christophe Matthieu 512113b78a [FIX] web: reordering lines using the handle widget triggers onchange
issue: When reorder each line trigger an onchange on the line (if they are an
onchange linked to the field) and one onchange per line on the parent.

Adding an option doNotNotifyChange to avoid the trigger on the parent.
2017-10-23 12:18:28 +02:00
Odoo Translation Bot 1d3a29eb7b [I18N] Update translation terms from Transifex 2017-10-23 11:49:37 +02:00
Richard Mathot b2e7a38d74 [FIX] doc: some changes due to Odoo 11
* Gantt view definitions have been changed
* reports call different templates than Odoo 10.0
* XML-RPC and JSON-RPC examples migrated to Python 3
2017-10-23 11:45:05 +02:00
Géry Debongnie 9898c49754 [FIX] mail: prevent pos tour from sometimes failing
Here is what could (sometimes) happen in community:
- the point of sale tour is started by the runbot
- it loads the '/web' url
- this instantiate the mail client action (init)
- the tour sees that the POS link is in the dom and clicks on it
- the action manager destroys the discuss client action (before its
  start method is called)
- the destroy method from the client action is called, this.$buttons
  is not set, the destroy method causes a traceback
2017-10-23 11:15:11 +02:00
Géry Debongnie 6182053c5a [FIX] mail: prevent pos tour from sometimes failing
Here is what could (sometimes) happen in community:
- the point of sale tour is started by the runbot
- it loads the '/web' url
- this instantiate the mail client action (init)
- the tour sees that the POS link is in the dom and clicks on it
- the action manager destroys the discuss client action (before its
  start method is called)
- the destroy method from the client action is called, this.$buttons
  is not set, the destroy method causes a traceback
2017-10-23 11:12:55 +02:00
Goffin Simon f3691b5354 [FIX] website_sale: Pay Now Button is Clickable even without clicking policies and conditions
The button "Pay Now" is clickable by default. So each time a new delivery carrier is selected,
the button "Pay Now" will be cickable when the delivery carrier is updated.

Before the fix, the button "Pay now" was available even the checkbox "Policies and conditions"
were not checked because the deleted code was applied after the one checking the policies and conditions.

opw:771418
2017-10-23 11:05:28 +02:00
Martin Trigaux 0ad610672b [I18N] remove fuzzy es_DO translations
Forward ported from 9.0
Fuzzy translations were made in the past as a (bad) attempt to reuse
translations of other versions.

Fixes #20371
2017-10-23 10:23:09 +02:00
Josse Colpaert d62b307597 [FIX] mrp: unlink temp stock move lots when updating quantity to done qty
You start with an MO with a quantity of 2 with routing and we
produce just 1.  At least one of the components is tracked by lots.
When we update the MO to a quantity of 1 again, the temporary
stock.move.lots continued to exist which led to processing a the consume
d move of e.g. 1 piece with 2 pieces of the quants processed when
posting inventory.

A test is added in order to avoid this case

opw-767526 and opw-772786
2017-10-23 10:15:47 +02:00
Josse Colpaert 0038bf43f2 [FIX] mrp: avoid inactive move lots validation as a safety
We try to avoid to take the inactive move lots.  While they are normally
already filtered through the split, we had a case when you update the
quantity of the mo, that the split would not separate them.
2017-10-23 10:15:47 +02:00
Richard Mathot f117233565 [FIX] website_sale_delivery: display error when choosed carrier is not available
Also improve display on small screens: text that is too long is
automatically cropped.
2017-10-23 10:13:47 +02:00
Rémi Rahir d70518d04f [FIX] iap: py2 compatible version of previous fix
Applying a proper way to deal with bytestring /byte correspondance in python2/3 respectively.
fixing non retrocompatible code introduced in e9b969b39d
2017-10-20 20:34:16 +02:00
Christophe Simonis 10128fa7e8 [MERGE] forward port branch saas-16 up to dc2a6c6cd2 2017-10-20 19:27:04 +02:00
Olivier Dony dc2a6c6cd2 [FIX] mail: shorten bounce message for sender 2017-10-20 18:40:46 +02:00
Olivier Dony 68bef91d73 [FIX] P3: mail: message parsing must return native strings
There was a leftover explicit conversion to bytestrings during the
parsing of HTML email parts.

This translated into a parse result with `msg_dict['body']` as a `bytes`
instance in Python 3, instead of the expected text type.

Coercing the result of etree.tostring() with UTF-8 encoding to a
native string should preserve the semantics in both Python versions
without this side-effect.

+ simplify another instance of native string use
2017-10-20 18:40:22 +02:00
Rémi Rahir e9b969b39d [FIX[ iap: encoding of Qweb render
The Qweb render method returns a strign encoded in byte.
As we want to dump this into a json string in iap.charge,
we need to decode it properly in UTF-8, before the dump.
This problem appeared in Python3.
2017-10-20 18:02:39 +02:00
Christophe Simonis 5ea0f55d65 [MERGE] forward port branch saas-15 up to bee0c11ef7 2017-10-20 17:57:21 +02:00
rde 3351d2acc0 [FIX] website_sale_stock_options: set max qty only if inventory_availability is always/threshold
Before this commit, the input quantity would have a max qty attribute set even
if the product was not set as check inventory (inventory_availability set to
always or threshold).
  - Set inventory_availability to never in a product
  - Order more than 1 quantity
  - The sale option popup will set input quantity to 1

Now, it will check and force max quantity only for product with threshold or
always as inventory_availability.
2017-10-20 17:37:22 +02:00
Christophe Simonis bee0c11ef7 [MERGE] forward port branch saas-14 up to f3ac68ed29 2017-10-20 17:24:15 +02:00
rde c912596deb [FIX] portal, website_sale: portal label style was in website_sale
Before this commit:
The style of the Optional labels in portal's form was written in website_sale
module.
Problem is portal can be installed without website_sale.

  - Install website module
  - Go to /my/account
  - Every labels are in bold as if they were mandatory

Now:
Portal's optional label's style is in portal module.
2017-10-20 17:15:22 +02:00
Géry Debongnie 635572b49d [FIX] web: properly handle failures in onchanges
With the new views, we mainly focused on making them work.  But we also
need to be able to handle unusual cases, such as some RPC failing.  An
example of such a problem was the following:

- a form view with a one2many with an onchange
- edit mode, change a field in the one2many, click elsewhere
- the onchange triggers, calls the server
- it may happen that the server fails with a ValidationError
- the onchange deferred fails, the line in the one2many is restored to
  the value known by the list renderer, which is the previous value (but
  the new value was applied to the model)
- we now have a 'corrupted' state: clicking on save will send the
  invalid value, even though the UI displays the previous one.

We solve this problem in this commit by making sure that the onchange
deferred returned by the _performOnchange always succeed (or stays
pending).  If the rpc fails, the deferred will succeed with an empty
dictionary.  This means that the list renderer will be updated with the
value from the model.

Note that it may not be intuitive that a failure in the onchange is not
seen as an error from the perspective of the _performOnChange, but I
think that it still makes sense:
- the validation/network errors are not really a concern of the UI. The
  UI just display the values entered by the user.
- if an onchange fails (for example, because of a coding error), we do
  not really want to prevent the user from working.

Also, when the onchange is performed, the initial change was already
applied to the local data.  Rollbacking them would be a more difficult
task.

Note that we also improve the mock server in this commit, to allow
mocking failures.
2017-10-20 17:14:10 +02:00
Géry Debongnie fd65dbaa1f [FIX] web: session.get_file should return a value
The session get_file method should return the value from the
ajax.get_file method, otherwise we lose information (this is necessary
to be able to react properly to the fact that the download was blocked)
2017-10-20 17:14:10 +02:00
Jeremy Kersten 6709118525 [FIX] website: apply padding on dashboard even if no data 2017-10-20 16:51:52 +02:00
Jeremy Kersten e5ff47df58 [FIX] website_sale_wishlist: manage warning in return value
Similar to https://github.com/odoo/odoo/blob/11.0/addons/website_sale/static/src/js/website_sale.js#L173

It is particulary interesing when website_sale_stock return warning.
Until now, the end user had no info about the failed add_to_cart
2017-10-20 16:27:41 +02:00
Christophe Simonis f3ac68ed29 [MERGE] forward port branch 10.0 up to e2532f855f 2017-10-20 16:09:28 +02:00
amoyaux f6c89de81e [FIX] mrp: finished move lines view does not show lot
The stock_move_line view for finished product on MO was
the classic one which shows lot_name and other useless stuff

This commit improve it by using the lot_id instead and a new
view that only contains relevant information for the end user.
2017-10-20 16:06:28 +02:00