Commit Graph

6548 Commits

Author SHA1 Message Date
Nicolas Martinelli 769fc81140 [FIX] stock_account: fix dependencies
Purchase and Sale are not part of the dependencies of stock_account, so purchase_line_id
and sale_line_id might not exist.

Fixes #6619
2015-05-13 12:51:18 +02:00
Goffin Simon 71b3861a54 [FIX] stock: Inventory adjustment
When importing a csv in Inventory Adjustement, a default product_uom_id is set if there 's
no product_uom_id given in the csv.

opw:634612
2015-05-13 09:14:49 +02:00
Nicolas Martinelli b8779f0c53 [FIX] stock: keep inventory options consistent
Make sure that appropriate fields are emptied when switching to in between inventory filters.
This prevents incoherent results due to hidden fields which were filled in a previous selection.

opw-634388
Fixes #6512
2015-05-11 08:30:10 +02:00
Nicolas Martinelli 561346db9e [FIX] stock: forbids possibility to make inventory of all products when a given product is chosen
opw-634388
Fixes #6512
2015-05-07 14:04:26 +02:00
Denis Ledoux 576cf26a53 Revert "[FIX] stock: `product_qty` field is not recomputed at record creation."
This reverts commit a1da6c2132.

This revision was a temporary patch to solve function fields
computation issues, solved thanks to the commit b7f1b9c01e
2015-05-06 17:27:17 +02:00
Denis Ledoux 90cb409be9 [FIX] stock: procurement set as done of sets bom.
In the case of sets, several stock moves can have
the same procurement.

Therefore, appending procurements in the list `procurement_ids`
without checking if the procurement isn't already in the list
could lead to having several times the same
procurement in that list,
and could therefore lead to the check of the same procurement
over and over, leading to performances issues and the fact you cannot
call `write` on a list having several times the same id.
See models.py 3875

Using a set instead of a list solve this issue

opw-634393
2015-05-04 18:05:17 +02:00
Martin Trigaux 6e25d6e589 [FIX] stock: better recomputation of pack operations
Revert c06a96 "[FIX] stock: force recomputing transfer information on picking"
and unlink packoperations only when move lines are changed (fix opw 620636).

c06a96 introduced a regression as it prevents to plan moves (e.g. assigning lots
through the barcode interface) before the reception.
2015-04-29 17:36:20 +02:00
Olivier Dony 622e00baa5 [I18N] Sync 8.0 translations from Launchpad 2015-04-28 09:45:53 +02:00
Denis Ledoux cf4d14ce39 [MERGE] forward port of branch saas-3 up to 09b277c 2015-04-27 14:02:52 +02:00
Denis Ledoux d6ae7fb7db [MERGE] forward port of branch 7.0 up to 3e7d3c7 2015-04-27 12:19:43 +02:00
Nicolas Lempereur 81a3f56651 [FIX] stock,event,pos: fix "today" filter with regard to timezones
The previous filters didn't take timezones into account, and
returned stringified naive datetime values in local browser
time. Those would then be interpreted by the server-side as
UTC date, and depending on the current timezone offset vs UTC,
yield partially incorrect results.

By returning directly a datetime.datetime object instead of
a stringified version (see previous commit 76881fb),
we can get the expected result regarless of the timezone.

Fixes #2972
Closes #6229

opw-621282
2015-04-23 14:11:24 +02:00
Martin Trigaux 0b2bc27adc [FIX] stock: use unit of measure for manual receptions
When using the manual reception wizard, if a quantity in a different unit of
measure was set, the unit was ignored. opw 617336
2015-04-20 17:16:22 +02:00
david.beal@akretion.com ea4f9c4625 [FIX] call fields_view_get with named context
otherwise new API bridging breaks down

closes #6371
2015-04-20 09:39:40 +02:00
Christophe Simonis 50665b499a [MERGE] forward port of branch 7.0 up to d0ef1b9 2015-04-16 19:13:56 +02:00
Rucha Dave 3b58ee833e [IMP] stock: description of serial numbers empty list
The description was still making reference to available filter which is no
longer present in version 8. opw 617807
2015-04-15 17:35:48 +02:00
rmu-odoo 3f7d168130 [FIX] sotck: correctly set reference on internal move
When creating a chained picking, the first move has no sequence, this is because
there is no sequence for stock.picking.internal.
Set the sequence before the chained move so that the sequences are in the right
order. opw 621261
2015-04-15 15:23:26 +02:00
Christophe Simonis d3e7a8ef5e [MERGE] forward port of branch 7.0 up to 856bc6f 2015-04-10 18:24:46 +02:00
Leonardo Pistone 01f1d91006 [FIX] stock: use owner for virtual stock and in/out
Fixes odoo/odoo#5814.

