Commit Graph
117156 Commits
Author SHA1 Message Date
Nicolas Martinelli e76fe2449c [FIX] sale: taxes on report
- Create a tax using the tax template 'GST + QST for sales'
- Create a SO with the following lines:
  Product 1 100 Units @ 0.1
  Product 2 2000 Units @ 10.334
  Product 3 2000 Units @ 10.334
  Product 4 5000 Units @ 0.1
  Product 5 1500 Units @ 0.1
- The totals are:
  Amount without taxes: 41996.00
  Taxes: 6288.90

When printed, the quotation gives:
  Amount without taxes: 41996.00
  Taxes: 6286.52

This is due to the method `_get_tax_amount_by_group`, which is using
`line.price_reduce` for tax computation. Since it is a Monetary field,
it is automatically rounded to the currency precision, while it should
be rounded with the same precision as `price_unit`.

To avoid breaking overrides, changing the field type is done in master
branch.

Introduced in 99743cc4aa

opw-752487
2017-07-24 10:44:34 +02:00
Adrien Dieudonne a47d2d88d0 [FIX] *: wrong color_field attribute for m2m_tags
This fix previous commit a29f7f671b.

(1) Some objects have no color field.
(2) There was an issue when two many2many tags were instantiated:
    If the first one had the 'color_field' attribute the second one
    had it too even if this attribute weren't specified.
    Now, it's fixed in data_manager
2017-07-24 09:32:49 +02:00
Damien Bouvy 75fe7cb1af [FIX] website_portal_sale: remove incorrect field dependency
The field 'payment_acquirer_id' is added on the sale.order model
in the website_sale module, which may not be installed when this
code runs since it is higher up in the dependency tree.

Either way, it's quite convoluted to go fetch the acquirer on the
quote since it's already available on the transaction itself anyway.

opw-755998
2017-07-24 08:59:44 +02:00
Jeremy Kersten df13516679 [FIX] report*: fix missing import from backport #7a1d2d1c4caebba5bd69d63cff3d7824dfd5a7a6 2017-07-20 16:27:44 +02:00
Richard Mathot 45ca8f41d6 [REF] delivery: remove inherits with product.product
(Actually, a good old m2o is enough.)

We also clean a bit the delivery.carrier view.
2017-07-20 15:32:21 +02:00
Jaykishan Solanki 6999d054fc [ADD] delivery: delivery.carrier must follow the same multi-company rules than the products they reference 2017-07-20 15:32:20 +02:00
Christophe Matthieu 666b594842 [FIX] mail: send image with base64 src as attachment
Before this fix, the base64 image are remove and never send. The images
were in the body increasing the size of the database unnecessarily
(cfr some odoo users with the chatter)

NB: According to the prophecy Khoi will come and dominate the world,
ask him anything
2017-07-20 15:05:36 +02:00
Laurent Smet b446930dc4 [IMP] base/report, web/report: remove pdf merge with single call to wkhtmltopdf
The old behavior was to call wkhtmltopdf for each report and to put all of them together
using the merge_pdf method. It was a very slow approach because all report needs
5 temporary files, one subprocess and then, a merge.

The new behavior is to perform a single call to wkhtmltopdf by putting all the footers/headers
html together and so, avoid call to merge_pdf to greatly improve the performances of the reporting.
2017-07-20 14:48:43 +02:00
Elkasitu bbc0095974 [FIX] web: Save search bar state to local storage
The state of the search bar (expanded or not) is supposed to be saved
into a local storage variable which is retrieved whenever loading a view
that has the search bar in it and it is expanded automatically if it was
done previously in any other view, this didn't happen previous to this
commit because the variable wasn't being set properly (missing key).
2017-07-20 14:30:39 +02:00
Adrien Dieudonne 7a1d2d1c4c [FIX] *: reports: check required values for 'render_html'
Some reports require additional information to render. When
accessed in Odoo, the user has to fill a wizard to provide those
information. However, when these reports were opened in Studio,
it crashed as those information were missing (we don't pass
through the configuration wizard in this case).

This fix checks if all the required information are given before
trying to render those reports, and it displays a warning in
the logs in they are missing, which is better than a traceback.

