Commit Graph
331 Commits
Author SHA1 Message Date
Touati Djamel (otd) f203edd374 [FIX] stock_picking_batch: compute the state of all the batches
Steps to reproduce the bug:
- Create two batches, one with picking and one without
- Try to compute their state together with an RPC call

Problem:
If the first has no picking, the second batch does not compute state because we use `”return”` instead of `”continue”`

opw-2725988

closes odoo/odoo#82671

X-original-commit: 0242fcee2618425bd87846d818cffcd368c25121
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Djamel Touati (otd) <otd@odoo.com>
2022-01-13 09:30:52 +00:00
Yannick TivisseandVictor Feyens 18952cdc76 [IMP] *: Convert single create method into multi
Taskid: 2703085
Part-of: odoo/odoo#80824
Co-authored-by: Victor Feyens <vfe@odoo.com>
2021-12-14 19:13:18 +00:00
William Henrotin 56e7bcf0cb [REF] *{stock,mrp}*: rename reserved fields
This commit rename product_uom_qty into reserved_uom_qty and product_qty
into reserved_qty on stock move line to stop mistake them with the stock
move quantities fields.

Task: 2648449
Part-of: odoo/odoo#80434
2021-12-07 16:20:06 +00:00
William Henrotin 6a23b9bcd6 [REF] *stock*: rename model stock.production.lot into stock.lot
Task: 2648449
Part-of: odoo/odoo#80434
2021-12-07 16:20:05 +00:00
yhu-odoo a9d9a258e4 [IMP] stock(_picking_batch): improve set/clear qty button
Add a "clear qty" button to revert the change by "set qty" button in
(batch) picking.
On the move, Whenever the qty_done != reserved, we consider it a
manual change from the user. "set/clear qty" buttons won't change the
line with manual change.
Show "set qty" button when there are moves with 0 qty_done and non-zero
reserved. Show "clear qty" button when we don't show "set qty" button
and there are moves with qty done == reserved but the number is not 0.

Task-2659233

closes odoo/odoo#78737

Signed-off-by: Steve Van Essche <svs@odoo.com>
2021-12-07 11:50:45 +00:00
Martin Trigaux a8e50921af [FIX] *: correct typos and English errors
closes odoo/odoo#80181