It will also calculate virtual stock when lot/owner/pack is specified, but will
not filter the future stock on lot/pack.
2015-04-10 11:14:30 +02:00
Yannick Vaucher aa26c5a81c [FIX] stock: missing context on call of stock.move copy
Closes #4993
2015-04-09 19:09:26 +02:00
Akash Balar 4ba72fbacb [FIX] stock: reset date_done field at duplication
As the state is reset to draft, makes no sense to keep date of completion.
2015-04-09 14:12:51 +02:00
Nicolas Martinelli 233ca1d562 [FIX] stock: do not consider moves which are done/canceled
These moves are not taken into account when remaining quantity is computed or packs are prepared
Fixes: #6030
opw: 631762
2015-04-08 14:25:24 +02:00
fka-odoo c06a969612 [FIX] stock: force recomputing transfer information on picking
When clicking on the Transfer button on a picking the packoperations should
always be recomputed.
If the pack operations are only computed the first time, the picking could be
modified (e.g. notice wrong quantity) and still display previous operations when
reloard the transfer button. opw 620636
2015-04-02 18:09:53 +02:00
Rucha Dave cb3034bdb0 [FIX] stock: prevent deleting lot linked to existing quant
Fixes #4458
2015-04-01 18:01:07 +02:00
Goffin Simon a1da6c2132 [FIX] stock: `product_qty` field is not recomputed at record creation.
In the new API, 'product_qty' is correctely recomputed at record creation.

opw:629650
2015-04-01 09:20:06 +02:00
Goffin Simon 1f76ed0159 [FIX] stock: "Request procurement" wizard does not fill warehouse
The function "make_procurement" must take into account the warehouse_id
to create procurement.

opw:631318
2015-03-30 09:06:05 +02:00
Josse Colpaert 23873da6b6 [FIX] stock: quant_ids relations should not be copied when copying moves fixes #5848
The same holds for the inverse history_ids relationship.  When an object is copied,
the many2many fields their links are copied.

When we copy a done move as is done in the return wizard to create the reverse, it copied also
 the relationship with the quants.  This is problematic as this field indicates the quants that
were transferred by the move and the new move will think it will have returned all the quants
even before it is done.
2015-03-23 10:15:57 +01:00
Nicolas Piganeau accd3b472a Fix unwanted opening of stock.picking when scrapping from production 2015-03-20 12:12:12 +01:00
Goffin Simon ac67ce4ecc [FIX] stock: quants not being reserved correctly
`product_qty` field is not recomputed at record creation.
Force field recomputation at any change
Removing the trigger on `product.product` should not be a problem as
product uom can't be changed once there are move lines.

opw:629650
2015-03-19 15:01:54 +01:00
Josse Colpaert fffd52a16b [FIX] stock: Inventory theoretical qty should only consider the location itself, not its children. Same for reservations.
When the theoretical_qty of the stock is calculated, we should only consider the location itself, not its children.
That way you can have correct inventory for e.g. iPads that are both in Stock and Stock/Shelf 1
2015-03-17 17:17:44 +01:00
Josse Colpaert 50cdacba90 [FIX] stock: search qty available correction when searching zero quantities
When =, >=, <= 0 it cannot use the read_group of quants because the results will not be in the read_group Fixes #5701
2015-03-17 16:50:50 +01:00
Josse Colpaert 09abac7608 [FIX] Stock: Make sure inventory works with packs and lot = False
The inventory should work with packs.  If a pack is not indicated
in the inventory line, it means we correct the quantity for the product
that is not in a pack.

Also, when the lot is False, it should not behave as normal stock moves.
It should correct for the quantity that has no lot.

We try to reconcile the negative quants in the pack also.
2015-03-13 12:11:17 +01:00
Josse Colpaert 57593e5898 [IMP] stock: picking report should show only what is reserved when partially available
Only when the picking is partially available, the system will only show the amount of products available.
That way, when working with paper, the warehouse operator will only get what is available.  This is the case
where we did not launch the bar code interface or the transfer wizard.
2015-03-13 11:48:32 +01:00
Josse Colpaert db45099a27 [FIX] stock: Cancel button visible for picking in waiting another operation fixes #4718 2015-03-11 17:51:50 +01:00
Josse Colpaert aa38a2209e [IMP] stock: add procurement_jit_stock: improve performance by always doing runs of procurements to create stock moves in batch 2015-03-11 16:50:45 +01:00
Josse Colpaert 1ac4d31db7 [FIX] stock: Make sure we can do a return of a stock move with UoS 2015-03-11 16:23:23 +01:00
Josse Colpaert f1a9ab7025 [FIX] stock: typo not in 2015-03-06 13:00:31 +01:00
Josse Colpaert b886e11e47 [IMP] Stock: When changing wh config: check before deactiving locations fixes #4985
When changing e.g. from 3-step to 2-step, we would like to deactivate a location,
but maybe the user still wants to use that location e.g. in a rule on the product, so do a check
if it is not used in some route not related to the warehouse.
2015-03-06 11:06:38 +01:00
Josse Colpaert 935141582f [FIX] Inventory line store for theoretical qty 2015-03-03 17:07:45 +01:00
Josse Colpaert 9284679abe [FIX] Add decimal precision on product template quantities fixes #5512 2015-03-02 17:18:13 +01:00
Josse Colpaert 84b47f62eb [IMP] Add already the possibility to fill in the products you want in an inventory
In order to do that, we change the theoretical quantity into a functional stored field.
Therefore the on_change changes, but the old still work.
The UoM of the inventory line is also taken into account