backported in v10 for opw-753036
2017-07-20 14:21:57 +02:00
Goffin Simon 7333f5e9b8 [FIX] purchase: Wrong scheduled date for backorder
Steps to reproduce:
-Create a PO with two lines L1 and L2
-L1 has product P with qty=10 for a scheduled date=23/07/2017
-L2 has product P with qty=10 for a scheduled date=30/07/2017
-Confirm the PO

When delivering 5P of L1, the scheduled date of the picking is the
right date which is 23/07/2017
But when delivering the other 5P of L1, the scheduled date of the
second picking was 30/07/2017 instead of 23/07/2017.

opw:752192
2017-07-20 13:44:43 +02:00
Simon Lejeune 54c73985d2 [FIX] sale_stock: wording on line edition 2017-07-20 13:42:15 +02:00
Simon Lejeune fdd90a8dd9 [FIX] sale_stock: _update_line_quantity
rev 1168e73a72 wrongly assumed that `message_post` is api multi
2017-07-20 13:39:31 +02:00
Christophe Simonis 9185eb4b79 [MERGE] forward port branch saas-17 up to f830f14d98 2017-07-20 13:26:09 +02:00
Khoi Nguyen f97861f4b1 [FIX] web: fix colour for .o_form_uri
Before this revision, multiline links in form views had a different
colour depending on whether we were editing a record, or merely
viewing it.

As an example, the 'customer' field (containing both the name and the
address) in the form view of 'invoice' is affected. When editing the
invoice, all lines have @link-color as colour. However, when viewing it,
only the first line does, while the address is in @odoo-main-text-color.
2017-07-20 13:25:50 +02:00
Richard Mathot f830f14d98 [FIX] website_sale_delivery: carrier selection is now working and faster
Since f963500a9f, users of the ecommerce
were able to select carriers even if they actually were not shipping to
their address.
Also, using an integrated carrier (eg: Fedex) caused a crash at the
payment page.

With this commit, delivery price is now computed only on the payment
page and when selected.
Editing the cart after selecting a delivery method will now be much
faster, since delivery prices are not recomputed anywhere else than on
the payment page

(we also fix minor CSS and JS issues)
2017-07-20 12:00:58 +02:00
Christophe Simonis fa3e89064a [MERGE] forward port branch saas-16 up to 104dfe3c07 2017-07-20 11:48:49 +02:00
Martin Trigaux a03eb9a3e8 [IMP] sale: add test on pricelist dates
Commit 60d46345 fixed issue #18303 that was surprisingly unnoticed for two years
Adding tests to make sure it does not happen again.
2017-07-20 10:21:03 +02:00
Yenthe V.G 5e9df18b15 [IMP] remove duplicated module description
The module is described in either static/description/index.html, either in
README.md file.

It is ok to have both README.md and index.html as index.html is for a formated
description and README.md is displayed in github
e.g. https://github.com/odoo/odoo/tree/10.0/addons/stock

Closes #18036
2017-07-20 10:05:53 +02:00
Yenthe V.G 2d52618d9d [IMP] calendar: ability to xpath in pages
Closes #17957
2017-07-20 09:46:10 +02:00
Khoi Nguyen 104dfe3c07 [FIX] web: don't fold quickcreate after adding a column in Kanban view
This commit aims to replicate saas-15 behaviour when adding columns in
a Kanban view by not folding the column quick create widget when
creating a new column, thereby allowing users to add multiple columns in
one go.
2017-07-20 09:14:46 +02:00
Simon Lejeune 0ae679e433 [FIX] stock: scrap and sublocations
Following the previous commit, it appears than the scrap mechanism needs
some rigorousness when looking for quants characteristics (i.e. if we
look for a quant without `lot_id`, it should not return one with one)
but some flexibility with the location (i.e. we can look in sublocations
to find one with the given characteristics).

Before this commit, we centralized everything related to quant's search
in stock_quant.py and the `_gather` method, which has a `strict` kw. As
we exposed the `_get_quantity` method but is only used in stock_scrap,
and that the `strict` flag does not fulfill the needs of stock_scrap, we
inline the appropriate search, as it was done previously.
2017-07-19 20:09:19 +02:00
amoyaux 52c21bd53e [FIX] stock : _update_available_quantity and sublocations
When updating the quantity on hand in a location without quant but
where one of its sublocations has onee, it will increase the available
quantity in the sub location instead of the defined location.

