When `manual_consumption` field on sm is used in any onchange function,
the value will always be computed for the `new_id` record instead of
using the original value stored in database. This results in a different
value in some cases. In this commit, we chech if the compute function is
called from an onchange funtion or not, if so, we use the original value
instead of recomputation.
closesodoo/odoo#140753
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
When a component is in manual consumption and without picked checked,
set qty button on the warning wizard doesn't work for it. This is
because we didn't set the move picked = True when click set qty button.
Fix it by set the value.
Part-of: odoo/odoo#140753
To reproduce:
1. Create an MO of Product with BOM
2. Manually set qty for a component
3. Produce all
Issue:
Two consumtion warning lines are shown, and numbers are wrong
Part-of: odoo/odoo#140753
If there are pre-production rules, their delays should also be added to
the total delay of a manufacture route.
Task-3081481
closesodoo/odoo#137810
Related: odoo/enterprise#48516
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
For subcontracting, we need to consider both vendor lead time and
manufacturing lead time, and DTPMO (Days To Prepare MO) on the BOM.
Subcontracting delay =
max(Vendor lead time, Manufacturing lead time + DTPMO) + Days to Purchase + Purchase security lead time
Same thing applied to Bom overview, except:
1. Availability state will be computed based on the delay time of it's
components. DTPMO on the bom won't be take into account.
2. Lead time will use the DTPMO on the BOM. DTPMO will be added to
the lead time when it's a manufacturing bom or when it's a
subcontracting bom with Manufacturing Lead Time + DTPMO > Vendor Lead Time
Task-3081481
Part-of: odoo/odoo#137810
1. Rename 'Reserved' on MO components to 'Quantity'
2. Hide `picked` field on MO compoents by default
3. Add tooltip for `picked` field on sm.
closesodoo/odoo#140150
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Commit a97b352e761b421f6205b03a9b87c79358c128cd removed MrpProductionComponentsX2ManyField
to use MrpProductionComponentsListRenderer for coloring quantity cells
for manual consumption. Correctly extend StockMoveX2ManyField in this
commit.
closesodoo/odoo#140141
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
`quantity` on sm is depended on `quantity` on sml. When create new
sml, `quantity` of sm will always be 0. To fix it, we use origin sm in
the compute function to get correct value.
closesodoo/odoo#139913
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
In 6698406b92a598f24fa0a778a28b6ef727adc008, we removed action
mrp.mrp_production_report. action_view_mos still using this action, we
change it to use mrp.mrp_production_action instead.
closesodoo/odoo#136382
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Fix the issue when update the bom on a draft MO, the product_qty and
product_uom_id will be reseted to 1.0 unit.
The original product_qty and product_uom_id hould be kept when update
bom.
X-original-commit: f1a397ede16c56db3410fd9c5fe387dc98c46422
Part-of: odoo/odoo#135691
1. In mrp settings, check workorder by default
2. Remove stock for Table leg in demo data
closesodoo/odoo#133758
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
The report "Manufacturing Orders" is just the graph/pivot view of MO,
most of the infomation can be found on a more accurate report
"Production Analysis".
In this commit, we removed "Manufacturing Orders" from the report view.
Users can still access it from Operations -> Manfacturing Orders ->
graph/pivot view.
Task-2695732
closesodoo/odoo#130342
Related: odoo/enterprise#44912
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Currently on stock moves, product_uom_qty indicates the demand qty
before the move is done and it indicates the acutual done qty when
the move is done.
As a result, when validate a stock move with qty_done !=
product_uom_qty, a new move is always created for the difference.
And the product_uom_qty of the original move will be changed to match
qty_done.
In this commit, we change to that product_uom_qty will always indicate
the demand qty, and qty_done will always indicate actually done
quantity.
To do that, when underconsumption, we won't split the move when no
backorder. and when overconsumption, we will always merge the extra move
back to the original move.
Task-2695732
Part-of: odoo/odoo#130342
The field manual_consumption field on mrp.bom is computed,
`readonly=False` should be added to make sure it's changable.
Also on the form view, `force_save="1"` should be added to make sure the
value will be saved since we make it readonly in some cases on the view.
closesodoo/odoo#132600
X-original-commit: 4bdfd0d1e0d95af92a1afae5888e9e587fc4994e
Signed-off-by: Tiffany Chang (tic) <tic@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
entry wrong when resupply subcontractor
In case product is using standard price and automated inventory valuation.
We post account entries in price difference account when the price on
purchase order is different from the cost of product. However, when we
do subcontracting and resupply our subcontractor, the cost is not just
the price on purchase order, but also the cost of the components we sent
to the subcontractor. Currently, we didn't take the components cost in
to account when post price difference entries. Fix it in this commit.
Task-3223451
closesodoo/odoo#132282
X-original-commit: e771535b487e76f4e5a23b767d220d7f640292a6
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
When doing subcontracting with standard price product. If
Final procut cost != Components cost + subcontracting cost
When posting account entries for final product, the amount of componets
entry is adjusted for the difference of the two costs.
After this commit, we will post components cost according to it's price
so that it can match the value change of the stock. We adjust the amount
on subcontracting cost for the cost difference.
NOTE: the remaining of subcontracting cost will be post in price
difference account when create vendor bill.
Task-3223451
X-original-commit: 514f5b51ad30cce0048abb4cf343e830f0288b36
Part-of: odoo/odoo#132282
When we do subcontracting, components and final products are sent to/
received from production location. The account entries are also post
using the accounting setting on production location like normal
manufacturing which is not correct.
To fix, we use account setting on product categories instead of
production location for subcontracting.
Task-3223451
X-original-commit: 017209068f308e87870e2b352afbdf6febc41da0
Part-of: odoo/odoo#132282
To reproduce:
1. Create a storable product with ordered quantities policy for purchase and with a category set as FIFO automated
2. Create a purchase order in a different currency and set quantities for partial deliveries
3. Create a partial delivery
4. Fully invoice the purchase order
5. Create the delivery of the complementary units
6. Check the stock valuation layer
The valuation of backorder is wrong.
The value on valuation layer is in company's currency, while the value
on invoice line is in the PO's currency. When create valuation line for
backorder, we didn't convert them to same currency.
opw-3300266
closesodoo/odoo#125206
X-original-commit: c2de679fcba7f153201dde5b3aa989eb3f329910
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
To reproduce:
1. Create a Sales Order for a product whose product category is set to
FIFO and automated. Use route "dropship".
2. Confirm the PO created.
3. Deliver the products (DS transfer)
4. Create the customer invoice
5. Return, for example, 1 unit of product
6. Add a credit note to the invoice for that 1 unit returned (reset to
draft then change qty and post)
Issues:
The value on the valuation layers of the returned picking is 0, posted
entries for COGS and stock interim (delivered) account for credit note
is also 0.
Since #85751, When create valuation layer for return, we take all svls
of origin_returned_move_id into account to calculate the price unit.
However, then dropshiping, 2 svls are created for the original move, and
the sum of them is 0 since there is no impact of the stock when
dropshiping. So when return, the price unit will be calculated as 0.
To fix, when calculate price unit for return of dropshiping, we only
take non-negative svls into account. Note that we use non-negative ones
instead of positive ones because when subcontract dropshiping,
additional negative svls will be added for the cost of the components.
opw-3283436
closesodoo/odoo#124856
X-original-commit: 1c6c163f72301cab29c2f26021bb1ae6fb20dc7f
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
In _get_lead_days, it always try to use the first bom of the product.
After 6825c44, days_to_prepare_mo is moved from product to bom. To
correctly calculet the lead days, we sometimes need to provide the bom.
Make this possible in this commit.
Task-3078049
closesodoo/odoo#121813
X-original-commit: cbbd370eb653e0023d1173039787055590ba680b
Related: odoo/enterprise#41256
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
When calculate Days to Prepare Manufacturing Order, we didn't take into
account Days to Purchase and Security Lead times for Purchaseing of the
company. In this commmit, if the (sub-)bom has company_id set, these two
days will added to the calculation.
Task-3078049
X-original-commit: bf59aedad649dec350f091bb074d3ef1e51d5fcb
Part-of: odoo/odoo#121813
Previous commit 1b840d066999bde1f05563567f439967770701ca tried to fix
the issue action_generate_serial may try to generate a existing lot.
But it made the lot number completely product specific. This change is
too big for stable, we revert the change in this commit.
Also to fix the issue, when action_generate_serial tries to generate a
lot, we always try the result from ir.sequence frist, only when the lot
already exists, we then try create one based on the product's lastest
lot number.
Task-3187003
closesodoo/odoo#121214
X-original-commit: 95214ab6c133553371926804e788766edab2b8ca
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
account
1. We introduced a new Production Cost account that can be set on
locations with Production type. When products move into/out of a
production location. The account entry will be post on this account
instead of previous Stock in/out account.
2. On the accounting setting page, we can now set the default values for
all stock accounts. Users can also disable automatically accounting for
stock there.
Task-3046333
closesodoo/odoo#113973
Related: odoo/enterprise#37653
Signed-off-by: Tiffany Chang <tic@odoo.com>
To reproduce:
1. Manually create lot "0000001" for a lot product
2. Create a MO for this product and click generate-serial button.
Validation error raised since we are trying to generate lot/sn "0000001"
again.
When useing action_generate_serial, ir.sequence always try create a
lot/sn in form "00000dd". If user already created the same one, the
generation will fail.
We already tried to avoid this issue for sn in _get_next_serial() by
finding the latest sn and create new one base on it.
To fix, we also allow _get_next_serial to be applied to lot.
Part of Tast-3187003
closesodoo/odoo#118481
X-original-commit: dc69748ea2698077782d839cf7da48e987f17ffc
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
Fix the isuue that manual consumption is not correctly calculated when
backorder/split/merge.
closesodoo/odoo#115429
X-original-commit: d72ddd80d8a6aaa808c07db685972a1c05e8d6a4
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
In odoo/odoo#112978, it missed the case when 0 is entered (and no
Counted Quantity already set).
On inventory adjustments, when Counted Quantity is 0 and then press
"enter" or "tab", the difference will always set to 0. The compute
function for inventory_diff_quantity is not triggered in this
situation. We manually update the value in this case to trigger the
compute function.
opw-3177578
closesodoo/odoo#115252
X-original-commit: b4b90ff5702d18cc17d74d04e12e3cf11e205e9f
Signed-off-by: Tiffany Chang <tic@odoo.com>
when plan workorder, cancelled/done workorders are taken in to account
when they block current workorder. In this fix, we ignore then when plan
workorder.
Task-3126569
closesodoo/odoo#114940
X-original-commit: 1b629659cb651c62fdd2c880ae591f9a9bb2e1eb
Related: odoo/enterprise#38020
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
In consumption warning, we add a new button that can correct all
qty_done according to should_consumed_qty.
closesodoo/odoo#113538
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Currently, if the user change qty_done on any raw moves without
changing qty_producing on the MO, it's not possible to validate the
order. In this commit, we make it possible to validate the order as an
immediate production.
When qty_producing is 0 and validate the MO:
1. manual consumption moves: current consumed qty will be kept when
process the MO.
2. non-manual consumption moves: For tracked components, if
use_auto_consume_compoents_lots checked, and there is enough products
reserved, the qty_done will be filled, otherwise, an error will be
raise to ask user to fill in lot/sn. For non-tracked components,
qty_done will be filled.
Task-3116125
Part-of: odoo/odoo#113538
When use_auto_consume_components_lots is on, it's always no manual
consumption on a MO even when the product is no tracked. Fix it
Part-of: odoo/odoo#113538
On the BOM, we add "Consumed in Operation" to a line, manual consumption
will be ticked automatically. In this commit, we make it that when
remove "Consumed in Operation" on a line, manual consumption will be
automatically unticked.
Task-3116125
Part-of: odoo/odoo#113538
Previously we set a component on MO to be manual consumption by comparing
the To Consume and Consumed, if they are not the same, we consider it a
manual consumption. Now if any input activity in the Consumed cell, we
will consider it a manual consumption.
Note that in the code, we make the css class change happended in the
list renderer instead of the field widget. We do that because we want to
change the background color of the whole cell not just the text of the
field.
Task-3116125
Part-of: odoo/odoo#113538
In 49bc9aac201136e684cac9d84df97f80d217afa4, when we need operation_id
when we check if manual_consumption is readonly or not, so
groups="mrp.group_mrp_routings" was added for manual_consumption.
As a result, we can't see manual_consumption on BOM when workorder is
not enabled.
To fix, we add a computed field as a workaround.
Task-3116125
Part-of: odoo/odoo#113538
After unlock a picking/MO, it's possible to change the qty_done of a
cancelled move. This change won't have any result on product's stock.
In this commit, we raise an error when user changing cancelled moves.
We advise user to create a new line instead.
Task-3116125
closesodoo/odoo#111910
X-original-commit: c6c3e5984c3fa0fc1810ae490bd4ce10390eebd8
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Tiffany Chang <tic@odoo.com>
When auto-fill the duration of workorders in immediate production, the
workorder cost is not included in the price of the product.
It happens becuase we calculate the price in _post_inventory but we set
the duration after _post_inventory. To fix, we set the duration of the
workorders in before _post_inventory.
closesodoo/odoo#111898
X-original-commit: 707769478b9f63319689ff2347d300ce1800d1d0
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
To reproduce:
Create a MO without product_id, then add a new line in work orders.
Error raises.
Since cab8d8fe7f744fb4dd0cd61b624f6f4519eb8d8d, we started to show
qty_remaining of WO on MO form. It triggered the compute function of
qty_remaining. Since we don't set product_id, production_id.product_uom_id
is not provided when doing the calculation.
To fix, add production_id.product_uom_id as dependancy of qty_remaining,
and don't do the calculation without it.
opw-3092723
closesodoo/odoo#107434
X-original-commit: 0b10241c0bcbecda73dae04c8a5f1ceb8033a388
Signed-off-by: Tiffany Chang <tic@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
When manualy create a productivity log on the workorder form, you are
always asked to choose a time_id(productivity). But by default, the
field is hidden. Make this field shown by default for better use
exprience.
closesodoo/odoo#106007
X-original-commit: 84cde486c700420c8898847342f158393c02649c
Related: odoo/enterprise#34098
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
Adapt tests for other moudules to use
ENT PR odoo/enterprise#33399
X-original-commit: 88cad50cac8130e1ff66a21ab63d53b41488a74a
Part-of: odoo/odoo#106007
Adapt community to make it possible to add employee cost when calculate
bom cost.
closesodoo/odoo#105645
X-original-commit: a239802249b2af2cc3fc2b3bb9fdfd0a408d887a
Related: odoo/enterprise#33898
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
When click action_show_details button on portal, the field product_id
and product_qty are clickable. Fix it
closesodoo/odoo#103346
X-original-commit: 717d501cbf7e321124ddbe9d9061221ea97787b5
Signed-off-by: Tiffany Chang <tic@odoo.com>
1. Except for registering components, the portal should be readonly
2. Don't open sm form when click it.
closesodoo/odoo#102935
X-original-commit: 4c5ba480e91b7e06c49b3683c36ff0a9aac9b60f
Signed-off-by: Arnold Moyaux (arm) <arm@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
Reproduce:
Click "send_reminder_preview" button on purchase form and error raise.
Missing check if actions are None or not before get its length.
closesodoo/odoo#102563
X-original-commit: 0ba99bd71d47571ac748ab0ecd68c52891cddb9f
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
expiration
Previously, we do
{expiration,use,removal,alert}_date = receipt_date + {expiration,use,removal,alert}_time
After this commit, expiration date remains unchange, for the other 3
dates, we calculate them by
{use,removal,alert}_date = expiration_date - {use,removal,alert}_time
Task-2657043
closesodoo/odoo#86760
Related: odoo/enterprise#25419
Signed-off-by: Steve Van Essche <svs@odoo.com>
Currently, when changing qty_producing on a MO, consumed number of each
component will always be updated. In this commit, we add a new boolean
field manual_consumption to bom.line. If checked, that line won't be
updated when changing qty_producing.
The same but invisible field manual_consumption is also added to each
line on MO. It will use the value on BOM as defualt value. When user
manually set the consued qty, it will be checked automatically. Also,
when user manually update the SML, the field on SM will also be set to
true.
Task-2687494
closesodoo/odoo#80118
Related: odoo/enterprise#25607
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
In 9f7e6d2bb6ae0a6b0257edf26a5aa069cd00d78e , when start a workorder, we
always suggest the qty to produce to be the full qty to produce on MO.
If the previous WO produced less than the full qty to produce on MO,
user won't aware of that when start the WO. We revert it in this committ
Task-2678388
closesodoo/odoo#83389
Related: odoo/enterprise#23961
Signed-off-by: Arnold Moyaux <arm@odoo.com>
When start_nextworkorder, if the WO is already cancelled, we
should try to check next one the this WO.
Task-2678388
closesodoo/odoo#83566
X-original-commit: 30fcfcc6c6ebb6fe9620d29475e1a7b6f1a46923
Related: odoo/enterprise#23819
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
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
closesodoo/odoo#78737
Signed-off-by: Steve Van Essche <svs@odoo.com>
Clean the code for onchange method with putaway rule applied, merge
them into one onchange method.
Task-2614519
closesodoo/odoo#80519
X-original-commit: 5f562895c4d2f9beac7e0458fcee493b0141f1af
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Signed-off-by: Yuchen Huang (yhu) <yhu@odoo.com>
When applying putaway rules, the qty of all existing assigned SM lines are
summed to calculate the incoming qty of the product to determine if the
capacity has been or will be met. When a SM - that a putaway rule will apply
to - is created, then it will have its SM lines included in this calculation when
it shouldn't. In this case, we need to ignore the qty of those lines
Task-2614519
X-original-commit: 14738c7e5ecfba81e7ccbd401e1204d3bac960aa
Part-of: odoo/odoo#80519
Now when apply putaway rule on a package with package type, we calculate
the weight of the package according to the product in that package
instead of using the max weight of the package type.
Task-2614519
X-original-commit: 0281ebec36dbb9effd3d2913c0d38c88f9f19920
Part-of: odoo/odoo#80519
Package won't have a company_id untill the move is validated.
Previously, the package_type_id on package has the check_company to be
true. This forbiden any package type with company_id to be used on a not
validated package. In this commit, we remove check_company to avoid
this.
Task-2614519
X-original-commit: 66cbccb15368713ef04d2ba0f9e8808b72557b41
Part-of: odoo/odoo#80519
Previously when apply putaway rule, we only count the packages in the
location to check if there is enough space the incoming package. Now we
also count all other assigned incoming packages to that location to
avoid overflow.
Task-2614519
X-original-commit: 21373dbc507e57c3a19b415583a5b0595a66c1a3
Part-of: odoo/odoo#80519
When apply a putaway rule to find a putaway location, we only pass the
product and/or package info to _get_putaway_location. This is not
enough since the putaway rule can also be applied to packaging.
X-original-commit: 9f339938aec075c5385dca349dfc6a7c2d43b6ad
Part-of: odoo/odoo#80519
Put in Pack won't trigger any onchange to use putaway rules. In this
commit, we apply putaway rule in Put in Pack when only one move line
is put in pack. We also check if the ml to put in pack are all in same
package type, if so, we set that package type on the package.
Task-2614519
X-original-commit: 023b69ac2ccac2456bcb1a8b1b66b468e213b86a
Part-of: odoo/odoo#80519
We didn't show company_id on package type view, there was no way to
change it. Add it in this commit.
Also made company_id on stock_storage_category form not visible when not
in multi-company.
X-original-commit: 61792e9dc13bf9d326e69eb59efe3a22354f1ca5
Part-of: odoo/odoo#80519
When find putaway location while creating new sml, we didn't consider
the package. Add it back.
Task-2614519
X-original-commit: fcbd4c775248f18c71f9cb0e700ed9934babcdfd
Part-of: odoo/odoo#80519
Previously when the onchange method find a putaway location for a sml, we
find a putaway location of the location_dest on the sml. However, the
location may already be a result of last computation of putaway
location. In this commit, we always find putaway location of the default
destination location.
Task-2614519
X-original-commit: a96fb8e9d2a57b67666ca3b29c9313aba83cdb91
Part-of: odoo/odoo#80519
Previously, when underconsumption occured, we split the move (in
post_inventory). And if backorder, the moves not done would be linked to
the new backorder MO (when backorder MO is created).
After 8883c06ada, we create backorder MOs
before _post_inventory, making it so the moves not done will not be
linked to the backorder MOs and reserved qtys are not released.
To fix, we set cancel_backorder to be true to cancel all the leftover
moves and release the reserved qty.
Task-2697611
closesodoo/odoo#80446
X-original-commit: cffb2b455d73f64d96f91b9e0301c346989eae63
Signed-off-by: Tiffany Chang <tic@odoo.com>
In 1e93c161ca454313436b65427542db961f6ddcdd we trigger RR when
confirming a MO. Same thing should be done if we changed the product qty
for a confirmed MO.
Task-2653116
closesodoo/odoo#79332
X-original-commit: 22eb5c38ff45f4e5cd5d2025d31960efa051ad6b
Signed-off-by: Arnold Moyaux <arm@odoo.com>
Stock.location is ordered by "complete_name" which is possible to be the
same (i.e. default production locations for different companies). This
may result non-deterministic order. Add "id" to avoid it.
closesodoo/odoo#79181
X-original-commit: 94a8ad3fae914b046064bb7ce17572be8280f6e0
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
When find a location_id for repair.line, we didn't restrict the location
to have same company_id with the repair.order. Add it.
closesodoo/odoo#78350
X-original-commit: dff911a1b006a542bf9b082c76910a2d8346fef1
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
In the bom cost report template, a "tr" is missing and no parent_id for
the subcontructing part. This result in a leftover line each time you
fold the bom. Add them to the tamplate.
Task-2657280
X-original-commit: 6ae623dc2d5131e2b11969f1bc1f8dd6096a9005
Part-of: odoo/odoo#77945
When the name of a production order changes, we should update the name
and the reference of the analytic accounting lines of its work orders.
Task-2638896
closesodoo/odoo#76090
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Both mo_analytic_account_line_id and wc_analytic_account_line_id are
copied when duplicate the workorder. This is not correct.
Task-2638896
Part-of: odoo/odoo#76090
When a product's has a kits bom, we consider it a kits product.
When a product is a kits product, we count its "on hand" and "forecast"
qty by caculating how many can be produced according to the bom.
We add status button to the show the qty on kit product form.
Task-2444000
COM PR odoo/odoo#75555
ENT PR odoo/enterprise#20440
UPG PR odoo/upgrade#2783
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
When recieving a kits product, it will be decomponent in the picking. In
this commit, we add a column in the picking to show the info of the kits
in picking.
Task-2444000
COM PR odoo/odoo#75555
ENT PR odoo/enterprise#20440
UPG PR odoo/upgrade#2783
Add analytic accounting for MO.
Post expense entries for:
1. raw material cost (change with consumed)
2. work center cost (change with real duration on work order)
Task-2469742
PR #68708
when we have wh1 resupply form wh2, two transfers will be created. One
delivery from wh2 to transit location, one receipt from transit location
to wh1. Both transders don't have receive from/deviver to. In this
commit, we set the corresponding warehouse address as receive
from/deliver to.
Task 2334764
When do a manual replenishment, we set the responsible persion of the
product to be the partner of the procurement group. Then this parnter_id
is propagated to stock.move and then stock.picking. So the responsible
person will be shown on the picking form as contact person.
To fix, remove it when creating procuremnet group.
Task-2334764
PR #67776
Since we can't transfer service product, when compute delivered or
received kit quantities, we should skip the service components.
Task-2566373
PR #72306closesodoo/odoo#72575
X-original-commit: f86c7c0dfa09a2136ed1789a905eae9205de0c03
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
A kits bom has a component but qty is 0. When sale this kits, the 0 qty
component won't be delivered, and the delivered qty of the kits will
always be 0.
To fix it, we don't find a stock.move and bypass the quantity check
since the stock.move are not generated when bom line quantities are 0.
Task-2580118
PR #72637closesodoo/odoo#72920
X-original-commit: fad7a15560c1d454be294f1a8d1ce5a57d576900
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Previous fix f056254d1c5153467b10d9581214ff6d1348be76 didn't take the
situation when production location has its own valuation accounts into
consideration. Fix it in this commit.
opw-2476417
closesodoo/odoo#71064
X-original-commit: 60e83f03b871605b7aa281503269f66ac3ea940b
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
Signed-off-by: Yuchen Huang <yhu-odoo@users.noreply.github.com>
To reproduce:
1. create and confirm a MO with register number checks on operations
2. duplicate the MO
The register number checks won't show up in the new MO
We didn't set copy=False for workorder_id on stock.move, when copy a
confirmed MO, the new moves are linked to old WOs on old MO. New WO
didn't link to any moves.
When create quality checks, we only create "register ..." checks for WOs
with move_id. As a result, new WOs without move_id won't have those
checks.
To fix, set copy=False on workorder_id of stock.move
Task 2484939
closesodoo/odoo#71000
X-original-commit: 6aaf337558e59474efcef937f0175ee531b4b477
Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
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>
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
1. add packaging to PO lines
2. packaging on PO/SO lines can be propagate to MO
3. add package type to packaging
4. on picking types, we can choose to only reserve full packaging. That
means if you want 1 pallet(100 units) and you have 50 units in stock. It
won't be reserved.
5. suggest suitable packaging for PO/SO/MO line according to the product
qty
Task-2357259
PR #68654
UPG PR odoo/upgrade#2444
Previously when changing cost method, we always add debit to Expense
account when empty svl. This results in an unneutral change for process
that should be neutral. In this commit, we change to use stock input
account to make it neutral.
Task 2481563
closesodoo/odoo#68083
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
We introduced new Smart Putaway Rules.
Locations now can have a storage category, on each storage category,
we can specify the amount of products/packages(with certian package
type) that can be stored in the location.
On putaway rules, we can also set a storage category. Now when apply a
putaway rule, we will find a suitable child location of the out
location according to quantity/weight setting on the storage category.
Task 2341820
PR #63516
ENT PR odoo/enterprise#15363
UPG PR odoo/upgrade#2040
Currently, delivery packaging and product packaging share the same
model product.packaging. In this commit, we make delivery packaging
a new model stock.package.type. The code is also moved to stock
instead of delivery for compatibility reasons.
Task 2341820
PR #63516
ENT PR odoo/enterprise#15363
UPG PR odoo/upgrade#2040
Let's say we have location A, B, and C. A is the parent of B, B is the
parent of C. And we have a putaway rule to move product from A to B. Now
receive product at C, because currently when we can't find a putaway
rule at one location, we will loop to check its parent locations. So the
puteaway rule A -> B will be found, and product received at C will in
the end be stored at B.
After this commit, we don't check the parent locations when we can't
find a putaway rule.
Task 2341820
PR #63516
ENT PR odoo/enterprise#15363
UPG PR odoo/upgrade#2040
Considering the MO under consumption situation:
component A, to consume = 2, consumed = 1
Previous, after "mark as done", the MO will have two lines:
component A, to consume = 1, consumed = 1, state done
component A, to consume = 0, consumed = 0, state done
Now, after "mark as done", it will be consistent with picking:
component A, to consume = 1, consumed = 1, state "done"
component A, to consume = 1, consumed = 0, state "concel"
Task 2446915
PR #66583
ENT PR odoo/enterprise#16554
This commit is a revert of revert 561b3461a0
and 97ba860fd38c530d3f3678f676754862afad0f11.
Previously we split moves when no picking, now we consider it
unnecessary.
Task 2446915
COM PR #66583
ENT PR odoo/enterprise#16554
To reproduce:
1. set WH receipt in 3 steps
2. create a "receipt in 2 steps" route for product
3. create a PO with product "receipt in 2 steps"
In inventory, we will see this product still follow the "receipt in 3
steps" route.
This is caused when we create move for PO, we prepare the route_ids
according to warehouse's route_ids. After the move has it's own
route_ids, it will not search for route set on product or product
category (which should has higher priority over warehouse route).
To fix it, we remove the route_ids when create the move for PO. A route
will be found when the move being comfirmed.
Task 2448439
PR #65509
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>