[IMP] Manual selection, no theoretical qty compute on import, comments
2015-03-02 14:09:16 +01:00
Josse Colpaert edaec21835 [IMP] Change order of search terms when creating domain for search qty, clean 2015-03-02 13:59:39 +01:00
Denis Michiels acbef5552d [FIX] stock: improvement search on product
- The search on qty_available is faster by looking only to the quants.

- Less SQL queries
2015-03-02 13:59:39 +01:00
Josse Colpaert d4152c2a40 [IMP] Optimize child_of with parent_left and parent_right
[FIX] Make sure it does not give errors on runbot by providing an alternative when parent_left would be zero
2015-03-02 13:59:39 +01:00
Josse Colpaert 37f9459610 [IMP] Return of return should be linked with original destination move should fix #5253
[FIX] Split of return move should keep the returned move

[IMP] Better comment and check for state not cancelled
2015-02-25 12:03:49 +01:00
Denis Ledoux 5d9fb7f1d1 [FIX] stock: picking report for picking without lines
Even it is dummy, this is possible to create an empty picking,
and to print it.
We therefore must ensure no traceback is displayed.
2015-02-23 11:59:46 +01:00
Christophe Simonis a9ba27b79f [FIX] stock: only get first element from cursor row 2015-02-20 16:33:16 +01:00
Josse Colpaert 4625b5c840 [FIX] speed up with sql query for picking assign
[IMP] Commit and limit query to 1
2015-02-20 15:36:55 +01:00
Olivier Dony 91d4b947f6 [I18N] Update translations from Launchpad 8.0 branches 2015-02-18 11:51:07 +01:00
Josse Colpaert 30b5285c9d [IMP] Add composite indexes for stock_move and stock_quant and do manual query for history_ids when splitting quants to avoid unnecessary full table scan on stock_move
[IMP] Improve indexes

[IMP] history_ids opti

[IMP] Clean and document

[IMP] Clean
2015-02-12 10:08:29 +01:00
Josse Colpaert d42af010ce [IMP] Do manual query in search for negative quants to avoid ORM ordering by id and as such always using the wrong index
[IMP] Simplify code

[IMP] Negative quant search should include child locations also

[IMP] Comment

[IMP] Could be child_of also
2015-02-12 10:08:29 +01:00
Josse Colpaert 73899fd2dd [FIX] Store for moving package with inner packages. Further Fixes #5125
[IMP] Search quant instead of underlying packages
2015-02-10 17:46:49 +01:00
Leonardo Pistone 0715a408e8 [FIX] stock: propagate owner from pack to stock operation
Using pack instead of picking for more precise tracking of the owner.
Fixes #5165
2015-02-10 16:53:07 +05:30
Josse Colpaert 05e1b3d5ea [FIX] Simplify destination package and don't write package info on quant when moving entire packages Closes #5125 2015-02-09 14:19:59 +01:00
Nicolas Piganeau 7f8b12619b [FIX] Quants in a pack added to a parent pack remain in their child pack 2015-02-09 14:19:59 +01:00
Denis Ledoux 769c62ef27 [MERGE] forward port of branch saas-3 up to f92b2f8 2015-02-06 14:19:30 +01:00
Denis Ledoux f92b2f8d4d [MERGE] forward port of branch 7.0 up to 0b7db55 2015-02-06 14:02:43 +01:00
Denis Ledoux 764be06f44 [FIX] stock: obvious distraction error of previous rev. 8ff7d299f5 2015-02-05 15:09:06 +01:00
Denis Ledoux 8ff7d299f5 [FIX] stock: picking, Set date of reception if not set by user previously
If the date_done field of the model stock.picking is already filled in
it means the user do wanted to have this date of reception date
instead of the moment when the user clicked the receive button.

opw-627219
2015-02-05 15:04:58 +01:00
David Monjoie d7f30de9ae [FIX] product: moved pricelist_item ACL from stock to product
Otherwise if we install sale without stock, we can create pricelist and pricelist versions, but not pricelist items.
Fix for issue 626985
2015-02-04 16:17:36 +01:00
Antoine Huvelle 6779166454 [FIX] stock: prevent creating inventories for virtual locations
It makes no sense to allow inventories in supplier locations as it won't anyway
reduce the Inventory if we want to downsize the inventory. This makes
the Inventory act weird.

