Currently, the view inheritance order is 'priority,name,id', the
default order for the 'ir.ui.view' model.
This commit changes the order to 'priority,id' while computing
inheritance. This make views chronologically ordered according to their
installation order, after the primary sorting on `priority`.
This helps to automatically solve some inheritance order bugs that would
have traditionally required explicit view priorities.
Considering this example: an app C depends on two others apps A and B.
We want the LESS files of C to come after the LESS files of A and B as
CSS rules order matter. The only solution to make sure of that with the
current implementation is to change priority field of C to be higher
than 16 (default of A and B). With a complex hierarchy, that will induce
errors. Ordering by 'priority,id' solves the problem, indeed views' ids
of apps A and B will be lower than views' ids of app C. The "name"
ordering is fine for list views display but not for views inheritance.
Closes#19658
Coercing the result of the compilation to text is easier and more
portable than P3-specific code for putting the Popen streams in text
mode.
Fixes#19659
This is an attempt at fixing the long timeout occurring on P3 when
trying to stop the server with Ctrl-C, both in multithreaded and
multi-process mode.
The root cause is the implementation of PEP-0475[1] as of Python 3.5,
which make system calls silently resume after an interrupt.
With this PEP, interrupting a syscall now requires the signal handler to
raise an exception, which get propagated in places where they did not
use to occur (e.g. time.sleep() used to return early when interrupted)
The solution handles 2 separate cases:
1. Multithreaded
In multithreaded mode, stopping the server requires interrupting
the main thread, while ensuring that all other threads are daemon ones.
The previous commit fixed the latter.
Interrupting the main thread is easy, because it simply sleeps until
it gets interrupted. And it already catches KeyboardInterrupt for
win32 quirks. All we need to do is thus to raise a KeyboardInterrupt
in the signal handler, as proposed in PEP 475 (Use Case 2)
2. Multi-process
In multi-process mode, stopping the server requires interrupting the
main thread of each process. The signal is already propagated to all
processes, so it should be as simple as for multithreaded mode.
Unfortunately, the main threads are far from idle in this case,
and raising a KeyboardInterrupt from the signal handler causes a
series of ugly tracebacks before stopping the server.
Effective, but frightening for the admin.
Instead of doing that, we can watch the wakeup file descriptor
(also suggested in PEP 475, Use Case 2) during the sleep() part of the
main loop of each worker. An interrupt signal won't therefore stop
the server immediately, but will wait until each worker is done with
their current request.. even better.
For select() syscalls, this is done with an extra pipe fd that is passed in
the "read fds", and used as wakeup fd.
And for sleep() syscalls, that don't support a wakeup fd, we can
replace them with an equivalent select() call on the wakeup fd, and
a timeout.
The combination of the above seems to restore a relatively fast
interrupt shutdown on both Python 2.7 and Python 3.5, in both
multithreaded and multi-process mode, with no surprising traceback.
[1] https://www.python.org/dev/peps/pep-0475/
P3 got rid of all __private attributes in the `threading` module,
via python/cpython@d06489945f.
Our old code for forcing the `daemon` attribute on an already started
thread used the mangled private name and does not work anymore on P3.
We need to use the new private attribute name (actually both,
to keep backwards-compatibility w/ P2)
This might have deserved a pycompat counterpart, but setting both
variants of the attribute works with no hassle. It should not be a very
frequent use case either.
By using the thread's repr() we get its type, name, daemon status and
ID, all at one time. No need to include them separately.
Fall back to the threadId in case the repr() is empty, which can
happen for exotic threads (the gevent main thread seems to be like that)
Before this commit, the label was into a display block that add a return line
between the cehckbox and the label.
It was not visible in backend, because label by defaut is displayed without
renderCheckbox. (no options.text provided)
Now renderCheckbox render correctly with the same code in frontend and backend
Seen behavior: SEO keywords not saving
Expecte behavior: SEO should save
Reason: destroy event method from dialog.js is now hidding modal
programmatically. Which at the end call twice the keywords save
method.
The second time there were no keywords passed to that function
which is causing that behavior (saving empty array).
- labelling and screen redesign (update labels, hide labels, hide fields, ...)
- make UI more mobile friendly (icon biggest, color using less variables,...)
- Page & Redirection menu are for visible only in debug mode
- Add meta noindex for website.page not shown in sitemap
- Add mechanism to be able to edit in backend a broken view
(Needed for - Internal Error 500, css, js file, ...)
- website pagemanager dedicated to website_publisher only
Purpose
=======
Now all the abandonned cart are marked as 'cart_recovery_email_sent' in any cases, whatever the email sent.
Specification
=============
The SO should be marked as 'cart_recovery_email_sent' only when the cart recovery email is sent.
Now:
- Animations do not trigger on first rendering
- Fix a bug where 5k was considered smaller than 9 (since 5 < 9)
- Properly animate number when it crosses over multiple thousands levels
- Always preserve at least 3 digits when switching to a thousands level
and never show a decimal (4500000 is represented as 4500k, not 4.5M)
- Monetary symbol is not bold (and is better integrated)
- Add thousands separators for > 3 digits numbers
Before this commit, when trying to preint an invoice when minimal company details were set (without the logo),
- the wizard of company edition was not clear enough on what was needed
- did not print on clicking save
After this commit:
- the wizard is clearer, specifically it tells the user to add a logo
- clicking on save now prints the invoice, even though no logo has been set on the company
- bg-*-full color classes were only defined in enterprise while they
should have been defined here (fixes kanban column progressbars)
- new @gray-lighter variations should be defined in variables.less
as they are bootstrap extensions, not bootstrap overrides
Commit 0e4f3bb959 turn scheduler
cron to inactive though it should not.
It also rename the MRP in the name since the scheduler is not
only relative to mrp.
It could exist issue with concurency. If the user try to
open the inventory menu but the database can't obtain the lock
for quants to modify/delete. It could raise a traceback to the
end user.
In order to prevent that we use a try catch and pass the exception
it's okay if all the quants are not merged for the user, it will
probably be the next time. It also use a savepoint in order to not
rollback the whole transaction.
The merge quants was only used once the user click on inventory
menu. But if the user only do it once every 2-3 years, there could
be too much quants to merge in only one transaction. In order to
avoit it, we also deduplicate quants in the scheduler cron.
Purpose
=======
Steps to reproduce:
Remove current default language of your website, it doesn't change the default language which makes the website crashing on edition.
Purpose
=======
Links in the dashboard are not working, when clicking on them nothing happens. Either they should do something like other app's dashboard or they should not be clickable
Before this commit, it was possible to set an illegal date such as november 31st as the fiscal date, messing with all the reports
Now, a new constraint is implemented at save time to ensure the date is correct
closes#19612