Commit Graph
103913 Commits
Author SHA1 Message Date
Martin Trigaux cc4f8df99f [FIX] account: compute total invoice in batch
The computation of the total_invoiced field did not work in batch mode.
When displaying a company in a form view (field invoice_total comptued), the
children of this company are present in the cache and the value of the field
invoice_total will be prefetched for these children as well (at least in 9.0).
Most of the time this is redudant information and the same value is computed
for each child while most of the invoices are on the parent.

Batching the computation per partner allows to make one global query for all
partners.

Add test to make sure the total increase correctly after a test invoice
confirmation.
2016-06-27 17:20:05 +02:00
Denis Ledoux 9062c01c02 [FIX] web: pager page on next/previous record
When browsing a form with a one2many / many2many field
with several pages, the one2many pager page was not reset
when going to the previous/next record, while the next/previous
record could not have multiple pages on its one2many/many2many,
and the page on which the user was on the former record could
not exist in the newly displayed record.

Besides, even if the page does exist, there is no reason
to display this new record X2many value from its first page.

It's the case anyway when you edit/save, it comes back to the first page.

opw-679092
2016-06-27 16:50:47 +02:00
Joren Van Onder 86cf147f2e [IMP] pos_mercury: move automatic Mercury token deletion to vacuum cron 2016-06-27 16:24:31 +02:00
Martin Geubelle f8ca7634ca [FIX] base: rate with correct current user's company
Bug introduced in 7eab8e2.

As `self.env.user` is browsed with `sudo`, the result of this call
will always return the admin's current company and not the user's current
company.

opw-681809
2016-06-27 16:20:47 +02:00
Aaron Bohy 246b9a29ae [FIX] mail: tour: tip's position
Tips are now positionned in their closest scrollable parent (b70c990b), which
breaks some tips in discuss as they overflow that parent.
2016-06-27 16:04:25 +02:00
Goffin Simon d577eeaa6e [FIX] product: pricelist items
With the pricelist, it is possible to define a pricelist just for
a variant. But in the product.product.form, only the pricelist items
linked to the product template could be displayed.
The field item_ids has been created in product.product model to display
all the pricelist applied on a product.

opw:674700
2016-06-27 15:47:58 +02:00
Aaron Bohy 488e9f299d [IMP] calendar: remove /calendar/notify RPC done every 5 minutes
Basicaly, do this RPC once, at webclient startup, to get the next notification.
Do the RPC again when the notification is displayed to get the next one.
When an event with alarm is created, edited or removed, trigger an event on the
bus for all involved users (the attendees) with an update of their next
calendar notification.
2016-06-27 15:30:45 +02:00
Aaron Bohy d9cc893dbc [IMP] openerp: models.py: use LOG_ACCESS_COLUMNS constant 2016-06-27 15:30:45 +02:00
Christophe Matthieu 5aac400e33 [IMP] qweb: use CDATA in test and remove stringify_children method 2016-06-27 14:29:04 +02:00
Géry Debongnie 96bf5b2656 [FIX] web: fix label for selection fields in grouped list view
Before this commit, the list view, grouped by a selection field, displayed the
'technical' value of the field as group label.  It was basically forced
to do that, because the result of the read_group only contains the
technical value.

This commit changes the list view in a way that it now requires a full field
get, so it can use it to find the correct string.
2016-06-27 14:03:54 +02:00
Nicolas Martinelli 3229629579 [FIX] stock: reserved quants in lots
Let's take the following case:
- Enable lot tracking on a product
- Costing Method is "Real Price", Inventory Valuation is "Perpetual"
- Create a picking with 2 stock moves, each stock move is linked to the
  same product

When the picking is validated, 4 account moves are created instead of 2.

This occurs because the list of stock moves and the list of reserved
quants is sent to the method `_move_quants_by_lot`, but there is no
check to which stock move is related a given quant.

For most cases, the issue doesn't show up since there isn't usually 2
stock moves with the same product in a given picking. There is at least
one use case where this happens: selling a pack of two identical
products. In this specific case, 2 stock moves of the same product are
created, but one pack operation will merge the 2 stock moves.

opw-680308
2016-06-27 12:19:08 +02:00
Martin Trigaux 5abcbf0eb2 [FIX] js: translations and string substitutions
_('foo '+bar) does not work as `bar` is a variable with undefinied content
during translation export (and variable content during evaluation) so a match
will not be found.
Also trailing spaces are stripped during synchronisation with transifex.

The proper syntax would be
_.str.sprintf(_t("foo %s"), bar)
but to avoid breaking existing translations (need to reexport .pot)
use the syntax
_("foo ") + " " + bar
that is more stable friendly.

The 'No value found for the field...' string is not possible to be fixed without
breaking the translations should be split at least twice.
Write it the propre way directly.
2016-06-27 12:05:36 +02:00
Denis Ledoux 0fa052cc1e [FIX] l10n_generic_coa: remove liquidity account templates
These accounts are created automatically on the journals creation
e.g. On the creation of a Bank Journal, a Bank account is automatically
created, linked to this journal.

