Commit Graph
113351 Commits
Author SHA1 Message Date
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
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
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
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
qsm-odoo e1f9afebca [FIX] base, website_theme_install: review todo action order
Since https://github.com/odoo/odoo/commit/d1fc62df0b850c56360c1e5391c69eb807d0fe46:
When several ir.actions.todo are created, only the last one is
considered and the first are marked as done. Thus, there are never
multiple "open" todos at the same time (while before this, only the
first todo was done and the other ones were done on subsequent module
installations, which makes no sense).

The new system however broke stuff. Indeed, when installing the
eCommerce, we expect to land on the "Choose a Theme" page (if website
was not already installed). This was not the case anymore, as the
last todo in that installation is "Redirect to /shop". To fix the
problem, the system is changed to not consider the "last todo" but
"the todo with highest priority, or the last one if same priorities".
By making the "Choose a theme" todo high priority, this solves the
problem.

A better system would be to make todos depend on each other... but
that would be a task for master.
2017-10-19 18:25:42 +02:00
Olivier Dony f5df4fbca1 [FIX] P3: calendar: correct fwd-port of rev. 83024ca3d6
- simplify unicode handling for Py2 and Py3
- fix Py3-related bugs, such as passing bytes for context['tz'], making
  the conversion silently fail, or attempting to decode() a text
2017-10-19 18:19:08 +02:00
David Vidal 5d561ec934 [FIX] membership: optional dates
Fix comparisons with optional date field & replace previous fix which
would try to store `'0000-00-00'` in the database which is rejected by
postgres.
2017-10-19 15:51:39 +02:00
Dharmang Soni b23c5b2aa9 [FIX] web: prevent iOS from zooming in on input fields
When a user clicks on an input or a select field
in Safari on IOS, Safari has a behavior of zooming-in
on the field when the keyboard opens.
Even after the user dismisses the keyboard, the screen
still stays zoomed-in. The user has to then zoom out manually.

Now, the user is not allow to zoom-in at all.
This is already the case with the Android application.
We now have the same behavior between the two apps.
2017-10-19 14:33:14 +02:00
amoyaux 694436220f [FIX] stock: put in pack with UOM
When put a quantity in a pack the reserved quantity is
split between the original move line and the move line
for the pack.

However in order to compute the quantity left to do. The
system compare the quantity reserved in term of quant UOM
and the quantity done with the move line UOM.

This commit compare both fields in move_line's UOM.
2017-10-19 13:33:15 +02:00
Felix Yan 11a3d100c3 [CLA] signature for Felix Yan
Closes #20302
2017-10-19 10:26:20 +02:00
Joren Van Onder 41897f0dba [FIX] website: respect website.page date_publish
Before this public users could see pages before their
date_publish.

request.website.is_publisher is a function that always exists. So the
if body will never be executed. Additionally, is_visible is a
non-stored computed field that can't be searched. So instead grab all
records that match and filter the ones that are visible.

This commit closes #20296
2017-10-19 10:06:50 +02:00
qdp-odoo d2b5af9ba7 [FIX] account: some options should be available with the billing app only
As long as they involve objects usable in billing.
2017-10-19 09:50:34 +02:00
amoyaux 0cf3b12373 [FIX] sale: product is editable after invoice, picking, timesheet
Since procurement removal introduced by commit 0e4f3bb959
product is editable once picking, timesheet,... are created.
However if the user modify the product it will not be reflected to
the related downstream object.

Previously it checks if a procurement order was linked to the sale line
and thus make it readonly.

This commit reproduce the old behavior by using a computed field that
can be override in sale_x modules in order to block the product
change for defined object.
2017-10-19 09:44:07 +02:00
Christophe Monniez d38d62f5db [FIX] packages: install vc_redist files properly
Nsis installer was installing the wrong MS Visual C++ redistributable
file. Python 3.6 needs MS Visual C++ 2015 redistruibutable files.

