Commit Graph
179 Commits
Author SHA1 Message Date
Cédric Krier 1014cf5400 Use price_digits
issue4438
review6791002
2015-01-06 23:31:09 +01:00
Cédric Krier bb7b385146 Add 'staging' state to stock move
issue4362
review5811002
2015-01-02 15:40:11 +01:00
Cédric Krier 88053c26bd Apply stock_assign of compute_quantity_query only on outgoing moves
It is too much optimistic to compute incoming assigned moves as done.

issue4384
review10681002
2014-12-11 22:18:32 +01:00
Cédric Krier 994bd8a103 Fix most flake8 errors
review8771002
2014-12-02 12:56:04 +01:00
Robin Baumgartner 486006e8ff Use Null constant from python-sql for comparisons
issue4143
review13701003
2014-11-24 14:03:52 +01:00
Cédric Krier 5b4b6b1558 New API for on_change
issue4203
review8581002
2014-10-29 20:40:25 +01:00
Nicolas Évrard 00505350c5 Do not filter out inactive products from stock computation
issue4240
review12621002
2014-10-24 17:28:53 +02:00
Cédric Krier abc4bd5a96 Use context to check model and field access
issue4081
review8481002
2014-09-17 21:45:58 +02:00
Cédric Krier 47a2190ede Compute cost price one move at a time
As _update_product_cost_price uses product quantity, this quantity must be
recomputed after each move in case some are for the same products.

issue4039
review11421002
2014-08-29 16:23:10 +02:00
Cédric Krier f04e44c681 The cancellation of move should not compute cost price
because such move can not be done (prevented by _deny_modify_done_cancel).

issue4107
review11421002
2014-08-29 16:21:21 +02:00
Cédric Krier a468a9b995 Fix compute_quantities_query when stock.move has no domain rule
move_rule_query is used with a IN clause so it doesn't work with literal True.
So in case of move_rule_query is empty, the clause should simply be the literal
without IN clause.

issue3999
review11341002
2014-07-09 00:13:47 +02:00
Cédric Krier 634913f549 Add warning for external move without origin
issue3677
review3521002
2014-03-10 20:16:00 +01:00
Cédric Krier ba81d4bbf0 Fix comment in Mixin, location_ids can be empty 2014-02-06 19:38:25 +01:00
Sergi Almacellas Abellana 0fd9f7ebc7 Allow to define the effective date of shipments
issue3579
review2651002
2014-01-30 19:19:49 +01:00
Cédric Krier 634b9ab416 Use fields.depends decorator
issue3487
review2301002
2014-01-26 14:29:37 +01:00
Cédric Krier 0ba33d88a2 Use a sequence of records, values in write
issue3499
review1641003
2013-12-19 14:45:31 +01:00
Guillem Barba 38ab876749 New methods on stock.move to compute quantities more modular
* Split products_by_location into two methods on Move:
  compute_quantities_query and compute_quantities
* Use new methods to compute quantities in StockMixin._search_quantity()

issue3201
review971002
2013-12-17 16:22:36 +01:00
Cédric Krier 2b78c34768 Use origin for inventory move
By using the origin, it is possible to create all the move with one create
call.

issue3512
review1811002
2013-11-28 23:21:45 +01:00
Cédric Krier 35a8bc1141 Allow partial assignation on Supplier Shipment Return
issue3492
review1681002
2013-11-25 12:27:06 +01:00
Cédric Krier 1d6e99e7b7 Fix usage of context company
Default value of company should be -1 to get the right cast and an impossible
value.
Replace False by None as other value in "in" clause.

issue3394
review1119002
2013-10-09 18:25:53 +02:00
Cédric Krier 68eb13ed88 Fix flake8 2013-10-05 12:17:26 +02:00
Cédric Krier 4f5c6a4727 Fix infinite loop when setting internal_quantity
There could be difference for Float field between the written value and the
read one. This could lead to an infinite loop of write calls, so we also test
that it is not already writing the same internal value.