Ex:
1. Initial situation: 20 units of stock A at supplier's location
2. Makes an inventory stating there is in fact 0 qty of product A at that
location (in the hope to remove some quants).
3. Still 20 units in Suppliers location + 20 units in Inventory loss...

Managing specific suppliers destination is currently not supported.
Same issue with production locations.
Fixes #5052
2015-02-04 10:42:06 +01:00
Olivier Dony 8e03852fd4 [I18N] Update translations from Launchpad 8.0 branches 2015-01-26 16:36:51 +01:00
Josse Colpaert 9b749d4d79 [FIX] Propagate of propagate_from on quants should be done with superuser (courtesy of Jos De Graeve) 2015-01-26 10:12:21 +01:00
Olivier Dony 495ec92251 [I18N] Update translations from Launchpad 8.0 branches 2015-01-21 15:36:54 +01:00
Olivier Dony 39f00b3637 [I18N] Update translation templates with latest terms
Total new terms: 270
Total deleted terms: 82
Total identical terms: 19653
Old total number of terms: 19735
New total number of terms: 19923
2015-01-21 15:31:22 +01:00
qdp-odoo 0cbba7c222 [FIX] stock: display the pack operations in the same order than the stock move (if possible) 2015-01-20 12:02:16 +01:00
Josse Colpaert d849c55599 [FIX] Correct resupply pull rules to have the correct warehouses to propagate / serve so it works with MTO rules also 2015-01-15 17:59:56 +01:00
Xavier Morel 65cd4a2a33 [FIX] remove deprecated checks/fast_suite test attributes from standard modules 2015-01-15 14:31:40 +01:00
Denis Ledoux a692c6e934 [MERGE] forward port of branch 7.0 up to f406847 2015-01-15 11:49:28 +01:00
Martin Trigaux f406847613 [FIX] delivery: reset delivery info on duplicate/backorder
The tracking reference and other delivery references are not relevant to
duplicated pickings. Overwrite copy to remove carrier_tracking_ref, volume and
number_of_packages.

Add fallback on stock.picking.in and out to use copy method of stock.picking.

For partial delivery, the duplicated picking is the delivered order and
the existing picking is the backorder of the delivery (why so much hate?).
This means we have to switch the delivery info between the backorder and
the delivered picking.
Combo opw 615593 and 618802
2015-01-14 17:44:37 +01:00
Akash Balar 88ace35fa4 [FIX] stock: putaway stategy access rights
Only admin was able to create product.putaway records. Gives all access
to warehouse manager.
If a putaway strategy was present on a location, a warehouse user was not able
to transfer goods as he had no access to the rule lines (no read to
stock.fixed.putaway.strat). Give read access. opw 619774
2015-01-13 09:42:05 +01:00
Denis Ledoux e28e01a70f [FIX] stock: colors in tree view depending on virtual available
Colors were no more applied. colors attribute from tree expects a semicolon separated string, not a dict.

Regression introduced during b414e05a41
2015-01-12 19:09:33 +01:00
David Monjoie 87e509ad8c [FIX] stock: product_packaging field domain should look for product template 2015-01-12 16:23:21 +01:00
Olivier Dony d0cd92bb9f [I18N] Sync updated 7.0 translations from Launchpad 2015-01-07 17:57:28 +01:00
Somesh Khare 28833f070f [FIX] stock: owner on picking not propagated on quants
The owner of an incoming picking was not propagated to the generated quants
Fixes #4136, opw 619854
2015-01-07 13:57:52 +01:00
Josse Colpaert 88169ec625 [FIX] Dozen / Ton spelling
Closes #4554
2015-01-06 17:21:41 +01:00
jir 6c23a9ca19 [ADD] Test cases of stock in new api. 2015-01-06 17:05:11 +01:00
Josse Colpaert 6ea0cc41b9 [FIX] Drop shipping invoice correction
When invoicing from dropshipping picking, choose the correct partner.
Also, change the partner on the picking to be the partner of the purchase.
Change the picking report to include the destination partner or the warehouse address on the right.

[IMP] Only put partner_id on move from purchase when really necessary

