Commit Graph
113612 Commits
Author SHA1 Message Date
Simon Lejeune c8b2f5ca9e [FIX] stock: show detailed operations view
When enabling the unit of measures, it was not possible to save a move
line as product_uom_id is required in the model and readonly in the
view. We add the "force_save" attribute.

Courtesy of @lap-odoo
2017-10-31 15:48:10 +01:00
Martin Geubelle 81a5c1563a [FIX] web: FieldSelector: always keep first page
In the FieldSelector, after clearing the chain and closing the popover,
the very first page was removed from the widget `pages`. This was causing
issue when trying to select a new field again.

This commit ensures that the first page is not sliced.
2017-10-31 11:38:29 +01:00
Richard Mathot 78e46637a2 [FIX] point_of_sale: dead file 2017-10-31 11:05:18 +01:00
Fabien Meghazi df0cc479fc [FIX] doc: fix typo 2017-10-31 09:57:48 +01:00
Adrian Torres ba9381ed2a [FIX] base_import_module: display correct error
Previous to this commit, when importing a studio module with unmet
dependencies that were not studio the error message would just display
the Studio is required to install Studio customizations.

With this commit it should now correctly display the missing
dependencies by checking if only web_studio is in the set of unmet
dependencies

opw-777642
2017-10-31 08:22:59 +01:00
Deep Patel 0e9197c562 [FIX] website: bg element not found when using big parallax snippet
qsm:
This is because of multiple animations during edition (which is not
occuring afterwards). This is not supported, but as it does not break
anything, it can be kept as it is. However, we cannot access the
animation via 'snippet-view' anymore, which is fine as I am about to
deprecate it in master.
2017-10-30 17:35:02 +01:00
Martin Trigaux 0634b04a08 [CLA] correct dxFactory CCLA
opw-778925
2017-10-30 17:18:50 +01:00
Martin Trigaux 5309ac2876 [CLA] dxFactory signs CCLA
Done at opw-778925
2017-10-30 16:49:47 +01:00
xmo-odoo 8e1ab16441 [FIX] core: mode of output file for t9n export
trans_export has been decided to use a *bytes* output buffer as some of
the output formats are text-ish (e.g. po) but others are definitely
binary content (e.g. XML). Therefore, when calling trans_export with a
*file*, it needs to be open in *binary mode*.

Fixes #20555
2017-10-30 16:18:04 +01:00
Xavier Morel e8dc72fd69 [FIX] doc: handle unknown browser globals better
Before this, if a new global was added to JS code (module toplevel,
function bodies are not considered) it would blow up when attempting
to resolve variable refs & uses.

