Commit Graph
103218 Commits
Author SHA1 Message Date
Olivier Dony 2fd4dfca7f [FIX] point_of_sale: update POSBox image creation script
- ngrok download URL has changed
- default kernel for raspbian image has changed and needs to match
- remove pre-existing git checkout to avoid conflicting
- wait a few seconds after setting up loop dev with kpartx to access image
  contents - sometimes required to let the device appear in /dev
2016-11-14 17:11:57 +01:00
Florent de Labarre 7be6c7404a [FIX] stock: expression error
Without this fix, the button of order rules does not appear in the form with a
product.product model.

Closes #14285
2016-11-14 17:03:15 +01:00
Florent de Labarre f68a304d1d [CLA] Signature fmdl
Closes #14286
2016-11-14 17:03:15 +01:00
Goffin Simon 57f320aa99 [FIX] website_sale: selected state in billing information
The selected state of the user was not displayed in the billing information
due to the detach function.

opw:693127
2016-11-14 15:52:53 +01:00
Christophe Simonis fb763f3a8f [MERGE] forward port branch saas-6 up to b5914e9 2016-11-14 14:50:29 +01:00
Christophe Simonis b5914e9ea8 [MERGE] forward port branch 8.0 up to 51561d3 2016-11-14 14:02:41 +01:00
Christophe Simonis 51561d3ac8 [FIX] base: restart server when installing module from apps
When a new module is installed, its controllers and static files should
be available. A restart is required to do so.
2016-11-14 13:45:24 +01:00
Odoo Translation Bot fa544c9da0 [I18N] Update translation terms from Transifex 2016-11-13 02:57:18 +01:00
Fabien Meghazi 4917df18d0 [FIX] bank_statmnt_import: skip bank statements with amount == 0 (opw: 693348)
Some banks, like ING, create a line for free charges.
We just skip those lines as there's a 'non-zero' constraint
on the amount of account.bank.statement.line
2016-11-10 16:02:42 +01:00
Pierre Masereel e248420348 [ADD] stock: test put pack in pack
We add a test checking that we can put a pack in a another pack.
2016-11-09 15:15:30 +01:00
Pierre Masereel 0d33621ad3 [FIX] stock: tests on stockable product
The tests are running on consumable product, it means that there is no
resevation of quants and verification of reserved quants when you create
and assign moves. So the tests are not really usefull with consumable
products.

To make the tests efficients, we set the products as stockable. And we
use 'reserved_availability' instead of 'availability' in tests
'test_10_pickings_transfer_with_different_uom' and in
'test_00_picking_create_and_transfer_quantity' be cause the assert is
done after the move reservation.

In test 'test_00_picking_create_and_transfer_quantity' when we check the
move_lines state after the action assign, the first and last should be
only 'confirmed, because they are partially available. When product
were not stockable, all lines were assign, because there was no check of
the reserved quants.

In 'test_10_pickings_transfer_with_different_uom' we removed the call
'picking_out.action_confirm()' and 'picking_out.action_assign()',
because they already have been called before.
2016-11-09 15:15:30 +01:00
Goffin Simon df34168177 [FIX] delivery: onchange_carrier with non integrated carrier
The price set for the non integrated carrier must be the same either when you
set it on the SO with button "set_price" or when you set it on the stock picking.

The field "carrier_price" must be in readonly when the state of the picking is done.

opw:691224
2016-11-09 13:33:37 +01:00
Nicolas Martinelli 11e834a4c1 [FIX] account_asset: account labels
The labels do not correspond to the purpose of the account.

opw-691623
2016-11-09 09:52:49 +01:00
Pierre Masereel 231090c0e6 [FIX] stock: '_move_quants_by_lot' bad 'false_quants' values
Hypothesis:
 - We have a product 'pa' managed by lot.
 - We don't create lots, when we receive products.
 - We create lots when we deliver products.
 - We don't have any units of product 'pa' in stock.
 - We recieve 4 units of product 'pa' in one picking.
 - We create a picking to deliver 3 products 'pa' (stock.move).
 - We actually deliver 4 units of product 'pa' (1 in 'LOT1', 1 in 'LOT2' and 2 in 'LOT3').
 - The problem also occurs when you just have 2 products in and 2 out in
   different lots, but we based the example on the tests defined in
   'test_stock_flow.py'

