Commit Graph
111138 Commits
Author SHA1 Message Date
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
Christophe Simonis f00aa596a3 [REL] back to v11 alpha 2017-07-24 13:06:32 +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
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
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
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
Christophe Simonis 9185eb4b79 [MERGE] forward port branch saas-17 up to f830f14d98 2017-07-20 13:26:09 +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
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
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
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
Mahendra Barad 64027f3555 [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:47:47 +02:00
xmo-odoo 27127b73c1 [FIX] Close POS session with amount 0 on statement lines
When trying to close a POS session (which confirms the bank statements
which reconciles the statement lines) if one of the statement lines
has an amount of 0 no payment object is
created (addons/account/models/account_bank_statement.py:905) and thus
``payment`` remains set to ``False``. In the past this was not an
issue but since b17e4a0f6b at the end of
the method (line addons/account/models/account_bank_statement.py:1003)
we unconditionally write to ``payment`` which blows up when it's
``False`` rather than a recordset.

This can happen if e.g. a POS order is composed only of free
products (don't ask...)

Fix by using an empty recordset instead of a boolean for a
non-payment, making payment.write a no-op.

OPW-752922
2017-07-19 11:43:32 +02:00
Khoi Nguyen f889d3af82 [FIX] web: prevent traceback when double-clicking links in modals
Before this revision, double-clicking links in a modal triggered a
traceback. This is because the second click attempts to change the
active view while it is still being changed by the first click (more
precisely, the controller of the active view is undefined on the second
click).

This commit ensures that on_attach_callback is called only if the
controller is defined.

Steps to reproduce the issue fixed by this commit:

1. Open a sales order;
2. Click on a product line;
3. Double-click on the product.
2017-07-19 11:00:39 +02:00
Jigar Patel b63e22f50e [FIX] web: Groupby not working on Pivot and Graph view
The groupby property was wrongly set in some cases: if a graph/pivot view is defined as a groupby on field F, but there is another groupby key G in the context, it will take F instead of G (at initial load).
2017-07-19 10:50:21 +02:00
Jigar Patel 6651016ed0 [FIX] web: Groupby not working on Pivot and Graph view
The groupby property was wrongly set in some cases: if a graph/pivot view is defined as a groupby on field F, but there is another groupby key G in the context, it will take F instead of G (at initial load).
2017-07-19 10:48:12 +02:00
qsm-odoo 9494161e23 [FIX] website_quote: increase robustess of menu generation
On online quotations, a left menu is automatically generated on page
load by searching for the <h1/> and <h2/> elements in the page. This
also considered the empty ones which do not make sense and were
breaking the menu's layout. Ideally, there should not be any empty
title in the page.

opw-752764
2017-07-19 09:25:11 +02:00
Rohan Patel fe9647f9c0 [IMP] web: improved status bar color (current state)
The current state in the status bar was a light gray, which is not easy to see. Its color should be slightly darker, and the same as stat buttons of form view (PR #18064)
2017-07-19 09:21:21 +02:00
Nicolas Martinelli 1cf12a9ae4 [FIX] sale: keep Salesperson
When creating an advance from a SO, the Salesperson is not kept.

opw-752490
2017-07-19 09:12:32 +02:00