[FIX] Default value of partner on stock move should be False
2015-01-06 15:21:35 +01:00
Aaron Bohy ba37ae3cf3 [DEL] Cleaning: key 'images' removed from all __openerp__.py 2015-01-06 14:20:38 +01:00
Josse Colpaert 52f7fad109 [FIX] Factor should be compared with factor, not id 2014-12-29 11:20:02 +01:00
Denis Ledoux 36bf774d20 [MERGE] forward port of branch 7.0 up to 43cf6d5 2014-12-17 14:05:44 +01:00
Gaurav Panchal 998db2c61f [FIX]stock: return of 'To Be Invoiced' picking should also be invoiced
When creating a return picking, the default invoice state is 'To Be Invoiced' if
returned picking was invoiced. However if the invoice of the picking has not
been generated yet (state '2binvoiced'), the return should also be invoiced.
Fixes #4002
2014-12-17 11:52:37 +01:00
Denis Ledoux e018081b33 [FIX] stock: barcode, display pickings of active stock picking type
If a stock picking type was disabled, but had pickings in assigned or partially available state, the barcode interface main menu crashed
Because the stock picking type was not available in pickings_by_type array
2014-12-17 10:43:20 +01:00
Commandant Custo 647afdf655 [IMP] stock: Default address for the default WH
So that with minimal config, PO's have a delivery address.
2014-12-16 22:13:14 +01:00
Josse Colpaert 723f532e57 [IMP] Changing product qty on product form should work with serial numbers like in 7.0, but we should explain it
Closes #3984
2014-12-12 10:48:00 +01:00
Denis Ledoux bdd5ec8216 [FIX] stock: reload after stock picking scrap
If a wizard is launched from an embedded view list, only the record of the line from which the wizard was launched is reloaded after closing the wizard.

In this specific case, as new lines are added to the picking, we need to fully reload the stock picking
2014-12-11 15:59:13 +01:00
Josse Colpaert 8a26a88033 [FIX] When all_op_processed False it should still create the links #4149
Fixes #4149
2014-12-11 00:25:23 +01:00
Cedric Snauwaert a834bd208f [FIX] stock: when putting product in pack from barcode interface, should return package_id instead of True 2014-12-09 14:25:19 +01:00
Josse Colpaert 7bee5918eb [IMP] No lot in qty update as it is only confusing #3984 2014-12-09 09:56:31 +01:00
Christophe Simonis 2ed212dcbf [MERGE] forward port of branch 7.0 up to d6daf5f 2014-12-03 17:51:06 +01:00
Mart Raudsepp 05de60cbf9 [FIX] Correct floating number handling for _procure_orderpoint_confirm
Fixes comparison with min_quantity orderpoint in scheduler - basic floating
point math issue in procurement scheduler when comparing current quantity
with orderpoint minimum quantity. In certain cases floating point comparison
could result in e.g 400.0 < 400.0 == True due to typical floating point
comparison issues, as Odoo doesn't use Decimal types where the issue
doesn't exist.

Fixes early exiting out of the loop cycle, in case qty is already near zero.
Fixes the new procurement creation check, to not do that if it's close
enough to zero already, to be considered a floating point math error, not
really non-zero.

These combined (or at least the last one) avoid each supply_method == buy
pending in draft PO's getting a zero quantity extra procurement order each
time the scheduler runs. Otherwise there could be hundreds of zero quantity
procurement orders pending, which makes the confirming of the PO take hours,
due to creating hundreds of stock moves for each order line.

Use float_compare helper to solve all these with floating point type for now,
instead of the more evasion possibility of converting to Decimal module.
Two potential bad comparisons remain, add FIXME notes for now until further
analysis.

Also: Float rounding on reste when comparing and on the procurement qty
2014-12-03 16:10:58 +01:00
Julien Legros bfadcdd5d6 [FIX] stock: compute average price on action_done
The average price computation is now deduplicated and moved to
a separate function called in stock_move action_done.
This makes sure it is always called when a stock.move is
processed, even without going through the partial picking wizard.

Fixes #2991
Closes #3949
OPW-615491
2014-12-02 19:32:49 +01:00
Josse Colpaert 536d00d2ba [FIX] Avoid endless loop when doing a return picking 2014-12-02 18:54:25 +01:00
Josse Colpaert 8c8056d95f [IMP] Query should pass through orm and as such the refreshes can be removed in the code, which will go faster as it is done automatically by the new api 2014-12-02 16:38:36 +01:00
Josse Colpaert c255fe3384 [IMP] Add a method half-up for uom conversion in case we want to convert from default UoM to something else + remaining_qty round + default factor on UoM 2014-12-02 15:51:58 +01:00
Josse Colpaert 49c8fc21ba [FIX] When creating a procurement from a move, respect the right UoM conversions 2014-12-02 15:51:58 +01:00
Josse Colpaert bb45636ba7 [IMP] When preparing pack operations, use the smallest UoM of the moves if they are smaller than the default UoM. Otherwise use default UoM.
The same is done when extra moves are generated.  It is going to check if the UoM of the operation is smaller if it has one.

Throw an error when a key can not be found in action_done because there were links on a move
that was not supposed to be done (e.g. 0.5 Dozen when Dozen is rounded at 1)

[IMP] Throw an error when a key can not be found because of UoMs/picking + extra float_compare

[IMP] Integrate remarks qdp
2014-12-02 15:51:58 +01:00
Josse Colpaert 77f8732680 [IMP] Rounding should be done on move immediately to default UoM and quants should be rounded to the default UoM + remaining_qty
[FIX] Remaining qty should each time be in the default UoM of the product