Thesis:
 - We don't have anymore quants of product 'pa' in stock after delivering the 4 units

Problem:
 - We actually have 3 quants of product 'pa' in stock, two having the 'lot_id' corresponding
   to 'LOT3' and 'qty=-1', and one having no 'lot_id' and 'qty=2'.

Origin:
 - This problem is caused by a bad condition in the function '_move_quants_by_lot' defined
   in the model 'stock.move'.

Explanation:

When we reserve the 3 units of product 'pa' in the picking out, the quant in stock having
'qty=4' is splitted in 2 quants, one having 'qty=3' and a 'reservation_id' equals to the id
of the move in the picking out. And one with 'qty=1', having not reservation id.

So once the products are reserved, we will complete the pack operation present in the picking.
We will add 4 units of product 'pa' dispatched in Lot as 1 in 'LOT1', 1 in 'LOT2' and 2 in 'LOT3'
to the pack operation.

Then when we validate the picking, the quants with references to 'lot_id' must be created, and
then moved to the client.
Because we have set 4 units of the product 'pa' in the pack operation, an extra move of 1 unit of
product 'pa' is added to the picking to have a total of 4 untis of 'pa' moved to the customer
location.

When the function '_move_quants_by_lot' is called, it gets in parameter 'false_quants' which contains
the quant reserved by the first move, it means the quant in stock with the reservation_id to the first
move, and 'qty=3'.

The function, will now split this quant in 2 different quants:
 - one with 'lot_id' corresponding to 'LOT1' and moved to customer location.
 - one with no 'lot_id' staying in stock location still reserved to the first move.

Then, the function should reset the 'false_quants' with the quant containing the 2 last units reserved
in the quant from the last split in order to complete the next operation (create a quant with lot_id 'LOT2').

But the condition to find this new reserved quant contains (x.package_id.id != ops.package_id.id) where x is
a quant which is wrong, because when we don't manage package, x.package_id.id is 'False' and ops.package_id.id
is 'False' too. So it doesn't find the remaining quant.

So to fix it, we changed this part of the condition as the quant package_id should be equal to the pack operation
package_id (if no packages, False = False)
2016-11-08 17:14:38 +01:00
Wolfgang Taferner f8c8715188 [FIX] account: partner of account move
The partner of an account move is defined as a related on the partner of
the move lines. This kind of relation implies that the partner of the
account move is the partner of the first account move line. This is
arbitrary and doesn't make much sense.

Closes #14167
opw-693289
2016-11-08 15:56:21 +01:00
Christophe Matthieu 6da7628b86 [FIX] web_editor: split h5,h3,...p... node to insert table
opw-686393
2016-11-08 15:48:47 +01:00
Christophe Simonis b795755001 [MERGE] forward port branch saas-6 up to a56d265 2016-11-08 13:51:21 +01:00
Christophe Simonis a56d2655b4 [MERGE] forward port branch 8.0 up to 4809b57 2016-11-08 13:07:33 +01:00
Goffin Simon 7fca8ad89e [FIX] account: wrong amount with _prepare_analytic_line
To have the right sign, amount = debit - credit

Before the fix:
 -Create an invoice in another currency than the currency of your company
 -Link the invoice lines to an analytic account.
 -Validate the invoice.

Bug:
The analytic lines have a negative amount in the amount currency field
which was a bit stange as it is the opposite sign than the amount in the company currency.

opw:692557
2016-11-08 11:53:01 +01:00
Nicolas Martinelli 40f2d55190 [FIX] account_asset: first depreciation amount
When an asset is set as Prorata Temporis, with a one month period, the
first depreciation amount is computed on the basis of the remaining days
in the purchase year. This doesn't make sense for a monthly
depreciation.

