Commit Graph
303 Commits
Author SHA1 Message Date
Cédric Krier 54830466f2 Remove unused assign button from move
issue11362
review380641003
2022-04-11 22:15:59 +02:00
Nicolas Évrard 0ab66f93af Send only the required fields when fetching a readonly view definition
issue11134
review380081002
2022-04-08 19:07:14 +02:00
Cédric Krier e22538d3de Set effective date of outgoing moves to effective start date
The outgoing moves of an internal shipment with transit must use the effective
start date when done.

issue11337
review397651002
2022-04-03 23:54:13 +02:00
Cédric Krier bab0d68d11 Show production on stock move form
issue11254
review384391002
2022-03-20 01:27:59 +01:00
Cédric Krier 9256ae7d62 Round quantity computing in search clause
The internal quantity is stored without precision constraint and so the sum
result of many rows cumulate the rounding issue.
So the quantity must be rounded to return correct result when operator is
equality.
But as getting the digits from the product default uom would require to make
many joins, the simplest and more efficient solution is to use the highest
digits of the units.

issue11235
review390001002
2022-02-17 00:37:39 +01:00
Cédric Krier 6ef3e8c323 Do not sort state selection
issue11169
review374761005
2022-02-15 00:08:47 +01:00
Juanjo Garcia 427e26d309 Require unit price also for view location like for storage
issue11181
review355951002
2022-02-04 21:36:26 +01:00
Cédric Krier f72cdeb5de Use select to True on create_date
If the index is created only in __register__ then it is dropped before being
created again.

issue11197
review389881002
2022-02-03 22:29:08 +01:00
Cédric Krier a9a130a5d0 Ensure to set correct company context when calling today
issue11046
review370421002
2022-01-23 12:54:56 +01:00
Bernat f68c8867a6 Prevent to compare with None on searching quantity
issue11047
review387481002
2021-12-18 01:38:39 +01:00
Cédric Krier 234b85f9c2 Follow isort formatting
issue10928
2021-12-11 17:58:44 +01:00
Cédric Krier 85f5ab6626 Use ModelSQL lock instead of database lock
issue10785
2021-10-18 01:22:26 +02:00
Cédric Krier 31f52981ca Add method to sort quantities for assignation
issue10814
review362811002
2021-10-12 00:04:27 +02:00
Maxime Richez 5114196fde Add methods to format number and symbol on Lang
and add format number with symbol on Report

issue10730
review371831002
2021-10-04 18:52:01 +02:00
Cédric Krier a8a04caaea Provide digits from unit of measure
issue10677
review365801002
2021-08-30 00:27:13 +02:00
Cédric Krier 8a118d1fd1 Save less often cost values when doing move
We can save the cost values only when a cost value was computed for a product
already moved.
Also FIFO requires to save extra moves which can be included in the save loop
so the Move._do method returns an extra list of moves to save.

issue10640
review369361002
2021-08-27 08:59:26 +02:00
Cédric Krier 5b3f43c147 Replace cost_warehouse by warehouse of stock module
issue10572
review358401002
2021-08-06 09:41:00 +02:00
Cédric Krier 916c0d0eca Add method to format warning name with records
issue10507
review346471002
2021-06-17 09:25:40 +02:00
Cédric Krier 6a532ba7dd Fully set product domain of move on setup
When modify in __setup__ the domain of a field defined in the same class, this
alter the original copy of the field. So the domain is appended to itself on
each __setup__ call (each time the model is extended by another module).

issue10406
review336241002
2021-05-15 09:20:43 +02:00
Cédric Krier 19b99941e1 Remove contextual domain on company
issue10302
review338141004
2021-04-20 09:18:58 +02:00
Sergi Almacellas Abellana 7370ce43b9 Allow shipments to be automatically assigned
issue9513
review318011002
2021-04-12 18:33:33 +02:00
Nicolas Évrard 73cbb1bb03 Call super() method of view_attributes
issue10151
review349551002
2021-04-09 10:52:03 +02:00
Cédric Krier 25d00ee143 Use explicit list of product types for stock move
issue10225
review361481002
2021-04-03 23:30:21 +02:00
Cédric Krier cd9c86163b Replace cursor fetchall by iteration over cursor
issue5817
review335831003
2021-03-21 16:09:13 +01:00
Sergi Almacellas Abellana ceefdeb72f Manage staging moves on shipment workflow
Staging moves are automatically assigned when purchased so
we should remove them when packing a shipment as they are
not part of the shipment.

We also skip moves with zero quantity because they will
always succeed.

