Commit Graph
113480 Commits
Author SHA1 Message Date
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) 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
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
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
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
amoyaux 41d91e2c96 [FIX] mrp: update MO qty with by_product fail
Update MO qty compute the quantity already processed
but it includes the by_product moves.

This commit add a filter in order to only consider the
move with the final product.
2017-10-20 16:06:28 +02:00
amoyaux 1a09bcc622 [FIX] mrp: Handle by product tracked by SN/lot
Since mrp/stock refactoring by-product tracked
was not handled by the code. The best way to
handle it would be to add a section in the
product produce wizard. However we can't modify
the model in 11.0.

Thus this commit generate a move line for each by-product
but without lot/SN.

! This commit should be revert in future version once
the by product pass through the produce wizard
2017-10-20 16:06:28 +02:00
rde 0589ee8949 [FIX] base: prevent enterprise label to lose style on search
Before this commit, when you were entering search mode en settings view,
enterprise label would lose its style. (even when leaving search mode by
removing search text)

Now, the style remains.
2017-10-20 16:04:55 +02:00
Christophe Simonis e2532f855f [MERGE] forward port branch 9.0 up to 31c1be1fac 2017-10-20 16:02:12 +02:00
rde dd2a619ad5 [FIX] base, web, website: settings - prevent duplicate enterprise labels
Before this commit:
Multiple widgets for the same field on the same view (V11.0 settings) would not
retrieve the correct label but all of them.

Now:
We now retrieve the correct label instead of all of them
2017-10-20 15:58:24 +02:00
rde bdaa3b88e4 [FIX] website: settings-add enterprise label to website_version
Enterprise label was missing on website_version
2017-10-20 15:51:25 +02:00
rde 31c1be1fac [IMP] auth_oauth: prevent portal users to land on /web after login
Before this commit, a portal user would land on /web after login in with oauth.
He would then just see the "Website" app.
He should then click on it to land on website instead of landing directly on it
after login in, which is not convenient, especially since theses users doesn't
know Odoo (in case of sale customers manually created for instance).

Now, if users has no 'base.group_user' right, it will be redirected to the
website directly instead of /web.
2017-10-20 15:25:28 +02:00
Christophe Simonis 786b67ab49 [MERGE] forward port branch 9.0 up to c6a9bab074 2017-10-20 15:14:45 +02:00
Géry Debongnie 823cfd6ab1 [FIX] web: make sure m2m_checkbox works twice in a row
We had an interesting bug with the field many2many_checkbox: in some
cases, it could cause a crash, because it could not find an element in the
localdata.

To reproduce this, start with a non empty field many2many checkbox, then
uncheck them twice.

The reason is that the datapoint of type 'list' that represents the
current value is actually modified, and the replace_with operation
assumed that it could find the localID by looking into its data.  I have
the feeling that a more complete fix is to make sure that the datapoint
is not modified (in its 'data' key), but is modified in its '_changes'
key.  However, this would probably be a bigger change.
2017-10-20 14:56:37 +02:00
Nicolas Martinelli c6a9bab074 [FIX] account: tax included
- Create a tax included of 21 %
- Create a product sold 7.00, set the 21 % tax
- Add the product in a SO

Amount w/o tax: 5.79
Amount tax: 1.22
Total: 7.01

We defer the base rounding to the end of the method so that the rounding
doesn't impact the tax computation of included taxes.

Complement of 6e46ba7b46

