Apple devices have a patented feature called rubberbanding that allows
the user to scroll past the end (or beginning) of a document. Browsers
on IOS have this same feature.
This is not an issue most of the time. But sometimes the rubberbanding
happens to the entire document.body of the POS, which is not
ideal. Rubberbanding is already disabled partially by
Chrome.disable_rubberbanding(). But it is not perfect. The most
important issue that remained is what happens when a scrollable element
is either at it's top or bottom and the user *initiates* a scroll past
its beginning or end. So scrolling an element all the way to the top and
then continuing to scroll did not trigger the problem. If however the
element was already at the top and you would initiate a scroll up the
scroll would fall through to the document instead and the entire POS
would scroll.
What aggrevates the issue from a UI point of view is that as long as the
rubberbanding animation is not finished, any subsequent scrolls will
target the entire document as well. Normal treatment of scrolling
resumes only when the animation has finished and the document is in the
center of the screen again.
Stopping this behavior is not trivial. The only know solutions are all
built around stopping touchmove events, which we already did.
This patch makes it so that we also stop all touchmove events that
trigger the unwanted behavior described above. It ensures that we stop
touchmove events that would scroll an element above it's top or below
it's bottom. To do this we have to manually determine whether or not the
element is scrolled all the way to the top or bottom and we have to
manually determine the direction the user is swiping.
The price displayed on the event page is the
`event.ticket`.`price_reduce` field,
which is basically the ticket price(`event.ticket`.`price`)
minus the possible discount applied by the pricelist
Nevertheless, the price asked when ordering the ticket,
in the cart/checkout, was the `ticket.price`,
without the possible discount from the pricelist, therefore.
The price asked for the ticket was therefore different than the price displayed.
To reproduce:
1. Settings > Sales > Use pricelist
2. Sales > Configuration > Pricelist > Public Pricelist > Apply a 20% discount (-0.2)
3. Go to /event, -> Conference on Business Applications
4. Order 1 of each
5. Notice that the price asked is 800€ and 1200€ instead of 1000€ and 1500€ respectively
6. Hit Order now -> Notice that the price in the cart are the price without the discount
opw-665540
Quants should never be changed or deleted by a user.
We make it not possible anymore in the views.
And also in the code we avoid to unlink without
passing a specific key in the context.
(as we still need to be able to delete quants in case of
negative quants reconciliation)
On iOS (at least version 8.3 and up), both Chrome (at least 47 and up)
and Safari emit ghost clicks [1] that added the product normally
rendered under the table widget to the order. So when selecting a table
without any orders you would end up with the table selected, and the
product under the table in the order after just tapping the table.
The issue is that on the table selection screen we listen to touchend
events. On the product selection screen we listen to click
events. Mobile browsers will usually emit both, first the touchend
event, then a small delay, and then the click event. The small delay is
platform dependent. Also, depending on a bunch of circumstances,
browsers adjust this delay time (see [1] for more info).
On Android this never caused issues because there the click is fired
pretty fast after the touchend and more importantly, the click event
still has the table widget as it's target. We don't listen to click on
the table widget so it gets correctly ignored.
On iOS there is a longer delay, and the click event is emitted with
whatever target is currently under the coordinates of the click.
In order to stop this from happening we'll just bind to click when not
editing. When we are editing the floor layout we'll do what we did
before.
We also bind to dragend because on touch devices it is sometimes not
easy to click, especially on small elements. You have to touch and
release the screen without moving your finger. Because the table
selection screen hides overflow there are no downsides to doing this,
and it makes selecting a table much easier and less likely to fail due
to accidental dragging.
Calling preventDefault on the touchend event is another option but did
not work on Android running Firefox 43.
[1] http://ariatemplates.com/blog/2014/05/ghost-clicks-in-mobile-browsers/
When displaying a dashboard, if a custom default filter was set on a
view it would be concatenated to a given dashboard filter.
Since it is never wanted and dashboard are embodied by fixed saved
filters, thus not needing custom filter, this fix simply disable them
when viewing the dashboards.
closes#10477
opw-660140
Field virtual_available on product.product is called Forecast Quantity but was
not on product.template.
This is not an issue to modify in stable as the term is already translated and
the translation of the string of the field is not based on the source (meaning
that, without reloading the translations, people will still see the translation
for 'Quantity Available').
Closes#10443
If we take content with $().text(), to insert it in another node we have to
used $().text(value) also. If like before this commit, we would use $().html()
the content would be unescaped one time too much.
note: equivalent of 8.0's 37ed5ce and 7ad626f commits
If we take content with $().text(), to insert it in another node we have to
used $().text(value) also. If like before this commit, we would use $().html()
the content would be unescaped one time too much.
Version 7 (and saas-3) had a self-checkout mode that was removed in
8. There are still some fields that reference the feature in
point_of_sale.py but they're obsolete and unused in the
frontend.
Both README.md and static/description/index.html (and thus
odoo.com/apps) still referenced these features.
opw-666328
Route with method="['POST']" should not appear in sitemap
This code had never works.
rule.method is not the list of methods declared on the endpoint but "the HTTP
method for the rule if there are different URLs for different methods on
the same endpoint" (src http://werkzeug.pocoo.org/docs/0.11/routing/)
The new code uses the method declared on endpoint and so will avoid to add
endpoint with method declared and wich doesn't support GET.
or in @onchange for that matter. They should already generate a warning,
but only the first time they're used.
This is done lazily because it introspects the instance/class which can
be costly when performed during the repeated setup of registry setup.
closes#5595
This commit improves performances of the scheduler when the database
is big (lots of products with lots of fields). This avoids prefetching
all the fields for every 1000 products while we only use 2 of them.
When changing anything regarding the recurrence,
e.g. the number of repetitions, the weekdays, ...
the event require an update by Google side
As the `rrule` is a computed field, we need to mark
the event as needing an update by Google side as soon
as one of the fields on which depend the `rrule` field
is updated.
opw-659963
Format_tz allow to format a date, but if the format was '%B', it was always January regardless lang in context
Now, it possible to use babel, to get the date in the customer language.
So:
format_tz(object.date_order, format='short', context={'use_babel':1, 'lang': 'fr_BE'})
will return '5/01/16 22:20'
format_tz(object.date_order, format='short', context={'use_babel':1, 'lang': 'en_US'})
will return '1/5/16, 10:20 PM'
format_tz(object.date_order, context={'use_babel':1, 'lang': 'en_US})
will return 'Jan 5, 2016, 10:20:31 PM'
format_tz(object.date_order, context={'use_babel':1, 'lang': 'fr_BE'})
will return '5 janv. 2016 22:20:31'
When configuring the payment acquirer with the confirmation
`at_pay_now`, meaning the sale order has to be
confirmed when clicking on the "Pay now" button, instead
of waiting for the payment confirmation,
the confirmation email wasn't not sent.
opw-665697
This revision is related to 6efc371291
The return URL parameter key has changed: The capital letters
are not the same than before.
Besides, send a dict in the `ADD_RETURNDATA` doesn't seem
to be supported by Buckaroo. We therefore no
longer uses a dict but a string to avoid problems.
opw-665697
If anybody adds a new modal in the `then()` part of the promise, without
this code, all `.modal-backdrop` elements will be deleted, and further
dialogs will not be modal; with this, only the current modal's backdrop
will be deleted.
Commit 64e1c28e3 introduced timezoning in resource_calendar in resource already.
This broke the stock_calendar module, but as such, the timezoning in the module
is not necessary anymore. All dates calculated from the times in the calendar
are calculated back to UTC and the results are without timezone in UTC. That way,
timezones are also not needed for calculating the leaves.
The keep_query() function has to **keep** all or selected query parameters
or add new ones but not change them by merging those with the same name.
That unnecessary parameter merge breaks the *Change language* feature in the
website_sale module when *Website -> Customize -> Product Attribute's filters*
is enabled and there's 2 or more select type attributes created and at least
one of them is selected.
Merging params was added in:
* 8.0: commit 7759af7c4c
* 9.0: commit daf8bdf688
The quantity is not correctly computed, and therefore the weight is
wrong.
The fix uses the appropriate _compute_qty method to convert the
quantity.
Closes#10204
opw-660801
The system showed different Description for product in invoice when you generate invoices based on delivery
orders compared with based on the sales order lines. But the invoice is in the two cases attached with the SO.
Then the description of the product must be the description linked to the SO line.
opw:660723