This commit makes the distinction between a monthly and a yearly
depreciation. In the case of a monthly depreciation, the remaining days
in the purchase month are taken into account.

opw-690034

Backport of 0a3899b72c

The fiscal year start date should be taken into account when calculating
the depreciation amount in case of prorata temporis.

opw-678072

Backport of e69d9b8b7d
2016-11-08 11:43:38 +01:00
Goffin Simon 6171f50e85 [FIX] delivery: onchange_carrier
Steps to reproduce:

- Create a Sales Order with 2 product qty
- Keep Delivery Method as DHL International
- Confirm
- Open Delivery Order
- Edit Qty of the Delivery Order
- Change Carrier (any integrated)
- Validate the transfer
- Process the backorder
- Edit and change the Carrier to normal or free delivery charges
- Validate

Bug:
The price of the free delivery charges was not recomputed and kept
the carrier price set on the SO.

Fix:
When the price of the carrier is "fixed" or "base_on_rule", the price must
be reconsidered in case of change.

opw:691224
2016-11-08 11:28:46 +01:00
Nicolas Martinelli 8fc81b871d [FIX] account: sequence of statement
It can happen that the account moves generated during reconciliation
from a bank statement with several lines have the same number.

This is a complement of commit 9365482df0. The order of statement lines
is not derterministic since it is based on `statement_id desc,
sequence`. Therefore, at each call of `process_reconciliation`, the
array `self.statement_id.line_ids.ids` can be different.

opw-690853
2016-11-08 10:53:30 +01:00
Nicolas Martinelli 11321b09fb [FIX] point_of_sale: PoS journal
complement of commit e99e0d6922, to make it work in multi-company
environments.

opw-691771
2016-11-08 10:07:27 +01:00
Goffin Simon dfe12d20df [FIX] account_asset: context in open_entries
The function open_entries doesn't have to propagate the context
because it propagated group_by from other models.
Example:
- Click on Accounting > Adviser > Assets
- Click on Group by > Category
- Click on an asset
- Click Entries

The group by "category_id" was propagated on the model "account.move"
and it led to a traceback.

opw:692888
2016-11-08 09:27:44 +01:00
Nicolas Martinelli 4809b57283 [FIX] account: tax line amount
The company currency is USD, the invoice currency is EUR.
- Create an invoice in EUR, set an invoice date
- Compute the taxes (click on "update" button)
- Change the exchange rate between EUR and USD
- Validate the invoice

At validation, the tax lines are not recomputed. Therefore, the tax
amounts, are still converted in the company currency using the old
rates. On the other hands, the other account move lines will have the
appropriate new rate.

Closes #14024
opw-692430
2016-11-07 14:31:00 +01:00
Nicolas Martinelli 0a17be70e0 [FIX] account: tax line amount
The company currency is USD, the invoice currency is EUR.
- Create an invoice in EUR, set an invoice date
- Compute the taxes (click on "update" button)
- Change the exchange rate between EUR and USD
- Validate the invoice

At validation, the tax amounts are not recomputed. Therefore, they are
still converted in the company currency using the old rate.

Closes #14024
opw-692430
2016-11-07 13:35:54 +01:00
Christophe Matthieu af865c2e9e [FIX] web_editor: widget html preview doesn't match wysiwig editor (widget html iframe)
The widget html is used for plain text and html content.
Need to check if the content is a valid html code, if is not wrap with p tag every lines.