Even with different UoM we want a consistent matching between moves and pack operations.
When calculating the remaining qty on move/pack operation we always start by converting the
qty on the move/operation to the default UoM and afterwards we subtract the links between them
which will also be in the default UoM of the product.
In order to create backorders / extra moves these quantities are used.
2014-12-02 15:51:58 +01:00
Josse Colpaert 244c8ee625 [FIX] Propate propagated_from_id when reconciling negative quants to the quant that loses it
When a negative quant is created but the positive quant counterpart is reconciling
a negative quant that of course also has a positive counterpart, the latter should eventually
let its field propagated_from_id tell that it originated from the very first negative quant as the
second negative quant will have disappeared through reconciliation.
2014-12-02 15:51:57 +01:00
Josse Colpaert cf16632b44 [IMP] No digits_compute on product_qty of move + rounding on qty_available fields + add float_compare 2014-12-02 15:51:57 +01:00
Christophe Simonis e1e7dc0af9 [MERGE] forward port of branch 7.0 up to 419d934 2014-12-01 15:33:48 +01:00
Loïc Bellier cdce2e2283 [FIX] stock: Never hide the invoice control on pickings
Invoice control field was invisible, and we cannot change value if none selected or copy picking in.
Fixes #3636
2014-11-28 17:55:48 +01:00
Denis Ledoux e347011f24 [MERGE] forward port of branch 7.0 up to 2080ea0 2014-11-27 13:27:37 +01:00
Denis Ledoux 2080ea0f0a [FIX] stock: on stock picking invoicing, allow to pick a journal if no move line 2014-11-27 13:26:57 +01:00
Mohammad Alhashash 2461baa0dd [FIX] stock: prevent serial number deletion on stock.move
prodlot_id field may be required due to constraint `_check_tracking`.
When a stock.production.lot is deleted, the constraint on linked stock.move is
not checked. To avoid inconsistency, restrict the suppression.
To allow the modification of existing stock.move, remove the states attribute on
the field definition.

As removal of serial may impact the traceability, it makes sense on buisness
point of view to force the modification of previous stock.move, even if the
constraint would not have been violated.
The list of linked stock.move is present on the serial form view making
the operation easier.

Fixes #3560, lp:1176912
2014-11-27 12:47:41 +01:00
Edy Kendengis 002664ed79 [IMP] stock: display company in location tree view 2014-11-26 15:32:25 +01:00
Denis Ledoux bd338a779a [FIX] stock: typo incomming -> incoming in demo & tests
I avoid to change external ids, in case some custom/community modules use it in their own tests
2014-11-25 17:38:32 +01:00
Josse Colpaert 23c010c9b4 [IMP] Incoming, outgoing and virtual quantities should not take draft moves into account 2014-11-24 22:38:51 +01:00
Olivier Dony a6d24db305 [I18N] Update translations from Launchpad 8.0 branches 2014-11-19 17:49:12 +01:00
Josse Colpaert 2f5ca4380a Revert "[IMP] Remove unnecessary refresh statements because of new api"
This reverts commit b213438176.
2014-11-17 09:44:10 +01:00
Josse Colpaert b213438176 [IMP] Remove unnecessary refresh statements because of new api 2014-11-17 09:24:06 +01:00
Denis Ledoux 7ab413724a [MERGE] forward port of branch 7.0 up to da15c9d 2014-11-14 15:59:33 +01:00
Martin Trigaux cf488682c8 [FIX] stock: multicompany reception
When a picking is confirmed, the generated account.move(.line) should take the
company, accounts, journals and period with the same company as the picking,
not the one of the current user.

This was problematic if a user in a company confirm a picking linked to
a purchase order done in another company.
For real time valuations, the generated accounting entries were mixing both
companies.

Fixes #3466
2014-11-14 12:24:40 +01:00
Josse Colpaert 94b768d30f [IMP] Update comments for inventory from import 2014-11-13 11:50:02 +01:00
Josse Colpaert d667d60c45 [IMP] When an inventory has lines already, don't delete them, that way we can import them
[IMP] Put the theoretical quantity when importing an inventory
2014-11-13 11:50:02 +01:00
Josse Colpaert 518b2f6a3f [FIX] super of scheduler / delivery method and phantom boms / average price
[FIX] super of scheduler should have same params + use_new_cursor should be passed to procure orderpoint confirm

[IMP] Make sure the delivery works when doing phantom boms

[FIX] This should update the average price properly when having multiple moves with the same product

[FIX] Average price should take into account the quantities of all variants

[FIX] Make sure purchase picking type in other company works

[IMP] Views of quants and destination locations of moves
2014-11-13 11:50:01 +01:00
Josse Colpaert 86f785ae1b [FIX] #3153 Digits in wizard should be those of moves,... / Recreate delivery order from sale / Delivery method on delivery order
[IMP] Provide better purchase order picking type