Also, Nsis now differentiate Windows architecture for the nssm service
and the MS C++ redist.
2017-10-18 18:44:19 +02:00
Simon Lejeune f1d485db08 [FIX] sale_stock: invoice policy on delivered quantities
The created accounting entries have their debit/credit columns switched
because
  - they use the sign of the value to post to decide if it should be
    credit or debit
  - an out move always have a negative sign

As this code is always called on out moves, we can safely reverse the
sign when getting the price_unit of the move.

Fixes #20080
2017-10-18 18:05:26 +02:00
Wolfgang Taferner faff276e92 [FIX] sale, purchase: do not merge sale order and purchase order lines 2017-10-18 17:52:25 +02:00
Wolfgang Taferner ef592ffa3d [FIX] stock: make it possible to inherit easier in _merge_moves 2017-10-18 17:52:19 +02:00
Rémi Rahir 47b8887ff5 [FIX] iap_odoo: fix error general error raise
Errors that are not whitelisted are not managed correctly due to the jsonrpc behaviour in Odoo.

When we make a post in json using iap.jsonrpc function, it contacts iap.odoo.com.
However, if this url does not respond, it falls back to the 'typo' page and the answer to the call
has a '200' status code but with an 'error' key in its response.

Currently, we manage the errors via whitelisting, which hides this kind of errors.
We opted to raise this error (odoo server side) as a UserError and to add UserError to the whitelist.
2017-10-18 17:08:21 +02:00
Simon Lejeune 542b8fd550 [FIX] stock_landed_costs: fix rev 2222ab47e4
To get 48 entries, you need the anglo saxon accounting enabled.
2017-10-18 15:12:21 +02:00
Simon Lejeune 2222ab47e4 [FIX] stock_landed_costs: enable and adapt forgotten tests
stock_landed_costs.yml is adapted to validate the picking before
applying a landed cost on there. Applying a landed cost on a non
validated picking was never supported but the test fails due to
implementation changes in v11.

Due to this change, the last assert was wrong: indeed, applying a landed
cost on a delivered product creates 6 account move lines if anglo saxon
accounting is enabled. This case creates 4 landed costs on 2 delivered
stock moves, 4*2*6 == 48 account move lines.
2017-10-18 14:49:03 +02:00
Simon Lejeune e2db80d3b5 [FIX] stock_landed_costs: update price_unit
The value and remaining value fields were correctly adapted when a
landed cost was applied on a move, but not the unit price one. This is
problematic, as the product should indeed cost more.

To properly compute this value, we change the meaning of
`stock_landed_cost_value` which is now the total value of the landed
cost, not the prorated value of what is still in stock.

Also fix the computation of the quantity already delivered in case of
negative stock.

