Commit Graph
117975 Commits
Author SHA1 Message Date
Martin Trigaux 09c6d9f7ce [I18N] Update translation terms from Transifex 2017-07-24 15:45:48 +02:00
Xavier Morel 44304b7e24 [FIX] P3: reintroduced issues
* can't compare a function and a float in Python 3 (it works in
  Python 2, though it makes no sense and was just hiding a bug)
* no iteritems method on dict in Python 3 (use compat helper)
* P3-invalid "except" syntax (sadly pylint apparently does not have a
  standard lint for that, though it's easy to catch... if you can run
  the code under P3)
2017-07-24 15:13:03 +02:00
Nicolas Martinelli 8354efde0a [FIX] account: missing dependency
Introduced by 1e4f4299bc

opw-756270
2017-07-24 15:10:11 +02:00
David Tran 7106db6ca1 [IMP] point_of_sale: improve report.pos.order report for extendability
Closes #18253
2017-07-24 14:34:35 +02:00
qsm-odoo 5f1ef0910b [IMP] web, *: lazy load dialog xml template
* web_editor, web_planner, website

The 'Dialog' class is used in both backend and frontend. Also, lots of
actions can be done without the use of any modal. It thus makes sense
to lazy load its related xml only when a first modal is opened.

This change also allows to get rid of the "base_common.xml" file as the
dialog template is the only remaining one in there and, in the future
website update, it will allow to not load any static XML file on website
page loadings.
2017-07-24 14:28:35 +02:00
qsm-odoo 68766764bc [IMP] web: get rid of WidgetButton template
Qweb rendering is great to render "complex" widget structures. However,
using it to render something as simple as a button was not very
meaningful. This commit deletes the "WidgetButton" template and replaces
it with an utility JS function to render buttons according to given
parameters.

Also, this change will allow a better change. Before this commit, the
only templates left in the "base_common.xml" file are the "WidgetButton"
and the "Dialog" ones. With the removal of "WidgetButton", the file can
now be lazy loaded only if necessary, on the first dialog instantiation.
This will allow to remove the need to load static XML files on each
frontend page loading.
2017-07-24 14:26:59 +02:00
Richard Mathot afc5c0709a [FIX] delivery: missing parenthesis
Thanks to @xmo-odoo and its Python3 virtual machine for spotting this
one (and shame on Python2 that does not crash when comparing a method to
a float because voilà).
2017-07-24 14:11:55 +02:00
qsm-odoo f2521c9449 [FIX] web: frontend does not need X.tooltip templates
WidgetLabel.tooltip and WidgetButton.tooltip are backend static xml
templates. They should never have been in base_common.xml.
2017-07-24 13:41:50 +02:00
qsm-odoo dbfdd86cc2 [IMP] web: add a widget property which allows to lazy load xml files
Add the 'xmlDependencies' key to the 'Widget' class. If defined, it is
an array of URLs to XML files that the widget will need to work.
Those are loaded in the `willStart` method so that they are available
before all rendering parts.
2017-07-24 13:41:50 +02:00
qsm-odoo 417a664f16 [REF] web: improve ajax.loadXML behaviors
- Refactor the function and document it
- Multiple calls to the function with the same URL now load the
  templates only once
- A call to the function with an URL now returns a deferred which
  indicates when the given URL has been loaded (not when all the
  calls to the function are finished)
2017-07-24 13:41:50 +02:00
Thibault Delavallée 69c083583c [FIX] website_payment: add requirement on website
In order to be sure website is loaded and to allow searches in DOM require
on website was necessary. This is a partial revert of e66ba3ce1e
that was a bit hasty.
2017-07-24 13:35:15 +02:00
Martin Trigaux 9931a29930 [FIX] stock: include zero quantity products in search results
A special case was made for products not available when running a search on
the qty_available field.

For domains like ('qty_available', '<=', 5), it should include non-available
products too.

Fixes #18336
2017-07-24 13:23:08 +02:00
Jaykishan Solanki bee246b22b [FIX] stock: populate date_done field on picking 2017-07-24 13:14:37 +02:00
Khoi Nguyen 952c17b8a7 [FIX] web: add tooltips for buttons
Button tooltips have been missing since the switch to the new views. As
their omission was unintentional, this revision restores the
functionality.
2017-07-24 13:14:23 +02:00
Christophe Simonis f00aa596a3 [REL] back to v11 alpha 2017-07-24 13:06:32 +02:00
Laurent Smet cae497b679 [FIX] account_accountant: allow install coa without required transfer account (#18356)
Create a company, try to install a coa without specify an Interbank Transfer Account (required field):
The COA can't be installed due to the missing Interbank Transfer Account that will be created by the COA... that leads to a "deadlock".

-opw: 752928
2017-07-24 12:47:33 +02:00
Kinjal Mehta 0a13b7a7a2 [IMP] product: Remove field Category Type on product category
Purpose
=======

It is possible to break the installation of any module if a module that creates a product should be installed.

to reproduce:
set "all" as category of one product
then change "all" category to view type
then install pos (because pos installs one product)

you will get the error message in a traceback

See https://www.odoo.com/web#id=748876&view_type=form&model=project.issue&action=963&active_id=49&menu_id=4720

Specs
=====

remove "Category type" in categories

it seems to me the only usefulness of this was the deprecated tree view of product categories (no longer exists)
2017-07-24 11:46:09 +02:00
Pierre Masereel e2a255717f [FIX] stock: MTO move status
When we validate a SO with an MTO product, then an RFQ and a delivery
picking are created. The status of the delivery picking is in state
'confirmed', but should be 'waiting' as the delivery waits for a
specific delivery input.

The problem is caused by the unreserve method, which is called in the
'procurement_jit' module. This method only checks that a move has
ancestors to determine if the move should be in waiting or in confirmed,
which is not the case for our delivery move because the RFQ has not been
validated yet so there is not ancestors yet.

To fix this issue, we check the 'procure_method' of the move, and if it
is in 'make_to_order' we put it in 'waiting' instead of 'confirmed'.

We also fixed the function recalculate_move_state that could cause the
same problem.
2017-07-24 10:53:36 +02:00
Nicolas Martinelli c4ebea8cb1 [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`.

Introduced in 99743cc4aa

opw-752487
2017-07-24 10:47:37 +02:00
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