[IMP] Possibly a better product uos handling in the sale order line

[FIX] Recreate of delivery order when sales order in shipping exception

[FIX] Delivery method should be passed to delivery order
2014-11-13 11:50:01 +01:00
Denis Ledoux 654ce2bb13 [FIX] stock: do not try to upper undefined picking name
opw-617750
2014-11-12 12:21:58 +01:00
Christophe Simonis e74fb09a00 [MERGE] forward port of branch 7.0 up to ab5ecef 2014-11-12 10:56:38 +01:00
Ravi Gohil c6a5be0a19 [IMP] stock: added missing 'context' parameter (opw 616952) 2014-11-06 18:14:11 +01:00
Denis Ledoux 8c4a7cb371 [MERGE] forward port of branch 7.0 up to 5035c76 2014-11-04 12:19:58 +01:00
Mohammad Alhashash 8af9fdfa06 [FIX] stock: more tolerant copy method
Allow setting origin/backorder when copying new stock.picking
Fixes #379, lp:1098557
2014-10-31 14:09:25 +01:00
Martin Trigaux aed71f3962 [IMP] stock: avoid errors with picking without quantity
When a line is not present in the partial delivery wizard, computation variables are initialized with generic values (zero quantity, zero price,...). Instead of setting the uom to False, keep the quantity of the move.
This makes a difference only when the quantity of the move is 0. That means that the move will be marked as complete and can be processed.
This avoids trying to update the stock.move with a uom at False. opw 616844
2014-10-31 12:32:08 +01:00
Christophe Simonis 21b1203ee0 [MERGE] forward port of branch 7.0 up to 43db726 2014-10-29 19:05:43 +01:00
Mohammad Alhashash 43db7267c5 [FIX] stock: UoS quantity in stock.picking
Implements the UoS TODO items on stock.picking.do_partial() to fix #1432.
Add a new method _compute_uos_qty() on product.product to computes
product's invoicing quantity in UoS from quantity in UoM.

The created invoice will use the product_uos of the stock.move, meaning keeping
the quantity specified on the partial picking and the unit of measure of the
original stock.move (e.g. recieving 1 dozen from a 12 unit picking should either
get uos=dozen, uos_qty=1 or uos=unit, uos_qty=12, not a mix of both)

Fixes #1432, opw 611479
2014-10-29 10:10:50 +01:00
Denis Ledoux a6024a6376 [MERGE] forward port of branch 7.0 up to 00ec786 2014-10-28 13:40:17 +01:00
Ravi Gohil d28cab5257 [FIX] stock: forbid adding new lines when processing picking
Source and destination locations are required and not displayed in the form view.
Adding new items when recieving a picking can not be easily guessed as we can put different locations for each line, using default locations may not be the expected result.
Instead should modify the original picking or create new one.
Fixes #2074, opw 612768
2014-10-27 14:37:36 +01:00
Josse Colpaert 3dff2877a1 [FIX] Operation does not necessary have product for extra move 2014-10-24 18:21:01 +02:00
Josse Colpaert 26cb72d104 [FIX] Currency_id on purchase requisition + move created from procurement should go to location of procurement not of rule (procurement location can be child of rule location. In handy for customer locations)
[FIX] Other elements of purchase of purchase requisition

[IMP] Picking type on purchase requisition

[FIX] Location of purchase
2014-10-14 23:19:15 +02:00
Cedric Snauwaert 77ae95db5a [FIX] barcode_interface: when loading widget, picking_type_id was sometime not correctly set 2014-10-09 15:04:02 +02:00
Olivier Dony 7439421ad2 [I18N] Update translations from Launchpad 8.0 branches 2014-10-08 17:52:25 +02:00
Denis Ledoux b13898c058 [MERGE] forward port of branch 7.0 up to 03df412f 2014-10-07 17:34:42 +02:00
Lionel Sausin (Numérigraphe) 04bc91cb4e [FIX] stock: groups mixup in views
Use group_production_lot for serial options, group_stock_packaging for packaging, use group_tracking_lot for pallet/parcel
Groups are removed completly from the view for stock.tracking as they render the view useless.

Always display weights on the product form
They really have nothing to do with the logistic units and we don't have another group to restrict them to.

Fixes #1443
2014-10-06 14:43:11 +02:00
Josse Colpaert 383f2b2c43 [IMP] Make sure invoice_state of picking is used when creating extra moves and take price of related move if there is one
When we would copy, it gives problems as it won't be invoiced the correct way on sale, so we provide for a simpler solution.
2014-10-06 09:10:09 +02:00
Cedric Snauwaert d692e4ef56 [FIX] barcode interface: a lot of deferred were not correctly returned 2014-10-02 15:17:37 +02:00
qdp-odoo e7f44018a3 [FIX] stock: allow the user to use the '!=' operator in domains for 'Qty on Hand' and 'Qty available'. Fixes #2763 2014-10-01 16:50:10 +02:00
Josse Colpaert 884a8ad4a5 [IMP] UoM corrections + Adapt tables in stock doc
[IMP] Float_compare before splitting moves in mrp
2014-09-30 10:31:33 +02:00
Josse Colpaert 661a204eda [IMP] Better demo data + property comment + recheck
[IMP] Recheck should be type object and procure_method read only when not in draft

