Nicolas Martinelli cdf201a1dc [FIX] stock: decrease initial demand quantity
- Open a picking (example WH/IN/00002)
- Unlock
- Edit Initial Demand (from 35 to 4 for example)
- Click on Save

An error occurs: 'Record does not exist or has been deleted.'

When saving, the following values are sent to the server (example):
`{'move_ids_without_package': [
     [1, 31, {'product_uom_qty': 4, 'date_expected': '2018-10-02 08:27:14'}]
 ],
 'move_line_ids_without_package': [
     [1, 26, {'package_id': False, 'result_package_id': False, 'owner_id': False, 'lot_id': False}]
 ]}`

The field `move_ids_without_package` contains the new quantity. However,
decreasing the quantity will remove the reservation and therefore unlink
the move lines.

https://github.com/odoo/odoo/blob/718b0f8b63261e1312b5626d48de050b21a9dccf/addons/stock/models/stock_move_line.py#L349

This means that the field `move_line_ids_without_package` refers to IDs
which have been deleted when writing on `move_ids_without_package`.

We can make the field read-only if it is not displayed.

opw-1889802
2018-10-02 12:55:36 +02:00
2018-09-26 17:10:47 +02:00
2018-10-02 09:50:18 +02:00
…
2017-12-12 17:19:01 +01:00
…
2015-09-08 17:58:38 +02:00
2018-04-18 15:59:05 +02:00

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, Purchase Management, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

Then follow the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%