issue3332
review1109002
2013-10-03 21:18:46 +02:00
Guillem Barba c74473ecfe Fix domain concatenation between list and tuple
issue3386
review1099002
2013-09-30 17:44:19 +02:00
Nicolas Évrard 20cb5a0791 Replace reference copying by relate
review932002
2013-09-19 17:34:23 +02:00
Guillem Barba fe08fb891e Remove incorrect staticmethod declaration 2013-09-12 18:12:31 +02:00
Guillem Barba 0096fed655 Add Mixin class with helper to setup stock quantity fields
Add StockMixin class in move.py file with helper functions to be used in getter
and searcher methods of quantity fields.
Reimplemented getter and searcher of quantity/forecast_quantity fields of
Product to use these helper functions.
Add test over product's quantity fields.

issue3279
review963003
2013-09-09 14:11:53 +02:00
Cédric Krier 4f833ee812 Migration to python-sql
review1001002
2013-09-06 22:34:48 +02:00
Nicolas Évrard 9c4fac4db7 Reenact check_period_closed on creation (removed by changeset a4feb97fdf49)
review1041004
2013-08-29 13:24:49 +02:00
Nicolas Évrard 8965437cf8 Do not check for closed period when writing on anglo_saxon_quantity
review928002
2013-08-28 18:23:45 +02:00
Cédric Krier 4e657bfcf1 merge 2013-06-25 19:18:28 +02:00
Cédric Krier 77c5845141 Extend Lot Management
Allow to customize move creation of Inventory
Allow to customize unique constraint on Inventory
Allow specific grouping Period Cache
Add grouping on products_by_location and assign_try

review845002
2013-06-21 23:24:17 +02:00
Giedrius Slavinskas 0931f3d391 Factorize field checks on StockMove write method
review891002
2013-06-05 10:45:18 +03:00
Albert Cervera i Areny f594f23e27 Add missing space in error message.
review751002
2013-04-29 11:24:46 +02:00
Cédric Krier 4cc0484027 Unit price should also be required for move to supplier
review791002
2013-04-16 15:30:21 +02:00
Cédric Krier c7326c55fb Use reference fields
Merge all shipment Many2One into shipment Reference
Add origin Reference on Stock Move

issue2642
review717002
2013-03-23 15:42:36 +01:00
Cédric Krier 65cfc60c14 Remove _inherits
review670002
2013-03-20 22:51:12 +01:00
Albert Cervera i Areny e1540c219a Replace _constraints with validate in ModelStorage and improve user messages.
issue2616
review371002
2013-03-07 16:56:01 +01:00
Cédric Krier fd91db0948 Fix average cost price computation
context locations should be list of ids and not instances

issue3037
review703002
2013-03-06 13:08:21 +01:00
Cédric Krier a81cd74495 Fix flake8 2013-02-24 16:18:17 +01:00
Ian Wilson bd452b96c2 Use execute instead of write to bypass domain checks during migration.
Use execute instead of write to bypass domain checks on product when migrating
from 1.8 to 2.6. There is a circular dependency between the
stock module and the product module if migrating from 1.8.

issue3005
review673002
2013-02-15 13:41:59 -08:00
Albert Cervera i Areny 37b61a3e90 Use a list of dictionaries in create().
issue2358
review266002
2013-01-06 22:18:13 +01:00
Cédric Krier 75bbef0077 Use Workflow for Stock Move
review600002
2012-12-27 21:53:07 +01:00
Cédric Krier c5f83d3810 Active Record 2012-09-24 22:18:17 +02:00
Cédric Krier 7e9b043113 Use the right quantity when updating the cost_price
review462002
2012-08-16 16:04:01 +02:00
Cédric Krier bd7f66d7db Fix pep8 and pyflakes 2012-04-03 20:07:43 +02:00
Cédric Krier a3485b82c4 Add missing initialisation of unit_price in on_change_product 2012-03-28 09:37:46 +02:00
Cédric Krier 1532f220ee Set unit_price via on_change for every cases it is required
review304003
2012-03-27 13:58:37 +02:00
Cédric Krier bde2ff9edb merge 2012-03-27 10:45:11 +02:00
Cédric Krier 791735b65d Replace wrong usage of False by None
issue2512
2012-03-27 10:44:04 +02:00
Cédric Krier 3a7777aa98 Missing default_unit_digits on move 2012-03-26 14:42:50 +02:00