This happens because _gather method in quant search on child_of location
in any case.

This commit change the domain by using '=' on the locations if `strict` is
passed as True in _gather, or 'child_of' if it is set as False. It also
removes the strict argument on _update_avaible_quantity since it does
not make sense to change the quantity on an undefined quant. And it was
never used in our code for good reasons.
2017-07-19 19:37:32 +02:00
Christophe Simonis 6fa9ea14fa [MERGE] forward port branch saas-15 up to b31cd558e5 2017-07-19 18:48:42 +02:00
Simon Lejeune cc181711dd [FIX] stock: scrap: allow scrapping consumable
A previous revision[0] forbid to scrap consumables. The rationale at the
time was that, since consumables do not have quant, scrapping them does
not make sense. It appears that people use this feature on consumable
for traceability reason, so we bring back the old behavior.

A slight change was done in stock_scrap.py: if the product is a
consumable, do not raise the error if the quantity to scrap is not
available in stock for obvious reasons.

Also, a leftover todo in the code indicate that we should unreserve the
any move having reserved the scrapped product. This is actually already
done, since this mechanism is in the move line `action_done` and a scrap
uses a classical stock move and stock move lines.

We introduce some test to prove that it is possible to scrap a stockable
product and the quant are impacted, to scrap a consumable product and
the stock is not impacted and to scrap something that was reseved by a
move and that the move changes its state.

[0] 86f08c091e
2017-07-19 18:29:16 +02:00
Jaykishan Solanki 4dd50925c4 [IMP] sale: Group by confirm date by default on Sales Analysis report
PURPOSE
=======

Currently 'Sales Analysis' report have by default group by creation date. here matters if confirmed SO is the confirmation date(for sales commission, etc), not the creation date.

SPECIFICATION
=============

'Sales Analysis' have default group by 'Confirmation Date'  instead of 'Creation Date'

PS: Validate 2 SO to have a confirmation date.
2017-07-19 17:35:35 +02:00
Simon Lejeune 886137d0c8 [FIX] purchase: wording on line decrease 2017-07-19 17:31:36 +02:00
amoyaux d6ed41f9d7 [FIX] stock: move: initial demand should be 0 on create
When creating a new line in a picking, the initial demand should be 0.
When editing a move line and changning the product, the initial demand
should not be reset to 1.

The rationale is that when creating a picking by hand, most users do
want to skip the reservationm and, by forcing the initial demand at 1,
we force the user to enter to encode two times what he's doing.
2017-07-19 17:28:40 +02:00
Simon Lejeune 96eeb5c186 [FIX] stock: inventory adjustment: owner
The owner was not correctly passed to the move lines, and indeed it was
written as a "to do". So we do it. We correctly indent all the
move_line_ids block and add a testcase.
2017-07-19 17:27:52 +02:00
Simon Lejeune c292e44d5e [REM] stock: move: remove restrict_lot_id field
Before, it was possible to have a move without move line / pack
operations and the `restrict_lot_id` was used in this case. Now, every
move has move lines / pack operations and this field was unused. Let's
remove it.
2017-07-19 17:27:48 +02:00
amoyaux a8a25cb8c9 [FIX] stock : consignment update views
Consignment worked in backend but there was no
tools in front end in order to use it.

This commit update the views and add consignment in picking
and stock move lines
2017-07-19 17:27:48 +02:00
Mehul Patel 19b1262109 [IMP] website_sale : Remove deprecated hidden product attribute type on product variants
Purpose
=======

Hidden mode on product attributes (variants) is deprecated
Beforehand it was used to not show the attribute name  in the order (in case of single attributes). Now it's automatic: if only one value for a product attribute, this value doesn't show up in the product name.
see support ticket 744129

Specification
=============

remove it
2017-07-19 17:07:43 +02:00
Christophe Simonis b31cd558e5 [MERGE] forward port branch saas-14 up to b857fd4c90 2017-07-19 17:04:28 +02:00
jeffery chen fan 60d4634544 [FIX] sale: use date_order for pricelist selection
The date of the sale order was ignored when selecting th eappropriate pricelist
rule.

