Before this commit, the field `next_serial_count` in stock.move, used to
know how many SN the user wants to generate, wasn't correctly set and
was always equals to 0.
closesodoo/odoo#40714
X-original-commit: 9a20896eddb6b98b569f4f83192ac876696baaa6
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Before this commit, when user creates a receipt for a product tracked by
serial number, using immediate transfer, the fields to generate and
assign SN was hidden.
The reason was the move is confirmed in this case, and those fields was
displayed only for partially available and assigned moves.
task-2123761
X-original-commit: 4f9b170e857509cf34e072051086a7e9590c330d
In this commit,
-Modify the message shown when we try to delete a done picking.
-In transfers, in detailed operations, set default hide on on
"Reserved" and "Lot/Serial Number".
task-id : 2124115
closesodoo/odoo#40309
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
In this commit,
- Prevent the product type 'Services' to be selectable from detailed
operations of a picking.
- Change the place of 'product_uom_id' field on the internal transfers.
closesodoo/odoo#40551
Task-id: 2124093
X-original-commit: 9209e7f2b842161eb1704cebc02675a0b5248750
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Steps to reproduce the bug:
- Install Inventory, Sales
- In General Settings/Inventory/Traceability tick "Lots & Serial Numbers"
- Create a stockable product A (e.g. duplicate Apple E-COM08) tracked by lots
- Update Qty on Hand: put the quantity inside a lot
- Change Demo User's settings: remove Inventory access
- Connect as Demo, create a quotation with A, try to confirm sale
Bug:
An access error was raised.
opw:2092809
closesodoo/odoo#40499
X-original-commit: 1da97d4b842444dd69a54692de0d6edfc20d1123
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
If a warehouse is created without code (eg. when created as a new group
from a kanban view grouped by warehouse) we would get a traceback
instead of an error:
```
The operation cannot be completed:
- Create/update: a mandatory field is not set.
- Delete: another model requires the record being deleted. If possible, archive it instead.
Model: Warehouse (stock.warehouse), Field: Short Name (code)
```
opw-2124162
fix#40233closes#40267closesodoo/odoo#40382
X-original-commit: b6caa179e17199b29a9ca4009c53acb378423926
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Issue: create an immediate transfer, add a move and a done quantity, the
picking is in waiting state instead of ready.
Due to rev[0], the moves added in an immediate transfer have an initial
demand. After auto-confirming them, their state were 'confirmed' and not
'assigned'.
Solution: we force the state to assigned
[0] 8303b1a69eclosesodoo/odoo#39492
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Before this patch, move added in a planned transfer once it is ready are
directly marked as assigned and the reservation is disabled on them.
People found it hard to understand why the check availability button did
not appear, plus the push rules were not applied.
Now we chose to use the autoconfirm mechanism on the added move and we
don't reserve them, so the check availability button reappear.
task-2081844
_action_done() creates extra stock move when quantity_done is superior
to initial demand. This extra move should be, after confirmation, either
merge into the original stock_move, either stay extra but the move lines
still linked to the first one should be shared accordingly to the quantity
done. The fix 561b3461a0 adapted the code
for MRP to split the move lines but neither those cases are applied in
MRP because the extra move has no picking_id field.
condition :
```if merge_into_self and extra_move.picking_id:```
will therefore be false as well as
```if not merge_into_self:```
To be sure the two extra move management cases are complementary, this
Commit keeps make sure the conditions are mutualy exclusive.
closesodoo/odoo#40230
Opw: 2087864
X-original-commit: 4e8ac38a6d67bcd5040af0b580bfa43da7841548
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
Install stock and sale. Create a sale with 2+ products, save and
confirm.
Look for the created picking.
There will be no source doument, because of
cb618e9a99
the behavior has changed when there are multiple source
document, possibly to avoid displaying the wrong source if they
differ.
Adding the possibility to display multiple source documents, eventually
truncating the list
opw-2117886
closesodoo/odoo#40098
X-original-commit: baad02d01b86a8d036524b789f046a54a878a729
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Business cases should not prevent the unlink of module-related records
during an uninstall.
This commit allows the reinstallation of sale_stock with demo data and
also allows the proper removal of tables and records if a db has any
non-draft inventory adjustments.
closesodoo/odoo#39776
X-original-commit: cedafe00941b869d284cd511633d7da15868fc0a
Signed-off-by: Adrian Torres (adt) <adt@odoo.com>
Usecase to reproduce:
- Set warehouse as 3 steps delivery
- On pack rule set the procure method as 'take from stock if enough or
trigger another rule'
- Do an inventory adjustement of a product and set 10 units in pack zone
- Do a delivery order for this product with only 1 unit.
It will create the delivery order from stock to pack even if the
quantity in pack was sufficient.
It's due to [1] that introduce a new function but if the force company
and location (with an integer) are both set in the domain it will
select the wrong ids. It will take all the location in the company + the
location in the context. However if a location is explicitly given to
the context, it should only consider the stock at this location.
[1] commit 330b99f60c
opw-2090384
closesodoo/odoo#39726
X-original-commit: e77d9fc735d845bbb0b5562c359fbf2354d72f0e
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
- Create a POS user for which the corresponding partner has no email
address.
- Connect to the POS with the created user
- Sell a product which creates a picking (e.g. Customizable Desk)
The picking is created in draft and not validated.
This is due to:
https://github.com/odoo/odoo/blob/6435b27c35faeafca452d26fa7fd50a7fe964029/addons/mail/models/mail_thread.py#L2199
We disable tracking and post the message as `sudo()`.
opw-2091808
closesodoo/odoo#39490
X-original-commit: 972b4bad55e76500847a525459865b81d6ad2ee0
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
On a delivery type picking, adds a button to able the partner to sign
the delivery on receipt.
task-1878607
closesodoo/odoo#39183
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Co-authored-by: sle-odoo <sle@odoo.com>
So we have to adapt
- the sanity checks
- the immediate/backorder wizards
- split the call to _action_done with and without backorder
This is a preliminary work to remove all the override in
stock_picking_batch and to allow choosing the pickings to immediate or
backorder directly in the wizards.
Before this commit, both wizards were calling _action_done and one
another. We make them go back through `button_validate` so that it is
more sane to handle and allow future extensions to add pre-action done
wizards.
Also the first part of button_validate is some sanity check. We adapt
them to be multi (inside of a loop over self) without any other
changes.
Now the wizard can work on the records (immediate: write the done
quantities) or work with the context (backorder: picking ids to not
backorder in the context).
Also we adapt the stock sms weird wizard (a confirmation wizard but the
feature is auto installed? wth). Now there it isn't manually called in
the middle of button_validate but it uses the pre_action_done_hook.
task-2069646
`action_done`on pickings should be a private method,
and called only trough the picking validation process.
task-1938108
closesodoo/odoo#39174
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
The default `compute_sudo=True` makes sense for recomputing stored
fields that are indirectly related to a business operation. This
ensures that the recomputation of the field does not break an operation
that is not aware of the fields to recompute.
However, computing non-stored fields in superuser mode is usually not
necessary. It even leads to unexpected values: counting a partner's
sales orders does not give the same result in superuser mode as in
normal mode. That is why non-stored fields are not computed in
superuser mode by default.
[FIX] account, delivery, event, hr_recruitment, point_of_sale, stock:
adapt the model definition to make all fields with the same compute
method have the same value for `compute_sudo`.
[FIX] sale: split the computation of `invoice_ids`, `invoice_count`
(non-stored) and `invoice_status` (stored), as no code is actually
shared.
closesodoo/odoo#39195
X-original-commit: 843fd38a97f02b49dc09d7f55919072d272fd80e
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
As this wizard only shows the first product overprocessed and does nothing else,
we remove it completely for cleaning purposes.
task-1938108
closesodoo/odoo#39161
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
All transit locations were set as active by default, confusing some users.
There are now set as active only when when a ressuply route is created
between some warehouses
TaskID: 1873106
Immediate transfers only fill the quantity done of stock moves/stock move lines
Those transfer are thus not taken into account for the forecast computation if they
are not validated. Indeed, the stock quant are not yet updated and the initial demand
is left blank.
This commit duplicate the quantity done of immediate transfer on their initial demand
this quantity is still hidden in the view but can now enter in the forecast quantity.
closesodoo/odoo#38169
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
- Go to Inventory > Configuration > Warehouse Management > Routes >
Make To Order
- Edit
- Swap two rules with the handles
- Save
An access error is raised.
This is due to the recomputation of `route_sequence` which is performed
on all companies.
Setting it as `compute_sudo` solves the problem.
opw-2072159
closesodoo/odoo#38104
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Usecase:
- Create a route without company
- Create a push rule for company B from intercompany to stock
- Apply the push rule on product and set in on a product.
- Connect with a user in company A
- Create a move from stock(company A) to intercompany.
- Confirm the move
-> The receipt for company B is not created.
Multiple issues:
- The rule is not found because it belong to the other company and is
filtered by the record rules. -> Aplly the seach as sudo if the move
is going to a location without company.
- Record rule error because a move from intercompany to company B is
created with a user from company A that has no access to company A.
-> Search and read company values and create the move as super user.
Based on work from Simon Lejeune <sle@odoo.com>
closesodoo/odoo#38124
X-original-commit: a80262e8b97256cac4bc5c406bc74a05f7189a00
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Some companies may have several locations with usage == 'inventory' and they would like to choose each time which adjustment location to use.
closesodoo/odoo#37022
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
This reverts commit 3431d7b1cd.
Due to recent changes in the orm, editing a draft move crashes. We
revert this commit while we find a proper fix.
closesodoo/odoo#37752
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Sets `date_done` and `state` fields as readonly in the model as they
must not be editable in the list view and they were already readonly
in form view.
Task #2078163
Makes the picking view list multi-editable, and some readonly conditions
was moved form the view to in the model (for the `backorder_id`, `name`,
`scheduled_date` fields).
Task #2078163
rev[0] writes the qty done on the move lines directly in put_in_pack,
meaning hitting discard in the delivery wizard left the move lines with
a changed qty_done. We fix that by editing the quantities in
_put_in_pack in the stock module and getting the right move lines in the
delivery modules: meaning, get the normal or suggested ones (a fix
missed by rev[1]) then with quantities or 0 quantities.
[0] e03c1a836f
[1] f6d88a2e8dclosesodoo/odoo#37563
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
On the product form view, the forcast stat button should open
the Graph view by default and not the grid one
closesodoo/odoo#37501
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
When the user do not set a company on a route and check warehouse selectable
then it's impossible to select a warehouse. It happens due to the
check_company domain ['|', ('company_id', '=', company_id)('company_id','=',False)]
closesodoo/odoo#37404
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
- Go to Inventory > Reporting > Inventory Valuation
- Run the report
- In the search view, filter on 'Location' or 'Warehouse'
The filter doesn't work.
Actually, the filter can't work. This is a hack introduced in order to
add context keys.
Originally, the function `search` was added to avoid the error log
'Non-stored field %s cannot be searched.'. This happens because the web
client adds the field in the domain on top of adding the context key. By
using `filter_domain`, no domain is added and no error is logged.
opw-2075456
closesodoo/odoo#37347
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
on a picking, move_ids_without_package is a subset of move_lines.
The inverse function on move_ids_without_package only work well when we
add a move.
This commit improves the inverse function to take deletion into account
closesodoo/odoo#36558
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
— Create a new product, it's tracking must be set to 'By Unique Serial
Number';
— Create a new purchase order, with 500 lines. Each line with 10 units
of quantity of the previously created product;
— Confirm the purchase.
Before this commit, the creation of the stock piking take a quite some
time, and becomes difficult to use this functionality.
Now, the creation of the stock piking time was significantly improved.
opw-2070738
closesodoo/odoo#37107
X-original-commit: a434b087c86888903e320532b5e75856fa32bd13
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Steps to reproduce the bug:
- Let's consider that warehouse A resupplies from warehouse B
- A has Outgoing Shipments in one step
- B has Outgoing Shipments in two steps
- Change Outgoing Shipments of B in one step
Bug: An integrity error was raised because route_id field is required
on model 'stock.rule'
PS Inspired from function create_resupply_routes
opw:2069163
closesodoo/odoo#36991
X-original-commit: 2a87b56efab1246fa85c1b507322e0909db3dd20
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>