Fixes #19254
2017-10-18 14:49:03 +02:00
Lucas Perais 6c9e45576e [FIX] document: display create_date of attachment timezone aware (#20242)
Before this commit, when putting the mouse over an attachment in the attachment drop menu list, the date time displayed was UTC only.
After this commit, we convert that value to the correct timezone datetime.

OPW 776704
2017-10-18 14:25:22 +02:00
rde 4618cbd513 [FIX] website: new class to disable button after first click
Before this commit, if you had a simple link (just a href, not handled
in JS), you couldn't simply make it clickable only once.
This could be a problem in some cases. (eg: a btn creating a record, it would
create as many record as many times you clicked on it)
The same behavior could occur for link/button redirecting to a route creating a
record. There is a window of time between the click on the btn and the moment
the page is getting redirected.
You have time to click  multiple time on it and it would call the URL multiple
time.

Now, there is a class 'js_disable_on_click' that will be handled in
website_root.js and will disabled the button after the first click.

The fix was originally aimed to fix multiple click on "Create Page" btn on 404
2017-10-18 10:58:53 +02:00
HIRAL BHAVSAR 3285a0384c [FIX] mail: Wrong codepoint for angry emoji. 2017-10-17 17:23:30 +02:00
Xavier Morel d18b160505 [FIX] website_forum: properly read the faq
On P3, "text" IO (open(f, mode='r')) will default to the encoding
provided by locale.getpreferredencoding(False) which apparently is
regularly cp1252.

Replace by misc.file_open which enforces UTF-8 decoding in text mode.
2017-10-17 17:10:31 +02:00
jaredkipe d7cfa8c502 [FIX]: safe_eval’ing some large scripts yield illegal opcodes
Following the 3.6 wordcode change, EXTENDED_ARGS gets used for jumps
offset by more than 256 bytes (128 opcodes), most commonly
absolute (so many script of more than 128 opcodes with conditionals
arer going to trigger the issue).

In bytecoded Python versions, EXTENDED_ARGS was only necessary above
65k opcodes: the opcode would get a separate 16-bits argument, while
wordcode opcodes get 8-bit intrinsic.
2017-10-17 16:16:42 +02:00
Wolfgang Taferner c30f8c50a3 [FIX] stock, sale_stock: blocking a process twice due to cancelled moves 2017-10-17 16:05:53 +02:00
Xavier Morel 90d9605c86 [FIX] web: encoding issue with moment locales
I don't quite get how it can trigger on user systems (as it apparently
requires resetlocale() to fail to set up an UTF-8-encoded-locale
somehow, disabling resetlocale() is how I could get the issue
triggered on my system), but anyway it's apparently possible for Odoo
to run with an ASCII system encoding, and it turns out Python 3 will
not use UTF-8 everywhere but will rather use whatever
locale.getpreferredencoding(False) yields, which in theory could be
completely bonkers.

This is an issue when using text IO with an implicit encoding, which
is what load_locale (/web/webclient/locale/<lang>) was doing.

* Fix by using binary IO
* Fix (2) by using direct-passthrough IO with specified encoding, that
  way we let the WSGI server handle the file streaming

Fixes #20075
2017-10-17 16:04:35 +02:00
fda-odoo a0fcd5c781 [FIX] web: use "get_formview_id" when opening record from calendar view
Opening a record in a calendar view always showed the default form view when it is not a popup.
Example in CRM: opening an opportunity will always show a lead view.

The fix aims to use the "get_formview_id" method to find the right id of the view that must be shown instead
of using a default id.

opw-774272
2017-10-17 15:25:41 +02:00
qsm-odoo 541d2d736e [FIX] website: restore "Show Sign In" option
Splitting of website into website/portal made the "Show Sign In" option
disappear.
2017-10-17 13:47:14 +02:00
Wolfgang Taferner 61b63e9f81 [FIX] stock: only if the type was changed we should trigger an error
opw-776927
Closes #19973

Due to the fact that some products might be maintained in a module and
will write on the product on upgrade we need to take care that it will
allow to write not changed product types.
2017-10-17 13:43:24 +02:00
Yannick Tivisse 55af66dcda [FIX] mass_mailing: redefine the usable models in mass mailing
Displaying all the model is not readable for a common user. We should only display models that are fit to be used in a mass mailing campaign.
2017-10-17 11:58:51 +02:00
Laurent Smet c2f59f08c7 [IMP] base_vat_autocomplete: don't block the user with VIES service
- When the VIES service is unreachable/unavailable, don't raise an error.
- Set the timeout to 5 seconds instead of default 120 seconds.

-task: 35043
2017-10-17 11:21:58 +02:00
fwi-odoo 48c17fd360 [FIX] web: polyfill to make the list editable work in IE11
Internet Explorer doesn't implement 'contains' for document so we make a
polyfill for this method in order to be compatible.
2017-10-17 09:31:55 +02:00
Jérome Maes 81218a833c [FIX] sale_timesheet: access right when validate invoice
When validate an invoice, if you are timesheet
user and billing user, it is forbidden for you
to create an analytic line without a project set.
This commit allow billing user to create AAL.

