[FIX] account: chart of account opening period selection

If a special period is present, it must be selected fist
Fixes #3946
[FIX] stock: compute average price on action_done

The average price computation is now deduplicated and moved to
a separate function called in stock_move action_done.
This makes sure it is always called when a stock.move is
processed, even without going through the partial picking wizard.

Fixes #2991
Closes #3949
OPW-615491
[ADD] purchase: average price computation test
[IMP] models: add check for common conversion error in field definitions
[IMP] Manufacture should be by default in all warehouses
[IMP] mrp: add prepare method for manufacturing orders to allow override

Fixes #3973
[FIX] action_confirm was not asking for purchase pricelist, otherwise it was asking for sale pricelist
[FIX] packaging: redhat dependencies

Install psycogreen from easy_install (not in EPEL), required for openerp-gevent
[FIX] models: exists() should not consider record with id 0 as existing
[FIX] doc: remaining instances of ruby-style interpolation in templates

fixes #3157
[FIX] must manage() Environment before loading test file
[IMP] web: do not fully hide pager in grouped view

When the list view is grouped, the page count should be hidden as irrelevant.
However if it's fully hidden, the limit can no longer be changed.
Instead of hidding the pager, this commit hides the arrows and replaces
the content by the current limit to allow to be changed.
[FIX] delivery: display the label of the field number_of_packages

Fixes #4011
[FIX] Correct floating number handling for _procure_orderpoint_confirm

Fixes comparison with min_quantity orderpoint in scheduler - basic floating
point math issue in procurement scheduler when comparing current quantity
with orderpoint minimum quantity. In certain cases floating point comparison
could result in e.g 400.0 < 400.0 == True due to typical floating point
comparison issues, as Odoo doesn't use Decimal types where the issue
doesn't exist.

Fixes early exiting out of the loop cycle, in case qty is already near zero.
Fixes the new procurement creation check, to not do that if it's close
enough to zero already, to be considered a floating point math error, not
really non-zero.

These combined (or at least the last one) avoid each supply_method == buy
pending in draft PO's getting a zero quantity extra procurement order each
time the scheduler runs. Otherwise there could be hundreds of zero quantity
procurement orders pending, which makes the confirming of the PO take hours,
due to creating hundreds of stock moves for each order line.

Use float_compare helper to solve all these with floating point type for now,
instead of the more evasion possibility of converting to Decimal module.
Two potential bad comparisons remain, add FIXME notes for now until further
analysis.

Also: Float rounding on reste when comparing and on the procurement qty
[FIX] Fix floating point handling in purchase _prepare_order_line_move

Without this better floating point handling, an extra stock move might
be created for zero quantity for some order lines upon PO confirmation,
because qty is equal to something closer to e.g 1.14e-13, but this is
larger than 0, so it creates a stock.move, which gets rounded too late
to 0.0

Closes #3346
[FIX] Fix wrong unit price on invoice genereted by stock picking when uos is used

[IMP] Rounding not necessary
[FIX] product: add store=dict to field name_template

Recompute the name_template field if the template changes.

backport of 41628fc + f25c5d8 to 7.0 plus some optimisations in triggers
Fixes #3277
[FIX] mrp: keep traceability of procurement.group

Pass group_id information when a manufacturing order is created from
a procurement to keep a better traceability and know the reason of stock.move
creation.
Fixes #4019
[MERGE] forward port of branch 7.0 up to d6daf5f
Fixes #3851 Create invoice from picking copies some parameters from the order to the invoice