Make the toplevel scope a defaultdict such that if e.g. a "foo" is
looked up in a module but not a local variable of that module it's
assumed to be an UnknownNS object (from which further UnknownNS can be
deref'd).
2017-10-30 16:16:41 +01:00
qsm-odoo 9417afa4f6 [FIX] base: use email widget on contacts email fields
Before this commit, no widget was used which resulted in the emails
being able to overflow the kanban cards.
2017-10-30 14:14:44 +01:00
Webkul 467b800f5f [CLA] Webkul sing CCLA
Done at #20534
2017-10-30 13:20:10 +01:00
Nicolas Martinelli 185820e134 [FIX] google_calendar: P3 compat
In P3, `dict.keys()` returns a `dict_keys` object, which cannot be used
in a domain.

We convert to a list.

opw-779139
2017-10-30 12:37:18 +01:00
Odoo Translation Bot c7a51e69bc [I18N] Update translation terms from Transifex 2017-10-30 12:23:21 +01:00
Pierre Masereel 5e3b86b90c [FIX] stock,product_expiry: simple view of lots
When a lot is quick created, we don't want to be able to select a
product different than the one passed as default. So we have defined
where the product_id is readonly, and we still use the old view when a
lot is created from the menuitem lot.
2017-10-30 11:30:57 +01:00
Martin Trigaux c3bf1618bd [FIX] auth_signup: properly display the error message
Was "('Passwords do not match; please retype them.', '')"

Introduced at 676022e3
2017-10-30 11:19:00 +01:00
qsm-odoo 81fffdbdc4 [FIX] website: restore snippet animation API
Before the website refactoring, snippet animations were cleaned thanks
to the `stop` method. As those animations are now extensions of the
standard `Widget` class, the `stop` method was replaced by the standard
`destroy` method. This was tweaked so that the $el is not removed from
the DOM, but with proper cleaning of events. However, this changed the
way the `stop` method content has to be called. Indeed, we should be
allowed to call the `_super` method and then use the $el variable.
2017-10-30 10:46:22 +01:00
Yenthe V.G a9274dcd24 [FIX] stock: typo in UserError
Closes #20565
2017-10-30 10:41:03 +01:00
Martin Trigaux e1e3b5a56e [IMP] i18n: better terms and labels
add missing string labels
rephrase the error message
add missing _description
removed forward-ported hr_equipment.pot

was unclear, courtesy of the translators
2017-10-30 10:40:01 +01:00
Arnold Moyaux ec0234e12f [FIX] stock: location created with wrong company.
When creating a new company the system will generate a
new warehouse, its location and its routes.
However the default company is the company that the user is
using.
For example user is in company_1 and creates company_2 it will create:
'company_2: Receipt in 1 step' and the company_id on it will be company_1

This commit completes the dict for create routes  in order to introduce
the key for company_id instead of using default value.
2017-10-30 09:41:02 +01:00
amoyaux faa0616fc9 [FIX] stock, mrp, stock_dropshipping: location access right
Use case to reproduce the bug:
- Enable multi company and create a second one.
- Add both company to another user and give him stock manager rights
- Login on the second user and select as active the created company
- Go to product and create one
-> access right error on stock.location.route message.

It happens because the routes 'buy' is selected by default.
However the route buy when created use the default company
although it's generic for all companies.

This commit change the data in order to remove the company on
routes buy, mto, manufacture and drop_shipping. Since this commit
was released after v11 release, it could happens that already created
database still have the problem thus the solution is to remove
manually the company on the routes quoted above.

opw-777718
2017-10-30 09:40:55 +01:00
Christophe Simonis 1a93e8285a [FIX] website_mail_channel: adapt test 2017-10-27 15:12:50 +02:00
Christophe Simonis e918271f76 [MERGE] forward port branch saas-16 up to 8fdac4b6b2 2017-10-27 14:09:20 +02:00
Adrian Torres 2f0435f081 [FIX] tools: bad regex in mail.py
Before this commit, if comments were found inside the body of a mail
template sent through mass_mailing, the regex in append_content_to_html
that converts possible uppercase tags to lowercase tags would replace
comments by broken html elements, this would break the in-browser parser
and thus would show partial content or no content at all, depending on
the positioning of the comments.

i.e. from <!-- This is a comment --> to <this -->

The regex in question is r'(</?)\W*(\w+)([ >])' which basically matches
opening and closing tags (this was a bad idea from the beginning btw),
the \W* will match any non-alphanumeric chars (so !-- in the
case of comments) and this would be completely discarded since it's not
a match group and when replacing we only use match groups.

This is fixed by simply stripping the \W* since it's discarded anyway,
an alternative fix would be to put it in a match group and add it when
replacing as well, but I don't know if we purposefully discard it or
not.

Neither fix is the good one, the good fix is to replace all the re.subs
by lxml which is much easier and more concise.
2017-10-27 13:32:15 +02:00
Cedric Snauwaert 8fdac4b6b2 [FIX] account: payment blue lines in reconciliation were in wrong column
The problem was because in case of payment we take the abs value which should not be the case.
2017-10-27 12:29:57 +02:00
Géry Debongnie c163351e8a [FIX] web: revert to previous state when onchange fails
When an onchange fails (for example, because the onchange python code
raised a ValidationError, it is convenient to revert the form view to a
valid state, which is the previous state.

To do that, we keep in the _applyChange function the initial state, and
restore it in the case the onchange fails.
2017-10-27 11:49:19 +02:00
tbe-odoo e51fa63bda [FIX] website_quote: Do not generate invoices twice
- When paying with stripe an error occurs because of a callback generating the invoice for the SO which is called now automatically by the payment system
2017-10-27 11:45:50 +02:00
tbe-odoo 7c639be4aa [FIX] payment_stripe: fix stripe payment form
- Before this patch, stripe doesn't get displayed.
    It was a bug related to the fact that stripe doesn't respect how the generic payment form works.
    So to make it work, we were relying on small hacks that got broke by changes on the payment form.
    To fix the bug we are no longer adding an event to the pay button of the payment form, instead
    we listen all the changes made to the DOM and detect if a form with an attribute 'provider' set to
    'stripe' is added.
    If so, we open up the Stripe payment form.
- Fix ACL issue when trying to pay with Stripe on eCommerce without being logged.

Closes #20202
opw-776200
2017-10-27 11:45:25 +02:00
Géry Debongnie 416f8f6316 [FIX] web: mock server should add a __last_update field
A recent fix in web changed the field FieldImage to make sure it also
loads a __last_update field.  This is fine, except that a test in
enterprise (web_clearbit_tests) was using a field image, and failed
because it could not find the __last_update field in the demo data.

With this commit, we make sure that the mock server is always aware of
the __last_update field.
2017-10-27 11:04:40 +02:00
Thibault Delavallée 9b4688b043 [FIX] account: avoid double logging of messages when sending by email
'Invoice sent' custom notification was added to the invoice when user
send it by email. This is not necessary as the invoice email should
be displayed in the chatter. This commit also cleans the mail composer
override because context keys were added in a strange way.
2017-10-27 10:36:12 +02:00
Thibault Delavallée 481140084b [FIX] website_quote: authorized payments should not be displayed as errors on customer portal 2017-10-27 10:36:12 +02:00
Thibault Delavallée c59597f5e0 [FIX] (account, sale)_payment: fix s2s on not existing document
Returned error was not correct as just browsing an ID that
does not exist is not sufficient. We should use exists.
2017-10-27 10:36:11 +02:00
Thibault Delavallée b72b10c191 [FIX] (account, sale)_payment: fix URL generation in payment
Redirections are not correctly computed when the error or success urls
already contain some query parameters, like the access token. We now
use a function added in portal module that correctly computed the
redirection using standard werkzeug methods.
2017-10-27 10:36:07 +02:00
Thibault Delavallée 4cc8516840 [FIX] account_payment: fix class inheritance
Inherit from account portal class and not the basic customer portal.
2017-10-27 10:35:53 +02:00
Christophe Simonis 4873aeb501 [MERGE] forward port branch saas-15 up to 991ba1d861 2017-10-26 20:07:36 +02:00
Christophe Simonis 991ba1d861 [MERGE] forward port branch saas-14 up to a2890c1e76 2017-10-26 19:36:23 +02:00
Christophe Simonis a2890c1e76 [MERGE] forward port branch 10.0 up to bbc226cd6c 2017-10-26 19:03:19 +02:00
Christophe Simonis bbc226cd6c [MERGE] forward port branch 9.0 up to 809aaf9e7b 2017-10-26 18:33:33 +02:00
Jeremy Kersten 809aaf9e7b [FIX] website_event: avoid double subscription
Before this commit, you was able to double click on the button when
are in registration flow. In this case, you subscribe 2 times and so
take 2x more seats, what can be annoying when you have a limited room.

In the same time, we fix the form in the form that generate
strange behaviour like some events not bubbled correctly.

The attendee form (into the modal) was inside the registration form.
$'attendee_form).on('submit') obviously failed due to this bad dom.

This commit closes opw-778191
2017-10-26 17:52:21 +02:00
Christophe Simonis 7a03426826 [MERGE] forward port branch 9.0 up to ab9b5a13e4 2017-10-26 17:47:49 +02:00
Denis Ledoux ab9b5a13e4 [FIX] l10n_ca: default stock input account for products categories
Since Odoo 8.0,
the default stock input account for product categories
in the Canadian localization is set to
`214100 CANADA REVENUE AGENCY`

This is the case since this commit:
https://github.com/odoo/odoo/commit/13dacd11c10dac853def763432829b8976604a7d#diff-2e65e26a4efc4ab95e72dbe2033141ecL294
In which the account with the XML ID 2141_en
214100 Stock Received But Not Billed
has been renamed
214100 CANADA REVENUE AGENCY

In this very same commit, the account "Stock Received But Not Billed" has been moved to the account 217100,
under the XML ID chart2171_en:
https://github.com/odoo/odoo/commit/13dacd11c10dac853def763432829b8976604a7d#diff-2e65e26a4efc4ab95e72dbe2033141ecR447

While the default value for the products categories stock input account remained the same, the account with as code 2141:
https://github.com/odoo/odoo/blob/8.0/addons/l10n_ca/account_chart_template_en.xml#L8

This is an oversight. It was not meant that way. The default stock input account for products
should well be "Stock Received But Not Billed".

In addition, a stock account is supposed to be of type assets, and not of type liabilities.

I contacted @max3903, who was a contributor of the l10n_ca localization,
and who is therefore a better expert than me regarding the Canadian localization.
He confirmed me all the above findings.

opw-775413
2017-10-26 17:31:25 +02:00
Martin Trigaux 8318c38966 [IMP] mrp: clarify help message 2017-10-26 16:19:31 +02:00
Denis Vermylen 9dee7d1e58 [FIX] sale: pricelist without_discount included taxes
When having a product with included taxes that are changed/removed with
a fiscal position, the price changes depending on if the pricelist's
discount_policy is with_discount or without_discount.

This commit aligns the without_discount behavior to the with_discount
behavior.

Note: the behaviour isn't 100% correct. The applied discount will be
      computed on the list_price, instead of the tax excluded
      list_price. If a price_surcharge is set, it will be wrong.
2017-10-26 16:11:55 +02:00
Denis Vermylen a44954b625 [FIX] sale: pricelist recursion in without_discount
Supplements https://github.com/odoo/odoo/commit/0d56dca

When basing a pricelist on another pricelist in different currency
conversion was not being made correctly, since commit https://github.com/odoo/odoo/commit/6b3a808
that changes the pricelist_item on which the currency_id is set in
_get_real_price_currency.

Also align the _get_display_price's base_price to the
_onchange_discount's new_list_price in the case where the pricelist
depends on other pricelists that are in without_discount mode as well.
2017-10-26 16:11:55 +02:00
Benjamin Willig (ACSONE) e653798d5c [FIX] hr_expense: allow inheritance when adding followers (#20319) 2017-10-26 16:01:56 +02:00
Pierre Rousseau b80b13a572 [FIX] l10n_fr_fec: change EcritureNum
opw-777652
2017-10-26 15:54:04 +02:00
Goffin Simon 5082dc55d5 [FIX] stock: 500 error when clicking on WH/OUT on portal
When clicking on WH/OUT  in a SO as portal user in My Account on the website,
it raised an 500 error if the product in the SO is not published on the website.

opw:777708
2017-10-26 14:13:16 +02:00
Jérome Maes 1f62c210a9 [FIX] sale_timesheet: fix multicurrency for invoice and to invoice amount
Convert all amounts into the currency of current
user.

opw-777514
2017-10-26 14:11:32 +02:00
Olivier Dony d9b721c805 [FIX] server: avoid partial HTTP responses in worker mode
Python 3 (before 3.6) is affected by outstanding issue 24291:
 https://bugs.python.org/issue24291

In Python 3.6 the issue is gone thanks to this patch:
 https://bugs.python.org/issue26721

The base StreamRequestHandler class does not properly deal with raw IO
output streams. This affects most HTTP servers that use it, including
werkzeug. It causes large HTTP responses to be truncated when the
output socket is unbuffered and in non-blocking mode.
This is the case in multi-process mode (workers > 0) due to the socket
timeout configured to avoid worker deadlocks.

Typically, large file downloads (2MB+) and large JSON responses will be
truncated and cause corrupted files or errors on the client side.

As a workaround, we turn on the buffering on the output stream by
default in multi-process mode (it is already turned on for the input
stream) when running on Python 3.5.

See also the socket.makefile() method and the docstring of
`socketserver.StreamRequestHandler` at
https://github.com/python/cpython/blob/dcb101e7f078f12fc3d2bf1730410798a880bfe3/Lib/socketserver.py#L707

Fixes #20158
opw-777120
2017-10-26 12:58:22 +02:00
rde f435267680 [FIX] website_quote: missing args on route throwing error
Before this commit, trying to pay a sale order from portal would throw an
error

 * create an order in back end, set a partner, a product, a quotation
   template and 'Online Payment' as Confirmation Mode;
 * confirm the order;
 * go to the order in portal (/quote/XX) and click on 'Pay Now';

It throws a server error because route is being called with unexpected
keyword arguments like success_url, error_url, callback_method.
2017-10-26 12:54:38 +02:00