opw-776391
2017-10-17 09:18:51 +02:00
Jérome Maes a9fd3f0f2f [FIX] sale_timesheet: rounding display on project overview 2017-10-17 09:04:49 +02:00
Jérome Maes a222afb7d4 [FIX] sale_timesheet: add onchange to set default value
When changing the type of a product to 'service' the
new service policy is empty by default, and should not
be !
2017-10-17 09:04:49 +02:00
alexkuhn 44b3491450 [FIX][P3] base, tools: prevent crash when importing translation .po file (#20191)
With Odoo v11 running on Python3:

1. Go to Settings -> Translation -> Import Translation
2. Choose a valid .po file (e.g. generated with the menu Export Translation)
3. Click Import
There is a server error.

There are two bugs behind this error:
1. we open a temporary file that cannot insert bytes ('w+')
2. the name of the temporary file is an integer (its file descriptor)

Python2 processed some implicit conversion between str and bytes, so that the 1st error doesn't occur. The name of a temporary file in Python2 is '<fopen>'.

We made the following corrections to the code:
1. open the temporary file with w+b access (write bytes)
2. enhanced a conditional statement so that we skip instructions in case where the field name of the tempfile is a string

Related Ticket:
opw-775445
2017-10-16 16:30:54 +02:00
Khoi Nguyen 3315c7c727 [REV] mrp: reallow quantity/lot/SN changes from work orders 'manager view'"
This reverts commit
https://github.com/odoo/odoo/commit/44f06a66467cb39780fa65d0cefb44704b072e94.

The reverted changes will be applied in enterprise/quality_mrp instead.
2017-10-16 13:54:31 +02:00
Martin Trigaux 912a7318d9 [FIX] mrp: clarify uncomplete message
When selecting the BoM type 'kit' the explanations were unclear
Courtesy of Erwin van der Ploeg, Odoo Experts

opw-776612
2017-10-16 13:44:11 +02:00
Khoi Nguyen 0958eee295 [FIX] web: Remove debugger
Introduced by
https://github.com/odoo/odoo/commit/9f7af9f9b742d08ca69a4d4d0b963f625c4b4bba

Sorry!
2017-10-16 13:10:25 +02:00
Khoi Nguyen 9f7af9f9b7 [FIX] web: ticking a checkbox in an x2many after onchange
This commits fixes a traceback that appears when ticking a checkbox in
an x2many which triggers an onchange. The root cause of the issue is
twofold:

- confirmUpdate requires currentFieldIndex to be defined, but might be
  needed when setting currentFieldIndex;
- confirmUpdate attempts to restore the selection range even if we are
  not dealing with a char field (e.g. checkbox).

We solve the issue by ensuring that _selectCell gives a temporary value
to currentFieldIndex. This value is chosen so that confirmUpdate calls
_selectCell with the right parameters. Moreover, we only restore the
selection range when the range is defined.
2017-10-16 11:34:39 +02:00
Khoi Nguyen bb692c76d4 [FIX] web: tab navigation with phone widgets in form view
This commit ensures that tab navigation works properly when editing a
form view that contains input fields with phone widgets. Previously,
pressing TAB would skip those fields.
2017-10-16 11:34:39 +02:00
Yenthe V.G 4f0d6f5ae1 [Requirements] FIX: Upgrade ebaysdk to 2.1.5 due to bug
Upgrade the dependency for ebaysdk from 2.1.4 to 2.1.5.
There was a bug in in 2.1.4 that prevented installing (see https://github.com/timotheus/ebaysdk-python/issues/223).
Closes #20148
2017-10-16 09:06:38 +02:00
Yenthe V.G 2e6f25580e [FIX] sms: add missing import for translations
This commit closes #20141
2017-10-13 19:07:02 +02:00
Simon Lejeune 57f03f40b9 [FIX] purchase: fix rev 7392e476b8
Force the company currency before playing with the rates.
2017-10-13 18:47:20 +02:00
Simon Lejeune 7392e476b8 [FIX] stock_account: always call _get_price_unit in _action_done of a move
It is possible that the price unit the move was created with is no
longer valid (for instance, one could change the price unit on the
purchase before validating the receipt, or the currency rate has changed
in the meantime).

Fixes #20035
2017-10-13 17:56:50 +02:00