Before this revision, when installing the generic chart of account
(or l10n_us), you had two Bank accounts (101400, 101401),
and two Cash accounts (101500, 101501),
by default,
which is not right.

opw-676950
2016-06-27 11:21:35 +02:00
Aaron Bohy 8d61316486 [FIX] web_tour: load consumed tours in the frontend
Also deactivate unnecessary magic fields for the web_tour model.
2016-06-27 10:59:39 +02:00
Stéphane Bidoul e30ea5647d [IMP] account: adding the invoice.tax.line id in tax_line_move_line_get() to allow inheritance.
Was PR #12576. Courtesy from sbidoul
2016-06-27 10:55:07 +02:00
qdp-odoo 0a6afa1ff1 [FIX] account: grouping tax lines on invoices when no tax account is set on them. Fixes #12561 2016-06-27 10:55:07 +02:00
Martin Trigaux c20ec2ced6 [FIX] website: truncate description at 160
Search engines (or one at least) truncates the description at 160. The advised
size is between 150 and 160 so no need to force a smaller size. It's a good
idea to keep it at 155 but larger sizes should be allowed.
cf: https://moz.com/learn/seo/meta-description

We could fully remove the limit as there is corner cases where a longer size is
used (https://moz.com/blog/i-cant-drive-155-meta-descriptions-in-2015) but this
should be in addition with an indication for the user of the current size and
the advised size.
2016-06-27 09:55:25 +02:00
Christophe Matthieu 15e1f88a73 [FIX] qweb: fix t-if and t-else and add test
Can not use remove with the loop for in (in _compile_directive_content)
2016-06-27 08:08:00 +02:00
Fabien Pinckaers 28656a1a3c [IMP] base: currency: add a form view to hide company 2016-06-25 23:57:58 -07:00
Fabien Pinckaers 770f7dfc6c [IMP] product: Filter on attributes only visible if multi-variants enables 2016-06-25 23:53:03 -07:00
Odoo Translation Bot 3e965ecf58 [I18N] Update translation terms from Transifex 2016-06-26 02:57:50 +02:00
Odoo Translation Bot 765b3fc6ac [I18N] Update translation terms from Transifex 2016-06-26 00:29:54 +02:00
Fabien Pinckaers 0c618d79ff [FIX] purchase: canceled PO can not be selected to create a bill
[IMP] purchase: name_get, show the amount (to select a PO in the bill
when several PO for the same vendor)
2016-06-25 14:50:30 -07:00
xmo-odoo 8d6ed1adbc [FIX] hr_recruitment: _group_by_full new API callback issue
Incompatibility between the way the callback had been migrated in
hr_recruitment and the way it's now called in base.
2016-06-25 09:57:54 +02:00
qsm-odoo b70c990b6a [IMP] web_tour: tip location
Choosing where to place a tip is a difficult problem.

If placed in the body element, the tip have to be repositionned on each
scroll event which is performance-consuming and induces bugs (firefox
scroll event, tips which is over an element while the anchor is under,
...).
If placed in the anchor parent which scrolls, all the above problems
are solved but when the tip opens it cannot overflow its parent
boundaries, which is not possible in many contexts (modals, ...).

The solution here is to change the tip location when it opens/closes.
When closed, it is placed in the anchor parent which scrolls. This
allows to not have to reposition the tip on each scroll. The tip is
also naturally hidden when its anchor is not visible on the screen.
When opened, the tip is placed in the body, where it can be placed
on the top of anything in the DOM.

The transition from one state to another is not noticable as the
position does not have to be computed when the tip is moved in the
DOM and the animation is purely CSS.

Note: however, this commit does not solve the firefox bug of closing
the tip when the window scrolls. Here, the temporary solution is to
let the tip be wrongly position if the user scrolls when a tip is
opened (this only occurs when using the mouse wheel anyway).
2016-06-24 17:18:44 +02:00
qsm-odoo 25a3a6f9bf [FIX] web_tour: unbind events on destroy 2016-06-24 17:18:44 +02:00
qsm-odoo 75deed4bee [FIX] web_tour: border computation of the tip
The border width was wrongly computed and was not used correctly in
the reposition algo.
2016-06-24 17:18:44 +02:00
qsm-odoo 2a2780fdf4 [FIX] web_tour: first positionning of tips
Before being positionned, the tip is at the end of the body, thus
adding a scrollbar... which prevents to calculate the correct x
position of the tip.

The chosen solution is to place the tip at the center of the screen
in LESS before the first positionning. This also prevents the content
to overflow the body and does not break animation of the tip as its
display property is always block.
2016-06-24 17:18:44 +02:00
Aaron Bohy 97a8ff9909 [IMP] im_livechat: unpin old sessions in the autovacuum cron 2016-06-24 16:34:00 +02:00
Aaron Bohy 7d64bd5ed2 [IMP] im_livechat: add gc of empty sessions in the autovacuum cron 2016-06-24 16:34:00 +02:00
Aaron Bohy 1339180ba8 [ADD] base: ir_actions: target attribute for ir_actions_client
Allows to open a client action in a dialog, fullscreen, or in the current
window with a cleared breadcrumb
2016-06-24 16:26:05 +02:00
Joren Van Onder fbf8d26255 [IMP] point_of_sale: don't print the stock name on receipts
Most users don't care about this and find it confusing that on their
receipt they end up with the word 'Stock' (default stock location name).

Fixes #11733
2016-06-24 16:11:07 +02:00
Stéphane Bidoul (ACSONE) ee3666237a [CLA] add Denis Roussel in Acsone CCLA
Closes #12570
2016-06-24 14:31:00 +02:00
engelant b00ba0b6db [CLA] signature for engelant
Closes #12551
2016-06-24 14:28:09 +02:00
Olivier Dony e7f6d3bc11 [FIX] ir.config.parameter: error in new API conversion
The conversion at eb04aa1e39
failed when `force=True`.
2016-06-24 14:23:29 +02:00
Olivier Dony ed695de2a0 [IMP] ir.config.parameter: unused imports 2016-06-24 14:23:29 +02:00
Nicolas Martinelli 44d23c371c [FIX] crm, sales_team: expected closing
On the Sales Team dashboard, clicking on "exp. closing" will show all
opportunities, not only the one which are supposed to be closed.

opw-681048
2016-06-24 13:43:58 +02:00
Denis Vermylen (dve) dce2a309d0 [FIX] web: menu: correctly show unfolded submenu
commit 69d4aa363b replaces show()/hide() by classname o_hidden
but the folded submenus were still hidden using .hide()
thus they always remained invisible.
2016-06-24 11:47:46 +02:00
Denis Vermylen (dve) 69d4aa363b [FIX] web: properly hides submenu (ir_actions target=fullscreen)
This commit fixes the action target="fullscreen" in community, where
the submenu on the left would sometimes remain visible.

The fullscreen feature was added in commit : d65d251c57
2016-06-24 10:04:24 +02:00
Fabien Pinckaers 31207d82b5 [IMP] hr_expense: does not depend on workflow anymore 2016-06-23 14:27:43 -07:00
Fabien Pinckaers ff7a40c1c9 [FIX] utm: employees should be able to edit UTM (e.g. HR Job recruitment tracker creation 2016-06-23 11:21:35 -07:00
Christophe Simonis 4030f2fd32 [MERGE] forward port of branch 8.0 up to 297bbff 2016-06-23 16:21:28 +02:00
Nicolas Martinelli 5ca8f08730 [FIX] purchase: scrap instead of receive
The button scraps the products, so the tip should reflect this behavior.

opw-680788
2016-06-23 16:06:57 +02:00
Nicolas Martinelli 162edf276c [FIX] account_asset: depreciation start date
If the depreciation is not prorata temporis, the start date is defined
as:
- 1st of purchase month if frequency is < 12 month
- 1st of January instead

opw-681564
2016-06-23 15:08:02 +02:00
Nicolas Martinelli b114c9e681 [FIX] purchase_requisition: link stock.move to procurement
When a purchase requisition is created from a procurement, the
subsequent stock moves (create from the PO lines) are not linked to the
original procurement/stock moves.

This is an issue in the following use case:
- Product "Assembly" configured in MTO and manufactured
- Product "Part" configured in MTO and bought from suppliers thanks to
  purchase requisitions
- A BoM is created for "Assembly" and is build from "Part"

When "Assembly" is sold, a MO is created, which generated a purchase
requisition for "Part". The MO is in state "Awaiting for Raw Materials"
since we need to purchase the components.

However, when the components are purchased and received, the MO stays in
the same state since there is not link between the stock move received
from the PO and the stock move created for the MO. The MO is therefore
stuck in "Awaiting for Raw Materials" state.

The fix is to keep track of the original procurement and stock moves.
Ideally, we should link the procurement to the PO lines, but that is not
possible since the field `purchase_line_id` on the procurement is a
Many2one. Therefore, we need to hook the confirmation process and
manually link the stock moves related to the PO to the stock moves
related to the MO.

opw-681138
2016-06-23 12:19:14 +02:00
Christophe Matthieu f5797ae1b6 [IMP] qweb: add backward compatibility for t-field-options 2016-06-23 12:03:03 +02:00
Christophe Matthieu 2dc19eb6f0 [FIX] qweb: use python builtins for safe_eval._BUILTINS key instead of value.get('key') 2016-06-23 12:03:03 +02:00
Christophe Matthieu 566cfd494b [FIX] website_hr_recuitment,hr_expense,website_sale: t-field-options use new qweb syntax
Use 'True' instead of 'true' because 'true' key does not exist.
2016-06-23 12:03:03 +02:00
Christophe Matthieu 17032dcb03 [IMP] ir.qweb: better error message (same traceback message) 2016-06-23 12:03:03 +02:00
Denis Ledoux f0c571f773 [FIX] calendar: recurrent events metadata
Developer feature `View Metadata` wasn't working
on recurring events, because of the recurrent events
virtual ids.

opw-678580
2016-06-23 11:51:19 +02:00