[FIX] Inversion of moves in the correct way and assigning production_id

As the moves are split the other way, the original move needs to be done.  Also the production_id for linking the
new to be produced moves and the production order must be written on those.

[IMP] Clean
2014-09-30 10:31:33 +02:00
Josse Colpaert 25d2ed6d4b [IMP] Update module descriptions of procurement and product_extended + _bom_find and properties
Module description of procurement was deprecated (talking about mrp, ...) and in product_extended
it described things not implemented in the module.

In _bom_find, we passed a UoM which was not used in Saas-4 and it would not be logical that you
need to select a BoM that matches the UoM, so I removed it.

In the demo data, there was still a push rule which triggered a move from output to pack.  The copy=False
is correct for production_id when you would have these push rules.

For the properties: we want to allow to take a bom which has no properties, but only when there is no other
BoM matching the properties we pass.

Update module descriptions

[IMP] production_id copy + no round

[IMP] _bom_find without uom, property correction
2014-09-30 10:31:33 +02:00
Josse Colpaert 3dcb020373 [IMP] Change documentation + new action_consume/qty/origin corrections
Simplify the action_consume of the consumption lines after the corrections
by Kevin Wang.  Also the UoMs are revised as the action_consume uses the default UoM
of the product.

We have to avoid circular boms where a child bom should not contain the product that
represents the parent bom, but it is possible for example to use another product of the parent bom in
the child bom.

As the consume line move has no procurement rule, its origin will have no description.  So, when there is
none it will also check the description of the previous move (when passed to procurement for example) This way
the chained moves or purchase order for example will have the MO-number as origin and not nothing.

[IMP] Change assignation

[IMP] UoM changes continuation

[IMP] Make sure we can use 2 times the same product in a BoM

[IMP] Source document for consume lines to procurement
2014-09-30 10:31:33 +02:00
Josse Colpaert c6c622542b [IMP] UoM in mrp + rereserve of partial 2014-09-30 10:31:33 +02:00
Martin Trigaux 0c36f8a4ce Forward port of branch 7.0 up to 1933e92 2014-09-24 17:10:14 +02:00
Guewen Baconnier b5c8ced8ec [IMP] stock: Optimize stock_move.setlast_tracking()
When setlast_tracking is called on a large number of moves in a picking
(e.g.  when splitting moves in a picking), the time to complete grows
exponentially.  The reason is that it loops over all the moves of
a picking, even if it keeps only the last tracking.

The method now uses a search() with a limit so it doesn't need to browse
all the moves.

Added test to check the behaviour of setlast_tracking
Fixes #2448
2014-09-24 16:41:29 +02:00
Martin Trigaux 933d098e7d [IMP] stock: do not generate empty backorders
If every line of a partial delivery is at zero, do not generate empty backorders (opw 608680)
2014-09-24 15:16:38 +02:00
Martin Trigaux 94eae37ecf Forward port of 7.0 up to rev 4a064b9 2014-09-24 10:35:28 +02:00
Martin Trigaux 4a064b9374 [FIX] stock: error on stock.partial.move creation
The stock_partial_move wizard removes the required attribute for the field picking_id on a stock.partial.move. This means that we could get moves without picking_id and the previous line was failing ('NoneType' object has no attribute 'currency_id'). opw 614531
2014-09-24 10:30:44 +02:00
Olivier Dony b74d830eb2 [I18N] Update translation templates with latest term changes 2014-09-23 19:13:50 +02:00
Olivier Dony 1c5b5e4290 [I18N] Update translations from Launchpad 8.0 branches
server: rev. 26 rev-id launchpad_translations_on_behalf_of_openerp-20140923072744-tkfs0yinu8msjh09
addons: rev. 39 rev-id launchpad_translations_on_behalf_of_openerp-20140923072715-5j7qvnuvmmb1zzy1
web: rev. 23 rev-id launchpad_translations_on_behalf_of_openerp-20140923072757-jvh9l6r2x0vfcyhb
2014-09-23 13:42:05 +02:00
Josse Colpaert ac2d50d27a [IMP] Assign all destination moves at once, add packaging 2014-09-22 11:29:39 +02:00
Josse Colpaert 277c870de7 [FIX] Previous move subtleties 2014-09-22 11:29:39 +02:00
Martin Trigaux c82bd1365c Forward port of 7.0 up to rev 9b87d6f 2014-09-19 15:28:02 +02:00