Cédric Krier
8db7d9bcdb
Check period closed per company
...
issue5934
review30611002
2016-10-11 18:10:02 +02:00
Albert Cervera i Areny
2d34ff6cfd
Allow using view locations in cancelled stock moves.
...
Since changest 29ab3d9bd918 we allow using view locations in draft and staging
moves making it possible to have a warehouse with a view location as main
storage location. But if the user wanted to cancel a shipment with such location
she would have to change the location of all moves before cancelling which is
very annoying.
issue5891
review29531002
2016-10-02 11:00:17 +02:00
Sergi Almacellas Abellana
82be44e56e
Fix antipatern of create/write in loop
...
issue3516
review6891002
2016-06-23 09:40:00 +02:00
Guillem Barba
6430cf4ccf
Improve Move.assign() making a single call to Move.write()
...
issue5155
review20581002
2016-03-21 11:06:22 +01:00
Cédric Krier
c91a2409f2
Add a quick sum in compute_quantities for single location
...
When a single location is requested, we don't need to compute the value of all
the node of the subtree because all locations are children. So we can sum the
quantity directly as if it was for the location.
issue5297
review23781002
2016-03-04 00:21:29 +01:00
Nicolas Évrard
94b0ab55e6
Follow PEP-0249 for Transaction and backends
...
issue4949
review19781002
2016-03-03 21:55:39 +01:00
Cédric Krier
2e04a068ee
Add Python3 support
...
issue3211
2016-02-26 00:04:09 +01:00
Karla Stenger
69ae155fa4
hange Uom.round into an instance method.
...
issue4423
review18811002
2016-01-11 10:30:50 -03:00
Cédric Krier
27e9e5f9d5
Add Function fields on Product from Template
...
issue5087
review23611002
2015-12-31 16:03:56 +01:00
Cédric Krier
3db856344d
Improve speed of Move.assign_try
...
- Use a cache for the childs of locations
- Delay write and assign calls to the end and group them
issue5033
review16721002
2015-11-10 13:05:53 +01:00
Cédric Krier
8abae7a97d
Add do button on stock move form & list
...
issue5042
review21471002
2015-11-05 23:29:59 +01:00
Raimon Esteve
8afd8034ed
Keep default location order when picking product
...
issue5050
review15771002
2015-10-22 17:18:17 +02:00
Cédric Krier
cca1c4a02d
Don't override cost_price if it is zero
...
Only override the cost_price if it was not set which means if it is None.
issue5034
review18701002
2015-10-15 00:57:30 +02:00
Sergi Almacellas Abellana
f6cc35f698
Fix average cost price when product quantity is negative
...
issue5038
review15721002
2015-10-14 15:45:21 +02:00
Nicolas Évrard
e97f7eb78f
Add buttons on stock move form & list
...
issue3945
review8991002
2015-09-26 21:19:37 +02:00
Cédric Krier
8507f1660f
Allow to use view location on staging and draft moves
...
issue4912
review24321002
2015-09-22 23:00:48 +02:00
Cédric Krier
a2da70ea13
Use new PYSON syntax
...
issue2205
review16391002
2015-06-28 23:45:31 +02:00
Cédric Krier
f20586adcd
Use Constraint instance in ModelSQL._sql_constraints
...
issue4814
review15491002
2015-06-22 17:00:00 +02:00
Cédric Krier
8a5de745c4
Pass explicit move to get_key in Move.assign_try
...
issue4811
review8161002
2015-06-15 01:21:31 +02:00
Cédric Krier
20dfc22151
Use new Rule.query_get
...
issue4800
review7211003
2015-06-15 01:16:21 +02:00
Cédric Krier
b677e166ca
Allow to re-compute cost price
...
and to change unit price of move done
issue4729
review12131002
2015-06-15 00:58:00 +02:00
Cédric Krier
6b8ce20a28
Fail assign_try if the remaining quantity is the rounding precision
...
issue4609
2015-03-09 20:44:21 +01:00
Cédric Krier
08ebed3b28
Round written quantity in assign_try
...
issue4609
review13051002
2015-03-09 19:36:31 +01:00
Cédric Krier
a0e23f6faa
Remove AS in GROUP BY of compute quantity query
...
It is not allowed to use alias output in the GROUP BY clause.
issue4495
review11811002
2015-01-27 22:59:44 +01:00
Cédric Krier
0a4c95ee08
staging move state should fail assignation
...
issue4462
review13871002
2015-01-09 19:06:36 +01:00
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