Fixes #18303
Closes #18308
2017-07-19 16:30:39 +02:00
Christophe Simonis b857fd4c90 [MERGE] forward port branch 10.0 up to 11270336fa 2017-07-19 16:21:12 +02:00
Christophe Simonis 11270336fa [MERGE] forward port branch saas-11 up to f07ca36b9b 2017-07-19 16:18:40 +02:00
Christophe Simonis f07ca36b9b [MERGE] forward port branch 9.0 up to 41433debdb 2017-07-19 16:16:57 +02:00
Raphael Collet 5b054ffbf2 [IMP] model: optimize setup_models (#18300)
When setting up models, retrieve all manual fields in a single and specific
query.  This makes the method `_add_manual_fields` 20 times faster.
2017-07-19 15:50:03 +02:00
Xavier Morel b656eda22d [FIX] ir_qweb: decoding of attachment assets
For uploaded modules (e.g. saas), uploaded assets are stored in
attachments.

When the asset content is retrieved, static "filesystem" files are
assumed to be UTF8 and properly decoded, but attachment data is not
and is thus interpreted as ASCII further down the line, leading to a
UnicodeDecodeError (and a broken page/template/...) if the asset data
is not actually ASCII (e.g. if it's UTF-8).

Fix by treating attachment assets as UTF8 encoded, same as filesystem
assets.

OPW-752858
2017-07-19 15:41:37 +02:00
Dhawal Limbuwala ee9b3e0d0c [IMP] delivery: notification email for shippings
When an order is shipped, a notification email is sent to the customer.
If there is a tracking URL, it is included in the email.

(and also a bit of refactoring)
2017-07-19 15:02:16 +02:00
Thibault Delavallée f858cea1fa [REM] website_portal: remove custom panel template
This custom panel should allow to add custom content. However it is neither
necessary neither used anywhere. Let us drop it.
2017-07-19 14:54:53 +02:00
Nicolas Martinelli 21fbb9776a [FIX] sale, sale_timesheet: unnecessary complex domain
The use case was not supported anyway.

This reverts a0fed3b845
2017-07-19 14:32:55 +02:00
Nicolas Martinelli e909533e30 [IMP] sale, sale_timesheet: unnecessary search
Check if there is any sale line before compute analytic.

opw-752100
Closes #18173
2017-07-19 14:32:55 +02:00
Goffin Simon b2fb17f3c4 [FIX] hr_expense: Domain on field account_id in model hr.expense
It was possible to set a payable account for an expense.
So it raised a UserError when reconciling the lines in
function expense_post_payment because two different accounts
were used as payable account.

A expense account is expected as account for an expense.

opw:752695
2017-07-19 13:51:37 +02:00
Elkasitu 72efb820c8 [FIX] web: Display translate icon properly in list view
In an editable list view, the translation icon would display incorrectly
(out of place) for translatable char fields. This can be traced back to
two reasons, compared to saas-15:

- We now use tables instead of divs for list views
- The translate icon would have inline css that would override its
positioning with top and left attributes

This is fixed by adding top and left attributes to translate buttons
inside a field inside a table cell using CSS classes
2017-07-19 13:45:20 +02:00
Vincent Adriaensen 1e3e3b4bbe [CLA] signature for vincentadriaensen
Done at #18332
2017-07-19 13:34:34 +02:00
Nicolas Martinelli 41433debdb [FIX] account: leap year
If the end of the accounting period is set to the 28-29th of February,
crashes may occur in date computation.

opw-752939
2017-07-19 12:58:05 +02:00
Richard Mathot e297a7d541 [FIX] delivery: wrong variable returned 2017-07-19 12:27:50 +02:00
Timo Talvitie c0dbbe6320 [CLA] signature for timotalvitie
Done at #18314
2017-07-19 11:58:12 +02:00
Mahendra Barad dd1bf62226 [FIX] mail: fix wrong adjustment in the chat window
In the chat, there is an indication of when a message was sent,  This indication gets updated as time passes. When the last one in the conversation is updated to an indication that takes more space (e.g. from 'now' to 'a minute ago'), the text below is pushed lower (as expected) but the chatter does not scroll down. As a result, we do not see new messages, unless manually scrolling down.
(PR #17469)
2017-07-19 11:49:25 +02:00