Simon Lejeune 0469d2e712 [REF] stock: new picking, move and pack.operation implementation
The big change is that we have now a many2many between the move and a
one2many between a move and its pack.operation (note: this model is
renamed as stock.move.line in a further commit).

Due to these changes, `action_done` had to be rewritten intierely, as it
depended and stock.pack.operation.lot and stock.move.operation.link,
that are now removed. This method was laregly inspired by the one in the
mrp module, and a further commit will make MRP uses all the core of
stock.

Due to the previous commit that refactored the stock.quant
implementation, the new concept is that the `product_qty` that will
always be in the uom of the quant (`product_qty` is a computed field in
the same style as the one of stock.move).

This commit also implements the logic that a manager is able to edit
done stock.pack.operation.

The stock.move has now a "partially_available" state (it was previously
a flag). The "split_from" field is removed now that we have a many2many
between moves (a sibling move is always a move that was splitted, or
with the backorder_id field).

The done quantity of a stock move is computed across the done quantity
of the move lines. There is an inverse method that allows user to fill
the done quantity directly on a stock move.

The reserve quantity of  stock move is computed accross the
`product_qty` of the linked pack operations.

`do_unreserve` will simply unlink the associated pack operation.
Unlinking a pack operation will unreserve.

`force_assign` will mark the move as available, in order to allow the
user to create pack operations (none are created because nothing was
reserved).

`action_assign` is rewritten and splitted in two parts: if the move has
a parent (mto) or not (mts). In the mto, we'll check the available move
lines and only reserve accordingly. In the mts, we'll reserve directly
on the quants.

`action_cancel` has changd a lot: in case of a delivery, the first step
does not anymore propagate cancellation to following moves and SO. As a
result it does not propagate in the other side in case of MTO or production.
It does not delete them if we delete the related sale order for example. In
order to correct this next activities will be added in the future. Technically
action cancel on move is based on procurment rule, this commit will set
the propagate field to false on the rule if the picking_type is 'pick'
or if we are in one step delivery.

We use this commit to reimplement `action_assign` (wiped by the new
quant implentation). A move is reserved if its move lines exist, so we
introduce a one2many between stock.move and stock.pack.operation (note:
a further commit renamed this model into stock.move.line)

We use this commit to implement `action_done` (wiped by the removal of the
models making the link between stock.move and stock.pack.operations). We
can use the one2many to the pack operations.

blabla manymany au lieu de one2many
blabla mto mts

Remove get_ancestors, as orig_ids will be used instead

validation

when we are creating some packe operation with lot name, the
pack_operation are unlink and a new picking is craeted.

This is caused the function _create_lot_for_picking that unlink pack
operation having no quantity reserved instead of ones having no quantity
done.

To fix this we changed product_qty to qty_done and move the code from
action_done of picking to action_done of move

fixup! [IMP] Merge_moves functionality + many2many procurement and original moves instead of one2many

fixup! [REF] stock: basics of new model and stock.move reservation

edit reserved move line

 This is the 1st commit message:

[REM] stock: stock.pack.operation.lot, stock.move.operation.link

These models will become useless once a one2many will be made between
stock.move and stock.pack.operation.

The `action_done` method on stock move has been wiped, as it depended
completely on the removed models.

Joint work with Josse Colpaert <jco@odoo.com>, amoyaux <arm@odoo.com>
and Pierre Masereel <pim@odoo.com>
2017-07-14 17:08:21 +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.

If you are a developer you may type the following command at your terminal:

wget -O- https://raw.githubusercontent.com/odoo/odoo/master/setup/setup_dev.py | python

Then follow the developer tutorials

For Odoo employees

To add the odoo-dev remote use this command:

$ ./setup/setup_dev.py setup_git_dev

To fetch odoo merge pull requests refs use this command:

$ ./setup/setup_dev.py setup_git_review
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%