opw-692158
2016-11-07 12:02:13 +01:00
Nicolas Martinelli 62b3de52dc [FIX] account: write-off currency
In a multi-currency environment, company currency is USD
- Create an invoice of 100 EUR, corresponding to 65 USD
- Register a payment directly from the invoice (button "Register
  Payment") of 60 USD. Choose "Mark invoice as fully paid".
- The write-off line contains the amount in the invoice currency (field
  `amount_currency` filled in.

This was introduced in commit 003f2ee9b.

On the other hand:
- Create an invoice of 100 EUR, corresponding to 65 USD
- Create a bank statement of 60 USD.
- Proceed to reconciliation, and create a write-off line of 5 USD.
- In this case, the write-off line does not contain the amount in the
  invoice currency.

The user expects the same behavior in both cases, so we introduce the
amount currency in the second case.

opw-690784
2016-11-07 09:13:25 +01:00
Odoo Translation Bot 369e0bcb45 [I18N] Update translation terms from Transifex 2016-11-06 02:56:48 +01:00
Odoo Translation Bot ac1c9b6cb4 [I18N] Update translation terms from Transifex 2016-11-06 00:36:01 +01:00
Joren Van Onder 0be279174d [FIX] point_of_sale: split up validate_order for easier customization
Certain localities (eg. Colombia, but South America in general) legally
require somewhat complex behavior when validating a POS order.

It was difficult to implement this behavior in the POS. The
validate_order function did way too much and was way too large. If a
user wanted to add an additional check that an order has to pass before
allowing validation the user would probably have to copy all the
validate_order code.

To solve these issues we split the functionality of validate_order into
two functions:

order_is_valid: returns true or false depending on the validity of the
order

finalize_validation: finalizes the order by sending it to the backend
etc.

Fixes #13142
Closes #13994
2016-11-04 17:49:50 -07:00
Christophe Matthieu 2c1bcc5b11 [FIX] web: display error when js modules fails
Up to this commit, the JS module system only notified failed modules as
an 'information' instead of an 'error'.  This was annoying, since the
runbot takes the result into account, and might be green even though a
module failed to load.
2016-11-04 16:40:58 +01:00
Christophe Matthieu 5f16a6f8ab [FIX] web_kanban: display kanban tooltip
Fixes opw-687563
2016-11-04 16:34:20 +01:00
Christophe Matthieu a8e79e960a [FIX] bus,im_odoo_support, web*: fix various memory leaks
* Tip are never destroyed when change view mode
* unbind methods
* mail: memory leak with unbind methods
* web: memory leak because 'ui-autocomplete' is never destroyed
* web_editor: memory leak for wrong unbind on destroy
* web: memory leak: must remove fileupload handler
* bus: memory leak: correctly debind handlers on window in bus.Bus
* remove handlers on switch buttons and views $buttons
* remove handlers on breadcrumbs
* web: memory leak: correctly debind handlers
* im_odoo_support: memory leak: remove fileupload handler odoo_support

Note: part of this commit was actually authored by aab
2016-11-04 14:07:35 +01:00
Josse Colpaert 3cb3379456 [FIX] point_of_sale -> stock: handling of lots/serial numbers
Before, the quantities on the pack operations were set also for the
pack operations that should have lots and had not, which is an inconsistency.
As at the end of the PoS, errors are not shown and not rollbacked, this
created really nasty situations.  With this code, it was never meant to
use lots in the PoS, but as the picking was not validated (but existed, because
not rollbacked) some people thought it as a wanted feature.

In the mean time, we had commit fafc048d02, but it will give
problems as it will not automatically create a backorder.  It is
better not to do anything when lots are involved somewhere in the picking
as then the user will see the open pickings in the PoS Orders picking type.
It is also important to not do anything when it is a move without a picking.

Needs to be forward ported to saas-11, where the file structure changed.

opw: 692045
2016-11-04 10:22:46 +01:00
qdp-odoo a0e0e14b70 [FIX] account: fix manual reconciliation with a writeoff that includes a tax.
The tax has to be only on the second line because otherwise the accounting entry is not correct. Note that I'm not sure it is a usefull use case, but at least the accounting entry of the w/o is now logical and corresponds to what you expect (and what you see on screen). OPW 689806
2016-11-04 10:13:39 +01:00
Nicolas Martinelli 30a3c05975 [FIX] product, stock_account: fields in product view
Previous commit b6cbc36f9 hides volume, weight and standard price in the
product view if a product has variants. The use case was the following:
- Create a product (template)
- Give a value to these fields
- Add attributes to the product (this creates variants)

The values were reset to zero. This is a normal behavior since the
relevant values are now on the product (product).

This reverts commit b6cbc36f9a.

opw-692833
2016-11-04 08:10:33 +01:00
Joren Van Onder fafc048d02 [FIX] point_of_sale: only set qty_done on non-tracked products
The POS attempts to auto-validate pickings and so it sets qty_done of
the pack operations to equal product_qty. In the case of a pack
operation about a tracked product this doesn't make much sense, as in
that case auto-validation will fail and serial/lot numbers have to be
manually specified by the user. Without this patch you end up with pack
operations that look like they're done, but still need to have
serial/lot numbers set.

opw-690516
2016-11-03 14:14:40 -07:00
qdp-odoo 5a77ff6f30 [FIX] stock_dropshipping: fix dropship accounting entries to avoid interim account never cleared.
This effectively reverts the patch 7bdd4de that was made on 8.0 then reverted by 001610e (in 8.0 too) but each of them manually forward ported to 9.0, except that the forward port of the last one forgot to remove the faulty commit.
2016-11-03 19:55:23 +01:00
Goffin Simon e0ffc23a59 [FIX] report_intrastat: Not allowed to delete record
It's not allowed to delete record from the tree view of intrastat report.

opw:692016
2016-11-03 14:46:47 +01:00
Goffin Simon 5f0bbe797f [FIX] sale: product_id_change with different unit of measure
When changing the product of SO line if the uom_id is different,
the uom of the product must be changed and quantity ordered is set
to 1.0.

opw:692556
2016-11-03 10:39:53 +01:00
qsm-odoo a545eb3919 [FIX] website: update gallery snippet thumbnails once an image is changed 2016-11-03 09:57:22 +01:00
qsm-odoo d632236c9c [FIX] mail: open follower menu to the right to prevent screen overflow 2016-11-03 09:54:29 +01:00
Nicolas Martinelli 2508786127 [FIX] account_asset: first depreciation amount
When an asset is set as Prorata Temporis, with a one month period, the
first depreciation amount is computed on the basis of the remaining days
in the purchase year. This doesn't make sense for a monthly
depreciation.

This commit makes the distinction between a monthly and a yearly
depreciation. In the case of a monthly depreciation, the remaining days
in the purchase month are taken into account.

opw-690034
2016-11-03 09:15:05 +01:00
Nicolas Martinelli 0a3899b72c [FIX] account_asset: first depreciation amount
When an asset is set as Prorata Temporis, with a one month period, the
first depreciation amount is computed on the basis of the remaining days
in the purchase year. This doesn't make sense for a monthly
depreciation.

This commit makes the distinction between a monthly and a yearly
depreciation. In the case of a monthly depreciation, the remaining days
in the purchase month are taken into account.

opw-690034
2016-11-03 09:08:09 +01:00
Christophe Simonis 92c81dc440 [MERGE] forward port branch saas-6 up to ab8d07c 2016-11-02 17:26:05 +01:00
Christophe Simonis ab8d07cf1f [MERGE] forward port branch 8.0 up to 86a9b78 2016-11-02 16:50:10 +01:00
Olivier Dony f2158e32c8 [FIX] http: permit debug mode on CORS-enabled routes
As of f814dd9908, debug
mode causes an extra X-Debug-Mode header to be sent
by the rpc() JS method.

This custom header was not whitelisted in the accepted
CORS headers, therefore any cross-origin call to a route with
`cors=True` would fail in debug mode, with a console error
along those lines:
   "Request header field X-Debug-Mode is not allowed by
    Access-Control-Allow-Headers in preflight response"

This would prevent loading the POS GUI in debug mode,
for example.

This commit is necessary in the 8.0 branch because
the POSBox is currently based on a 8.0 server and may
be accessed by a 9.0 POS or later, thus with the extra header.
2016-11-02 14:03:19 +01:00
Christophe Simonis 86a9b7893e [IMP] tests: use long message in case of error 2016-11-02 11:45:29 +01:00
qdp-odoo 9542924b94 [FIX] account: fix the bank statement reconciliation that wasn't proposing antthing for credits on liquidity accounts because of a wrong sql query (looking on negative values in credit columns 2016-10-31 17:37:18 +01:00