X-original-commit: efd178daee689192d4e930a075475587038b3e0d
Related: odoo/enterprise#22439
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-11-22 14:48:04 +00:00
brsy-odoo eaae9ea8ec [IMP] stock: improve order logic of stock.move.line
Currently, the order of transfer lines makes no sense for a picker
(it's in the order of the creation of the line). We want to have the
lines of the detailed operation in the same order as the picker will be
picking the products, so we order by source location, destination
location, sequence, and then by id (i.e. creation time) respectively
instead.

Also the printing report of the batch transfer is on too many pages,
it's one page by location, but we always group on 'from location'.
So it would be better not to split by location and keep the report
on the least number of pages possible.

task-2496324
odoo/enterprise#21921

closes odoo/odoo#79446

X-original-commit: 9b120caa2a5cd5e2487d663a180b486b5bdb201b
Related: odoo/enterprise#22144
Signed-off-by: Tiffany Chang <tic@odoo.com>
2021-11-08 07:07:59 +00:00
Tiffany Chang (tic) a44dda1a90 [IMP] stock: conditionally show "Allocation" (reception report) button
Simplify user workflow by not showing the "Allocation" button in the
(batch) picking form view if there is nothing to allocate (i.e. when
reception report is enabled).

Also:
- fix the location search condition for the outgoing moves that can
  be allocated to (i.e. the same logic used in show_allocation field
  compute logic is also used in reception report generation/auto-opening)
- replace ['stock.location'].search() with ._search() for better
  performance.

Part of Task: 2632884
ENT PR (for barcode equivalent): odoo/enterprise#20805

X-original-commit: 11ffb85fe7398854e4aefa4f9d0cfbc3b88aad8a
Part-of: odoo/odoo#79408
2021-11-05 13:48:51 +00:00
William Henrotin 3a1473c75c [REF] *stock*: rename move_lines into move_ids in stock.picking
closes odoo/odoo#78732

Task: 2673000
Related: odoo/enterprise#21815
Related: odoo/upgrade#2956
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
2021-10-27 15:48:51 +00:00
Rémy Voet (ryv) b33983d532 [REF] stock*,mrp*: clean setUp vs setUpClass
In a lot of test class, we use `setUp` instead of
`setUpClass`. `setUp` is execute for each test method and `setUpClass`
will be execute only once by Class (and use savepoint + rollback).

Then change setUp into setUpClass reduce the time to make all tests
and avoid to repeat this error for the future.

closes odoo/odoo#78082

Related: odoo/enterprise#21563
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-10-13 18:24:16 +00:00
wan 9b0baa3aa4 [FIX] *: product back2basics post-freeze fixes
This should have been a fixup of 37eb0dfbb54db1c062276cd8c172bf8dac9e557b but we needed
to freeze 🤷‍♂️

closes odoo/odoo#77344

closes odoo/odoo#77876

Related: odoo/enterprise#21425
Related: odoo/enterprise#21467
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Signed-off-by: William André (wan) <wan@odoo.com>
2021-10-11 10:15:49 +00:00
William Henrotin 0419f27f38 [FIX] stock_picking_batch: wrong widget
The widget many2onebutton doesn't exist anymore. As the web client
fallbacked on the default many2one widget. The behavior was the intended
one but with a warning in the logs. This commit uses the proper widget
to avoid the unintentional warning

closes odoo/odoo#76882

X-original-commit: 4547cbff9f2850fcfcd536a574fd5c29c44ecdb5
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-09-21 08:08:51 +00:00
Martin Trigaux ef8ad324b0 [I18N] *: export 15.0 source terms
closes odoo/odoo#76542

X-original-commit: 63e6807437295519a0f4705fb88644d6d557ca3a
Related: odoo/enterprise#20882
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-09-16 07:17:40 +00:00
William Henrotin eb4d8e452c [FIX] prpduct,stock: fixes on product labels
This commit fix some issue introduced with d9f45ba694.

X-original-commit: e4b9dab45665b0ba83d84c52ecc4638472ad454f
Part-of: odoo/odoo#76503
2021-09-15 07:48:12 +00:00
William Henrotin 9850a3ac9b [FIX] stock_picking_batch: split move for wave
Before this commit. The move splitting was not considering _split return
a list of values.
This commit also add a bunche of missing tests

Task : 2411102

closes odoo/odoo#76371

X-original-commit: 49164aa65f4eea0e46fff207c841beb94154f636
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-09-13 10:38:47 +00:00
William Henrotin 90beedf036 [FIX] stock_picking_batch: pass owner id to wave transfer.
X-original-commit: 03055045d227398e8cfda54ff9281319fc5e9e1d
Part-of: odoo/odoo#76294
2021-09-10 08:49:22 +00:00
William Henrotin bdcca63411 [FIX] stock,mrp: search on picking_type_id
Commit 04f3cac527 makes picking_type_id compute on stock_move_line to
get the picking type of either the picking or the manufacturing order.

Right after, commit dd53f5323f set picking_type_id related of the
picking one to be able to search on it. (in this later scope,
manufacturing part was not needed, hence the related instead of compute.

This commit mix the two idea by having a new search function on the
computed fields to filter stock move line depending on their picking
type.

X-original-commit: d535108f96d62f217dda7cbb676f9d60b7477f4f
Part-of: odoo/odoo#76294
2021-09-10 08:49:21 +00:00
William Henrotin a4c9f331f5 [IMP] stock_picking_batch: add tests on wave
Following dd53f5323f, this commit adds some test on waves .

X-original-commit: f0b2aec24c87945c7f30ff95ad2d20da27d8f0f4
Part-of: odoo/odoo#76294
2021-09-10 08:49:21 +00:00
William Henrotin eb0ebc077a [FIX] stock_picking_batch: remove empty pickings
If a picking is totally empty (no move line with quantity recorded) in a
batch at validation. This one will be ignored by the immediate transfer
mechanism as well as the backorder creation. It is simply remove from
the batch.

closes odoo/odoo#63291

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-09-02 14:14:10 +00:00
William Henrotin 8d3805eccb [IMP] stock_picking_batch: add quick access to batch
This commit adds a quick access to all the batches and waves of a picking
type (only transfers picking type) ready to be processed from the
Inventory dashboard.

Task : 2411102

Part-of: odoo/odoo#63291
2021-09-02 14:14:10 +00:00
William Henrotin dd53f5323f [IMP] stock: wave pickings
This commit introduce Wave Pickings. This new object is a group of stock
move lines related to different pickings. The goal is to group stock
movements having similar characteristics like same source location, same
product category, ...

Wave pickings are created from stock move lines. Those are removed from
their picking to a copy of it. All the new picking are grouped together
in a new batch picking. This batch is the wave.
To differentiate the batch pickings and the wave pickings. This commit
introduces a new menu and a new sequence.

Task : 2411102

Part-of: odoo/odoo#63291
2021-09-02 14:14:09 +00:00
William Henrotin d9f45ba694 [IMP] product,stock{_picking_batch}: product labels revamp
This commit removes the pdf and zpl reports for product templates and
variants. Instead, labels are printed via a new wizard allowing to
specify the label quantity, format and optional text.

There are a bunch of usual retail label sizes in pdf or zpl code

Task : 2501730

closes odoo/odoo#69690

Related: odoo/enterprise#20246
Related: odoo/upgrade#2542
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-09-01 15:01:48 +00:00
Tiffany Chang (tic) 53cc41016f [IMP] mrp, product, {purchase_, sale_}stock{_picking_batch}: add reception report
New reception report added for non-outgoing transfers. This is intended
to support easier stock allocations by allowing dynamic MTO
assignment/unassignment, e.g. if we have an incoming transfer with
products we want to assign to an existing outgoing transfer, then we can
use the report to create a MTO link to the specific outgoing moves. To
support this assignment flow, the report also allows printing of labels
to place on the product so stock workers know which transfer/MO the
product has been assigned to.

Expected use case is when a product is purchased to fulfil a sale.
Demo data has been added so reception report can be immediately
seen/used for this flow.

Implementation Notes:
- Report has been made flexible to work with batch transfers.
- Only done moves can be assigned to moves that already have quants
  reserved (prevents undesired behavior + this makes sense logically)
- Confirmed (+ Done and everything inbetween) moves can be assigned to
  any confirmed moves that are not already assigned.
- Report does not affect quant reservation/unreservation at all. It
  works only with linking moves (i.e. move_orig_id/move_dest_id) so
  move/transfer linkage traceability is stored within db (i.e. this
  isn't possible with quants)

Limitations: To keep code simple for now, this assignment flow will
  break in certain cases:
1. Done amount of an assigned move is less than the Demand amount
   (linked move will not autoreserve correctly when assigned move is
   validated, same issue already occurs in multi-step transfer).
2. If a linked move is unreserved after its assigned move is
   validated, then another move can reserve its quants and its
   assignment link will not be accurate.
3. Already reserved SNs + assign move, may lead to mismatching SNs
   between report and what's actually reserved.
4. Changing a linked move's Demand amount after a move is assigned to
   it.
5. Potential moves to assign to are only checked for being in same
   warehouse, not in a matching source location to destination location.
   User is expected to make this match on their own.

Task: 2500844
ENT PR: odoo/enterprise#18268
Upgrade PR: odoo/upgrade#2731

closes odoo/odoo#70669

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-08-17 11:42:23 +00:00
Martin Trigaux c7bac3dee0 [IMP] *: make ir.model.data helper private
No reason to interfact with them directly in RPC
2021-08-10 13:49:04 +02:00
Xavier-Do 288595f558 [FIX] *: add explicit license to all manifest
The license is missing in most enterprise manifest so
the decision was taken to make it explicit in all cases.
When not defined, a warning will be triggered starting from
14.0 when falling back on the default LGPL-3.

closes odoo/odoo#74245

Related: odoo/design-themes#48
Related: odoo/enterprise#19862
Signed-off-by: Xavier Dollé (xdo) <xdo@odoo.com>
2021-07-26 13:09:57 +00:00
Kevin Baptiste 86aa7b78aa [IMP] *: introduce data-hotkey on form and modal views
Define `data-hotkey` on most used action buttons.

For the modals, the following keys are dedicated for "special"
actions:
 - Alt+G: add
 - Alt+V: save
 - Alt+Z: cancel

closes odoo/odoo#73275

Taskid: 2588233
Related: odoo/enterprise#19464
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2021-07-15 08:39:49 +00:00
Tiffany Chang (tic) b75ada65d3 [IMP] stock_picking_batch: manage batches better
This commit loosens 2 things:
1. A batch can now be deleted for all statuses except 'done'
2. Cancelled batches will now remove links to any pickings assigned to
   it (so they can be more easily reassigned in barcode app)

closes odoo/odoo#68898

Task: 2486993
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-07-12 15:19:14 +00:00
Martin Trigaux 6758868731 [I18N] *: export saas-14.4 source terms
Without demo data

closes odoo/odoo#73560

X-original-commit: 802e46541117573e028b711ea33dad9df9075a39
Related: odoo/enterprise#19602
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-07-12 10:57:37 +00:00
bit-odoo 800f9c499a [FW][FIX] mail, various: show only my activities shown through systray
Before this commit, suppose we have a scenario like below

  Task-A:
    Activity-1:
      name: Email ( Today )
      Assigned to: User-1
  Task-B:
    Activity-1:
      name: Email ( Today )
      assigned to: User-2
    Activity-2:
      name: Call ( Due in 3 Days )
      assigned to: User-1

When User-1 goes through the systray 'Today' filter shortcut he gets both
Task-A and Task-B in the list instead of only Task-A. Indeed currently
activities are not filtered based on current user with its deadlines.

However purpose of systray is to indicate activities current user has to
perform instead of global activities.

After this commit activities will be filtered based on deadlines as well as the
current user. In order to achieve this behavior we needed to pass a domain like
[
   ('activity_ids.date_deadline','=', fields.Date.today()),
   ('activity_ids.user_id','=', 1)
]

And for that purpose we introduced a non-stored compute field with a search
method.

Task ID-2438822
COM PR odoo/odoo#72219

X-original-commit: f4eaf4d8fb2f97240201104dcd4fc7e2674bce02
2021-06-21 07:51:00 +00:00
yhu-odoo e310d92958 [IMP] stock_picking_batch: cancel empty batch picking
As pickings can be moved from a batch into an another one, a batch can suddenly
be emptied or having no more active pickings.In such case, we cancel it.
This way, empty batches won't be displayed by default as there is a default
filter showing only draft or in progress batches.
If we manually remove all pickings from a batch or create a empty batch, we
consider it intentional, and won't cancel it automatically.

Task-2464457
PR #66600

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-05-18 12:59:25 +00:00
yhu-odoo d1448b666b [IMP] stock_picking_batch: allow create batch with picking in other
batch

We already allowed the stock.picking.to.batch wizard to create batch
with pickings already in other batches. This commit will also allow you
select pickings that are already in other batches on the batch form.

Task-2464457
PR #66600
2021-05-18 12:47:14 +00:00
Martin Trigaux 41d8b8cf68 [I18N] *: export saas-14.3 source terms
closes odoo/odoo#70673

X-original-commit: bcb9ff784e44462384b0a43a0a23eed7a1111bc5
Related: odoo/enterprise#18269
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2021-05-11 12:28:28 +00:00
Arnold Moyaux bdcb3d192b [REF] stock: move stock.inventory feature into stock.quant
This commit removes stock.inventory(.line) and moves its general
functionality into stock.quant. Some features are lost during this
switch as well.

Feature Additions:
- New single list view for inventory adjustments (no more multiple
  inventory adjustment records to keep track of!)
- Improved cyclic counts (annual inventory day setting) + next inventory
  dates are immediately viewable in view (vs auto-generated inventories
  based only on location)
- Specific quants (i.e. counts) can be assigned to users for more
  flexibility (vs only able to restrict by location + product
  combinations)
- Counts can be requested (i.e. bulk assigned to user/for a specific
  inventory date)

Feature Removals:
- Can no longer look at previous inventory adjustments linked to a
  specific record. Each quant has a history button to show inventory
  related moves. [relevant account moves are also now harder to see via
  stock as well]

Other changes:
- Bulk of changes were for demo/test
- Some changes were done to ensure "Update Quantity"/"Inventory Report"
  views still mainly function the same as before with the exception of a
  new column added to support updating quant quantities in these views.

Task: 2440026
ENT PR: odoo/enterprise#17329
Upgrade PR: odoo/upgrade#2326

closes odoo/odoo#68409

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2021-04-02 11:51:38 +00:00
JF Aubert 5604e468d2 [IMP] stock: ease receipt/delivery encoding
When you want to validate a picking with a lot of products, the system notifies "You have not recorded done quantities yet, by clicking on apply Odoo will process all the quantities."
Nice and easy, except when you were not able to process all the quantities.
In that case you have to update all but the few lines manually.

Also added to batch pickings

task-2158092

closes odoo/odoo#58487

Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-03-22 14:00:20 +00:00
Christophe Monniez 2949138a7d [IMP] various: use the barcode qweb widget whenever possible
When using the route `/report/barcode/...` in a report, wkhtmltopdf
makes htpps requests on the server to retrieve the barcode image.
If a lot of barcodes have to be printed, this can overload the server
with too much requests and makes wkhtml crashes.

With this commit, the qweb barcode widget is used to include the barcode
as an img tag with inline barcode image as base64 data.

closes odoo/odoo#64211

Related: odoo/enterprise#15619
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2021-01-12 12:50:23 +00:00
Adrian Torres 679185f3e8 [IMP] *: replace all raises inside unlink by api.ondelete
With this commit, all instances of errors being raised inside
`BaseModel.unlink` overrides are moved into methods decorated with
`api.ondelete` which is safer.
2020-12-04 09:16:16 +00:00
Tiffany Chang (tic) c7f53f770c [IMP] mrp, (purchase_)stock: improve move reservation
Currently stock moves are auto-assigned (i.e. reserve free stock) both
when the scheduler is run and when a corresponding stock move that can
assign a move is completed. This strictness was causing issues for
prioritization of moves to assign, for example a picking with a
scheduled_date far in the future could automatically reserve all stock
if it was created before another picking that an immediate
scheduled_date. To ease this, an extra setting has been added to
stock.picking.type to let users choose how reservations should occur for
moves assigned to that picking_type (or picking with that picking_type):

1. 'at_confirm' = automatically when:
   - stock is available when the move's associated picking/MO is
   confirmed,
   - when new stock becomes available,
   - when the scheduler is triggered (+ stock available).
2. 'manual' = user must always manually click "Check Availability"
   button (scheduler will no longer reserve).
3. 'by_date' = automatically when within the move's reservation_date
   and:
   - stock is available when the move's associated picking/MO is
   confirmed,
   - new stock becomes available when move is already confirmed, or
   - the scheduler is run (+ stock is available).

'by_date' has an extra option of # days before the move's scheduled
date that affects the move.reservation_date.

Task: 2359317
Upgrade PR: odoo/upgrade#1868
ENT PR: odoo/enterprise#15050
2020-11-30 16:28:47 +00:00
svs-odoo 8999b3a37b [IMP] stock_picking_batch: demo data flux
Decreases the move lines qty to process for the picking batch #1 in
order to make the demo flux quicker.

closes odoo/odoo#58909

X-original-commit: 15cede0cbef24f7a1ec3a205aee8155e908a2404
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2020-09-30 17:15:03 +00:00
Victor Feyens bcedc9f5eb [FIX] various: use existing state values for state-based conditions in views
Various attributes use state field to control display of nodes: like the
'states' (visibility), statusbar_visible (available status in status bar).
In this commit we fix various incorrect state values as those are either
typos, either references to dead or removed status.

An heuristic to detect invalid state for conditions will land soon in master.
As this commit targets a stable version only view fixes are provided.

Task ID-2329114
PR odoo/odoo#56946

X-original-commit: b4e1e9f3ae86e6b5e7015c0241791f733ee942f4
2020-09-03 08:45:22 +00:00
Martin Trigaux 90d85eb9c5 [I18N] export saas-13.5 source terms
Without demo data

closes odoo/odoo#56869

X-original-commit: 33f251b6489455cd7221f2c62dee0400a69784b8
Related: odoo/enterprise#12836
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-01 11:18:00 +00:00
svs-odoo c1aa0d97bf [IMP] stock_picking_batch: internal -> delivery
Change the demo data to create pickings/picking batchs about deliveries
instead of internal transfers.
Made this change because multi-location is disabled by default so it
doesn't make sense to work with internal transfer with this config.
Also, renames these data records reference to avoid migration issue as
the pickings/picking batches picking type was changed.

Adds a second picking in the batch picking BATCH/00001 because it
doesn't make sense to have a batch picking for only one picking.

X-original-commit: ff2d4d77019a137008a7af5b0742c9ababeb5df9
2020-08-27 13:34:54 +00:00
Tiffany Chang (tic) d70337172f [FIX] stock_picking_batch: add missing space in table
This commit makes it so when a stock_picking_batch report with 1+
SN/lot values assigned is printed, then the rows without a SN/lot value
will properly align the rest of its values afterwards (i.e. keep
product barcodes from printing in Lot/SN column).

Discovered during overall barcode improvement task.

Task: 1884520
Closes: odoo/odoo#55096
2020-08-20 15:06:08 +00:00
Tiffany Chang (tic) 58316d1546 [IMP] delivery, stock(_picking_batch): add "Put In Pack" button
This commit sets up the logic and adds the button for "Put in Pack"
action that already exists in stock.picking. Reuse/extension of logic
from stock.picking reused where possible, including extension of pack
wizard to handle products with different destination.

Note that logic to handle "Delivery Packaging" wizard when "Delivery
Methods" is active was purposely not extended to work correctly in batch
pickings due to complexity of adding in a new module just to handle
conflicting carrier_ids across pickings in the same batch. It is
expected that this use case will not occur except in case of user error.

Additionally, stock.picking implementation of 'put_in_pack' method has
been renamed to 'action_put_in_pack' to have consistent naming (and
support enterprise level code).

Part of "1. Improve Batch Pickings" specification of overall barcode
improvements task.

Task: 1884520
Enterprise PR: odoo/enterprise#12086

Closes: odoo/odoo#55096
2020-08-20 15:06:08 +00:00
Tiffany Chang (tic) d8cd37fc72 [IMP] stock_picking_batch: include src/dest package in batch picking
This commit adds the source and destination package fields to the form
of batch stock pickings.

Part of "1. Improve Batch Pickings" specification of overall barcode
improvements task.

Task: 1884520
Related Enterprise PR: odoo/enterprise#12086

Closes: odoo/odoo#55096
2020-08-20 15:06:08 +00:00
Tiffany Chang (tic) 71e7f56719 [IMP] stock_picking_batch: add "Scheduled Date" field
This commit adds a "Scheduled Date" field to the batch pickings. Logic
behind this date is a bit tricky:

1. If "Scheduled Date" is edited directly in batch then this date will
   also be applied to all of its picking's "Schedule Date"s.
2. If "Scheduled Date" is not edited directly in the batch, then this
   date will be the earliest date of its assigned pickings and pickings
   will maintain their original scheduled date' including if picking
   scheduled date is changed.
3. If "Scheduled Date" is not edited directly and all pickings are
   removed or there are none then date will default to no date.

First cut of test for scheduled_date logic has also been added. Update
will be needed for testing onchange logic since it is currently not
supported by the tests.Form due to M2M widget used with O2M picking_ids
(M2M widget is used for when doing a "Add a Line" transfer to a batch
in backend).

Additionally this commit adds the 'scheduled_date' and 'operation_type' to
the kanban view.

Part of "1. Improve Batch Pickings" specification of overall barcode app
improvements task.

Task: 1884520
Enterprise PR: odoo/enterprise#12086
Upgrade PR: odoo/upgrade#1569

Closes: odoo/odoo#55096
2020-08-20 15:06:08 +00:00
Rémy Voet (ryv) e40553723b [IMP] stock,mrp,purchase: refactor priority
- MO/picking/PO/stock.move have now the "same" `priority` fields
(Boolean logic: Normal or Urgent).
These models are now sort by priority first. Note that the priority field of
stock move is a technical one.
- For MO and picking, the set of `priority` field change priority of
the related stock move. The prioriry field on stock move is
used by the scheduler for reservation ('Urgent' before 'Normal')
- The Stock Replenishment Report also take in account the priority
to be consistent with the reservation.

task-2246665
2020-08-18 07:48:27 +00:00
Victor Feyens fdb23e282b [IMP] *: wrong any() usage
Replace wrong usages of any(list|recordset), by any(generator)
to speed up computations, avoiding list creations and/or looping twice on a recordset
for nothing.

any([generator]) => any(generator)
any(filtered) => any(generator)

closes odoo/odoo#55768

Related: odoo/enterprise#12360
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-08-14 09:56:10 +00:00
Victor FeyensandSteve Van Essche 8acfc6b965 [FIX] stock_picking_batch: wrong sanity check on picking creation.
1) Wrong use of self.batch_id in an api.model method.
2) Fix demo datas which didn't pass the sanity check (after the fix)

Avoid to put draft picking into non-draft batch picking and use batch's
actions instead of picking's actions for confirmation and reservation.

closes odoo/odoo#55254

X-original-commit: 9e9f50169ba4d4698ce64b0865db4cc6b4833b0e
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Co-authored-by: Steve Van Essche <svs@odoo.com>
2020-07-31 10:13:08 +00:00
Xavier Morel 6835aeb0de [REM] core, *: deprecate <act_window> and <report>
Convert deprecated tags through the codebase.
2020-07-28 13:03:13 +00:00
yhu-odoo b3c8287dc5 [IMP] mrp,stock(_picking_batch): improve empty screen
1. Batch transfers: set demo data backgroud for Kanban & Tree
2. Packages: set demo data backgroud for Kanban & Tree, update the
helper message.
3. Lot/SN: improve helper message.
4. Stock inventory: use a scanner instead of the smilling face in the
helper.
5. Replenishment: Enable sample data and use new helper image.
6. mrp: Enable sample date and use new helper image for workorder.

Task 2253588
PR #54415

closes odoo/odoo#54741

X-original-commit: 7c75ec9951f6d55121d6dc8cb4942e96641b4a66
Related: odoo/enterprise#11957
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-07-22 08:53:36 +00:00