issue9448
review313951002
2021-03-06 19:19:53 +01:00
Sergi Almacellas Abellana 9e6e245f02 Test date in the future after setting effective date
issue10134
review347721002
2021-03-06 19:07:48 +01:00
Cédric Krier b8a8b9ebf0 Add test on context of company multivalue target fields
issue10067
review333851026
2021-03-05 15:49:20 +01:00
Cédric Krier a5d07f7298 Update unit price after invoice posted and move done
issue9962
review292991002
2021-02-03 21:21:03 +01:00
Cédric Krier 25906f28ff Prevent ValueError when from location is a view
If the from location is a view, it may not be in the childs list.

issue9896
review316751002
2021-01-08 22:57:47 +01:00
Cédric Krier 5006ce2bac Use cache to fill Reference selections
issue9235
review335301003
2020-12-27 00:19:30 +01:00
Cédric Krier b035935cef Manage move in future at inventory level
As the inventory creates and do the moves in the same transaction, the warning
about effective date in future can not be ignored (the ids change).
Also the warning name should be based on an ordered list of record to ensure to
generate always the same name.

issue9707
review328441002
2020-10-12 20:31:27 +02:00
Sergi Almacellas Abellana 95b4dae623 Allow lost and found on inventory moves
issue9156
review323431002
2020-10-11 23:46:10 +02:00
Sergi Almacellas Abellana 90f34e0f37 Prevent doing moves in the future
issue9355
review327351002
2020-10-04 23:57:37 +02:00
Cédric Krier 61f8d6629b Use query clause when searching quantity for 1 location
We can use the compute quantities query if the request is for a single location
because all the locations are children and so we can do a SUM.

issue9594
review323991002
2020-09-27 18:20:34 +02:00
Cédric Krier a7affa630b Do not enforce uom category on done or cancelled move
The user can no more fix such move so we should not fail if the validation is
triggered by the update of another field.

issue9503
review319761002
2020-08-12 22:02:26 +02:00
Sergi Almacellas Abellana 45665750cd Only try to assign non assigned moves
issue9206
review311191005
2020-08-12 14:28:23 +02:00
Cédric Krier acc3db8f60 Use original cost price for returned move
and factorize the cost price of move for cost computation

issue9440
review327491003
2020-08-10 23:38:04 +02:00
Cédric Krier ab81afbe99 Fill grouping values when assigning move
issue9480
review303951082
2020-08-10 23:30:14 +02:00
Cédric Krier 671e1b2599 Enforce unit price on drop and customer return moves
Those values are interesting information for reporting or to compare with the
cost price.

issue9402
review327421002
2020-07-04 23:49:25 +02:00
Cédric Krier 8586ea73fa Add unit_price_company Function field on stock move
issue9401
review290341002
2020-07-04 00:21:39 +02:00
Cédric Krier 542fae7fc0 Enforce filling cost price of move
We set cost price only for outgoing or incoming moves.

issue9397
review321611002
2020-07-03 21:22:43 +02:00
David Harper 51b4786235 Rename move state from cancel to cancelled
issue8927
review297851002
2020-06-06 10:30:11 +01:00
Cédric Krier e3cd7bed4f Run multiple lock queries for large number of locations
Also reduce the assign_try method size by externalise the lock mechanism, this
will also allow to customize it.

issue9326
review307581002
2020-05-19 18:45:29 +02:00
Cédric Krier f542e01b88 Add round_price
We add a common method to round prices that are stored using the price digits.
It is useless to use the digits from the field because it can not be changed in
any other way than by configuration.

issue9146
review299521002
2020-04-23 21:44:00 +02:00
Cédric Krier 5c12d36b7d Fix flake8 errors and warnings
We add the flake8 configuration used so we ensure everyone uses the same.
We remove the usage of __all__ for non public API.
When possible, we rationalize the class name according to its __name__ and module.

issue9082
review297061002
2020-03-01 12:33:54 +01:00
Cédric Krier 615e7d3507 Ensure quantity field is always for today with future dates
An empty stock_date_end is converted into max date in compute_quantities_query
and forecast context should be explicitly disable.

issue9044
review282931002
2020-02-15 01:41:47 +01:00
Cédric Krier 97490c0018 Manage explicitly stock_skip_warehouse context
The windows that display product quantities should explicitly manage the
stock_skip_warehouse context to ensure static result.

issue9041
review253051002
2020-02-15 01:40:11 +01:00
Cédric Krier f204b7bd0b Update cost of moves when recomputing product cost
issue8795
issue7271
review260381003
2020-01-26 15:29:23 +01:00
Cédric Krier 8881739a64 Use integer to retrieve instances
The values of Many2One can be instances.

issue8861
2019-12-13 16:56:44 +01:00
Cédric Krier 14a0242d95 Read products and uoms in bunch to compute internal quantity at creation
issue8861
review256291002
2019-12-11 19:38:57 +01:00