Commit Graph
112717 Commits
Author SHA1 Message Date
Jeremy Kersten eece785b70 [IMP] website_hr_recruitment: fix layout issue 2017-09-25 13:26:07 +02:00
qsm-odoo dbb931976f [FIX] base: use better view inheritance (secondary) order
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
2017-09-25 12:03:55 +02:00
Olivier Dony f565a18cad [FIX] P3: repair parsing of lessc compilation error
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
2017-09-25 12:03:54 +02:00
Axay Javiya d2c3c1debf [FIX] hr_payroll: Fix traceback when changing employee on payslips 2017-09-25 11:24:32 +02:00
Olivier Dony e98e8e9b1b [FIX] P3: fix server shutdown on Ctrl+C
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/
2017-09-25 11:22:09 +02:00
Olivier Dony d03b4f8675 [FIX] P3: bus: repair force-daemonization
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.
2017-09-25 11:22:09 +02:00
Olivier Dony be59d0b85c [IMP] tools.dumpstack: show extra thread info
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)
2017-09-25 11:22:09 +02:00
kap-odoo bbcd49df6b [FIX] mail: p3 issue on activities 2017-09-25 11:09:09 +02:00
Kirti Choudhary 044ece7024 [FIX] survey: Pass 'survey' when rendering 'nopages' template
As survey is used on the template, this will avoid a crash.
2017-09-25 10:58:04 +02:00
rde b94939377a [IMP] web: improve renderCheckbox to be re-usable in front end
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
2017-09-25 10:53:28 +02:00
rde a40236d38a [FIX] website: SEO keywords
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).
2017-09-25 10:53:28 +02:00
rde acd0b6da14 [IMP] website: pageManagement - improvements according to first feedbacks
- 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
2017-09-25 10:53:28 +02:00
Yannick Tivisse 23bf7fc7df [FIX] website_sale: Explicitly ask to flag a SO as cart_recovery_email_sent
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.
2017-09-25 10:50:28 +02:00
Vandan Shah 2d442e6105 [IMP] website_sale: Avoid traceback on send_mail when no active_ids 2017-09-25 10:50:28 +02:00
qsm-odoo 4c28857892 [FIX] web: review kanban column progressbar design
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
2017-09-25 10:38:41 +02:00
Olivier Colson 2935e01e27 [IMP] account: setup bar: the button allowing to define other accounts now automatically saves all the changes that was made in the wizard before redirecting (no prompt warning that changes will be lost anymore) 2017-09-25 10:08:05 +02:00
Lucas Perais (lpe) e340acc174 [FIX] base: no logo on company shouldn't prevent printing reports
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
2017-09-25 08:53:41 +02:00
Lucas Perais (lpe) 5589f102e6 [FIX] base: fixed display of company details for printing
Also, rebuilt preview pdf
2017-09-25 08:53:31 +02:00
Lucas Perais (lpe) d9134d7331 [FIX] base: Py3 fix in ir_action_report 2017-09-25 08:53:21 +02:00
Simon Lejeune d9d595a684 [REF] stock: immediate transfer wizard
Now that the user is able to fill quantities even if the picking is in
draft, the conditions to open this wizard should be adapted.
2017-09-22 19:30:16 +02:00
Simon Lejeune 0b30f6aec4 [FIX] stock: show operations view and planned pickings
According to the planned_picking context key (which is set by the plan a
picking button), the detailed operations page should be visible or not.
2017-09-22 19:30:16 +02:00
Simon Lejeune b42547e7f7 [FIX] stock: picking: mark as todo visibility
Always hide this button if the picking has not move lines.
2017-09-22 19:12:15 +02:00
qsm-odoo 3b70961e38 [FIX] web: fix list editable visual bugs
- Tags' text were able to overflow their cell to the right
- In-edition elements were sometimes hidden by other rows' content
2017-09-22 16:27:24 +02:00
Ankit Joshi a7ec2d94fe [FIX] account: clean message if no payment to post
Was PR #19656
2017-09-22 16:14:54 +02:00
amoyaux e91fd246d2 [FIX] stock: merge move not always working.
Correct sort on recordset. See this commit for more
information cdd7f09
2017-09-22 16:13:14 +02:00
Prakash Prajapati 497ea3199f [FIX] link_tracker: Use the correct method name
Issue introduced by https://github.com/odoo/odoo/commit/7accd77999ebcd4ce16388f2a23ee296093fecbc
2017-09-22 15:24:59 +02:00
dbh f6f9e73124 [FIX] web: fix vertical alignement in button box 2017-09-22 15:14:05 +02:00
dbh a203eaccbf [IMP] mass_mailing: Fix traceback on onchange when removing recipients model 2017-09-22 15:08:42 +02:00
Darshil Trivedi 858d06fe0a [FIX] purchase: Fix syntax error on domain definition 2017-09-22 15:01:54 +02:00
qsm-odoo bae966c106 [FIX] web, mail: fix bootstrap customization
- 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
2017-09-22 14:58:10 +02:00
qdp-odoo 7049aac877 [FIX] account_check_printing: ir.actions.server state = 'code' where it deserves.
As per https://github.com/odoo/odoo/commit/c56b7462214114079823c38d38de9f194757d20c, the default changed to 'object_write' but some server actions with code were left without specifying the state value to 'code'
2017-09-22 14:53:55 +02:00
amoyaux decd00ec99 [FIX] stock: scheduler active True and rename
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.
2017-09-22 13:36:16 +02:00
amoyaux bb87187cd8 [FIX] stock: consolidate merge quant
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.
2017-09-22 13:36:16 +02:00
Mehul Patel ca01a458ec [FIX] website: Update default language when removing current default
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.
2017-09-22 13:34:43 +02:00
Yannick Tivisse b2aaba4b3d [FIX] http_routing: Convert Bytes to String before concatenation 2017-09-22 13:34:43 +02:00
Mehul Patel 17206d4016 [FIX] account_check_printing : change amount in word when currenncy was changed. 2017-09-22 13:27:07 +02:00
Mehul Patel 9b6c407c82 [IMP] account : remove commas from string. (#19620) 2017-09-22 13:24:16 +02:00
Parth Patel 7698b6d9fb [FIX] sale: Don't display the full address for invoicing and delivery on SO
Currently, the delivery and the invoicing addresses and displayed fully on a SO instead of displaying only the partner name.
2017-09-22 12:28:41 +02:00
Kirti Choudhary d797628779 [IMP] website_sale:set background-repeat property of image to no-repeat so it will not repeat. 2017-09-22 11:41:08 +02:00
Yannick Tivisse abcfade555 [FIX] mass_mailing: Make kanban card links leading to reporting
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
2017-09-22 11:23:22 +02:00
Lucas Perais (lpe) 5da551a0d0 [FIX] account: fiscal day should fall within month boundaries
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
2017-09-22 10:24:46 +02:00
Prakash Prajapati 5a96672453 [IMP] stock: rename Inventory Control menuitem 2017-09-21 18:44:59 -07:00
Prakash Prajapati 7cb688f4b7 [IMP] stock: rename scheduler menuitem
Also make it appear lower in the list.
2017-09-21 18:44:59 -07:00
Prakash Prajapati 2ea88cf1e7 [IMP] stock_landed_costs: reorganize menuitems
- Landed Costs under Operations
- Landed Cost Types under Products
2017-09-21 18:44:59 -07:00
Prakash Prajapati c77cee585e [IMP] mrp: rename Orders menu 2017-09-21 18:44:59 -07:00
Prakash Prajapati d562a69bdc [IMP] stock, delivery: remove Packages menu 2017-09-21 18:44:58 -07:00
Prakash Prajapati 7c7d806150 [IMP] stock: remove inventory adjustment Inventory Lines button 2017-09-21 18:44:58 -07:00
Prakash Prajapati adeb1fbfaf [IMP] stock_account: change inventory valuation icon 2017-09-21 18:44:58 -07:00
Prakash Prajapati 83114055c7 [IMP] stock: make location_id string consistent with location_dest_id 2017-09-21 18:44:58 -07:00
Prakash Prajapati 4629cb7d97 [IMP] stock: restructure stock.move.line form view
- Use the new reference field
- Add a UOM after qty_done
- Display some other fields
2017-09-21 18:44:58 -07:00