opw-777221
2017-10-20 14:36:58 +02:00
Olivier Dony 78dcbdee6e [FIX] mail: correct typo in e5e549a4cf 2017-10-20 14:23:38 +02:00
Fabien Meghazi 3be3c6f532 [FIX] qweb2.js: fix erratic object type detection in foreach (Fixes #15655)
Could not add a test as the qweb js testsuite is broken and it's xml
test files have been modified in order to test qweb.py specific cases.
2017-10-20 14:04:46 +02:00
Martin Geubelle 2455350c40 [FIX] web: deal with date widget on datetime
This use case was not correctly managed as the function evaluating if the
value has changed compares datetime and date.

This triggered an issue if the widget `date` was set on the field `date_order`
on a purchase order for example ; it was not possible to create a record as
the datapoint was set `dirty`.

This rev. ensures that a `field_changed` is not triggered if the day is the same
on a date widget.

This rev. also adds support of `datetime` fields on date widget, which appears
to be a valid use case.

Fixes https://github.com/odoo/odoo/issues/20311
2017-10-20 11:25:32 +02:00
Martin Geubelle 1312ee72cf [FIX] web: correctly render the field image
Before this commit, the image was directly built without using the corresponding
template, which set some properties on the image (class, width, etc.).
2017-10-20 11:04:08 +02:00
Nicolas Martinelli 3e5189e628 [FIX] product: allow multiple values for same attribute
- Create a product attribute, e.g. 'Recommanded Age'
- Create several values for this attribute
- Try to associate more than attribute value to the same variant =>
  contraint which prevents to do it

We should allow this use case as long as the product attribute doesn't
create a variant.

opw-776344
2017-10-20 10:42:58 +02:00
Nicolas Martinelli e414bae770 [FIX] mail: company logo
- Activate multi-company, create companies A and B
- Set 2 companies on a user

When a message is sent (for example, thanks to the chatter), the
notification email always contains the logo of the same company,
whatever the company of the user or the company of the object.

This is a complement of commit 7a03f9ce93, applied to notifications.

Closes #20088
opw-772405
2017-10-20 10:41:24 +02:00
Jeremy Kersten ba6c0aa93e [FIX] website_slides: fix search_method for sitemap
871b969 change the way to convert domain to sql.
Before it, provide a  single value instead of a list/tuple works luckily.
2017-10-20 09:33:31 +02:00
Martin Trigaux e180a03af8 [I18N] base: export source terms
Now that 8f1d889e50 has been forward ported to 10.0
Add missing enterprise module description
2017-10-20 09:20:00 +02:00
Lucas Perais (lpe) e3f05496b1 [FIX] mail: fix template preview wizard view
Before this commit, when on a mail.template form, click on the Preview smart button.
A wizard popped up with two buttons, as the default for form views.
First this made no sense since the wizard doesn't represent a model that can be modified
Second, the button discard was unable to close the wizard.

After this commit, only a discard button is present which does its job.
2017-10-20 09:09:34 +02:00
Lucas Perais (lpe) af6baac9c7 [FIX] account, sale: fix notification templates inline style
Before this commit, Sale order and invoice notification email templates broke when doing any action on them (duplicating, open preview etc...)
This is because the model is saved during those operation, and the css style gets converted to inline style.
The table tag present in those templates, was wrongly associated with the bootstrap rule for tables, collapsing their border, hence the break of the templates.

After this commit, we force the borders not to collapse, and the templates don't break

OPW 774323
2017-10-20 09:09:04 +02:00
Adrian Torres 023b195eef [FIX] website_sale: don't unlink website_description
This is a hotfix/hack for a conflict between website_sale and
website_quote, on the field website_description.
The conflict happens when both modules are installed.

Fixes #20118
Completes rev 333a236
2017-10-20 08:44:49 +02:00
Christophe Simonis beed2d2ed9 [IMP] sale{,_stock}: do not mix indentation with tabs & spaces 2017-10-19 23:35:00 +02:00
Christophe Simonis a3b3bb2228 [MERGE] forward port branch 10.0 up to 9b4447e9aa 2017-10-19 23:16:39 +02:00
Christophe Simonis 9b4447e9aa [IMP] test_pylint: check for mixed-indentation 2017-10-19 22:33:37 +02:00
Christophe Simonis 4af5e03d80 [ADD] hw_proxy: do not mix indentation with tab & spaces 2017-10-19 22:25:31 +02:00
Nicolas Martinelli 7d7f1c46a4 [FIX] web_editor: crash
- Open Point of Sale > Configuration > Point of Sale
- Edit, change anything
- Save
- Crash
2017-10-19 21:30:01 +02:00