Commit Graph
47 Commits
Author SHA1 Message Date
Cédric Krier 3ff455d808 Allow to modify fifo_quantity in closed period
The FIFO quantity may need to be updated after the stock period is closed.
As it does not affect the period cache, it can be updated.

issue6883
review35721002
2017-10-30 09:55:51 +01:00
Cédric Krier 0d95669f8c Improve performance of cost price computation
- Return average cost price
- Compute average cost price with the current move

issue6626
review42501002
2017-08-02 23:04:45 +02:00
Cédric Krier 3827d940d0 Move cost price to product level instead of template
issue6515
review41321002
2017-07-05 14:51:46 +02:00
Cédric Krier 81f289aad8 Do not call write with no parameters
fifo_moves could be empty and so be also to_write but calling write without
parameter is not allowed.
This was introduced in changeset 8237f9e3afaf

issue6196
review33811002
2017-02-08 09:54:29 +01:00
Sergi Almacellas Abellana 36fb461b2d Fix antipatern of create/write in loop
issue3516
review13951002
2016-06-17 13:44:45 +02:00
Jonathan Levy 21c654800b Add Python3 support
issue3211
review17861002
2016-02-27 15:22:10 +01:00
Cédric Krier 340d5f5839 Missing conversion of unit price to company currency
The currency of unit price on move is defined by the currency field.
So to compute the cost price, it should first be converted to the company
currency.

issue5057
review19561002
2015-10-22 18:14:45 +02:00
Cédric Krier fc850d7560 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
2015-10-22 11:02:49 +02:00
Cédric Krier f481ca689a Use Constraint instance in ModelSQL._sql_constraints
issue4814
review15491002
2015-06-22 16:59:35 +02:00
Guillem Barba 702e420c52 Remove digits attribute from internal quantity fields
issue4741
review19281002
2015-06-17 08:33:26 +02:00
Cédric Krier 8c95a3bfb5 Fix most flake8 errors
review8771002
2014-12-02 12:55:33 +01:00
Cédric Krier 629d1bd34d 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
review12441002
2014-08-29 16:24:28 +02:00
Cédric Krier 98c2b4873b The cancellation of move should not compute cost price
because such move can not be done (prevented by _deny_modify_done_cancel)

issue4107
review12441002
2014-08-29 16:24:01 +02:00
Albert Cervera i Areny 98d238af7b Fix stock.move delete method.
issue3282
review966002
2013-07-02 15:59:48 +02:00
Cédric Krier 820bbedab2 Call _update_fifo_out_product_cost_price for any outgoing moves
issue3138
review781002
2013-04-13 11:54:30 +02:00
Cédric Krier 7c85aca8cd Update cost price according to product quantity selected
issue3138
review781002
2013-04-13 11:53:27 +02:00
Udo Spallek ea5ba1cebb Signature of raise_user_error is tuple
issue3078
review735002
2013-03-25 10:28:28 +00:00
Cédric Krier 581c8b40ac Re-add missing update of cost_price lost in workflow migration
issue3051
review704003
2013-03-12 10:31:15 +01:00
Albert Cervera i Areny 01a908ca9d Replace _constraints with validate in ModelStorage and improve user messages.
issue2616
review371002
2013-03-07 16:55:33 +01:00
Cédric Krier 44a8fda655 Forget to remove classmethod decorator
When refactored _update_fifo_out_product_cost_price into instance method.

issue3048
2013-03-07 15:56:26 +01:00
Cédric Krier 4961fa90f5 Refactore _update_fifo_out_product_cost_price into instance method
review681002
2013-02-26 20:38:58 +01:00
Cédric Krier a1636f1f65 Fix flake8 2013-02-24 14:19:56 +01:00
Cédric Krier 23566155e9 Fix signature call to _update_product_cost_price
issue3018
2013-02-22 16:45:39 +01:00
Cédric Krier 6926419581 Fix wrong arguments for _update_fifo_out_product_cost_price
issue3007
review663003
2013-02-20 10:33:48 +01:00
Cédric Krier 380c56e1c3 Use Workflow for Stock Move
review600002
2012-12-27 21:54:05 +01:00
Oscar Andres Alvarez 760eff2bfe Active Record 2012-09-24 22:09:23 +02:00
Cédric Krier 5b2d98d4c3 Fix pep8 and pyflakes 2012-04-03 20:07:21 +02:00
Cédric Krier c6347444d1 Add support for production location in cost price computation
review295004
2012-03-25 15:45:02 +02:00
Cédric Krier aaa64fcd0c Update cost_price only from supplier to storage 2012-02-24 11:56:57 +01:00
Nicolas Évrard 6395305807 fix pyflake errors
review163010
2011-11-02 16:10:59 +01:00
Cédric Krier 65dd846757 Add test for depends 2011-08-04 16:59:28 +02:00
Cédric Krier 77aedd4eae Change Pool into a Singleton 2011-07-03 13:19:03 +02:00
Mathias Behrle 1ab97b45f1 Use effective_date to calculate currency rate for issue1746. 2011-04-13 18:13:41 +02:00
Cédric Krier f641a9f52b Fix default fifo_quantity naming 2010-12-12 16:51:12 +01:00
Cédric Krier 029078b8c4 Backed out changeset 332af0f948ab 2010-12-12 16:50:44 +01:00
Cédric Krier b06d7c1ee6 Fix default fifo_quantity
- Fix name
- It should return a Decimal
2010-12-12 16:47:48 +01:00
Cédric Krier 397f836684 Update for new Transaction 2010-08-19 22:16:13 +02:00
Cédric Krier a3a8fc1175 Round cost price before writing for issue1523 2010-04-27 00:04:21 +02:00
Cédric Krier c4509ba5ab Use PySON 2010-01-20 11:01:30 +01:00
Bertrand Chenal 38d3c3ad53 Removed obsolete comment 2009-07-28 16:56:33 +02:00
Bertrand Chenal 55929d2e58 Typos 2009-04-02 21:50:55 +02:00
Bertrand Chenal 4bb1796e7a Change cost price computation of outgoing moves for fifo products
The cost price is no more the price of the last "fist in" move
considered but the weighted average price of the all the "first in"
moves used to balance the requested quantity.
2009-04-02 19:31:45 +02:00
Cédric Krier 0886a4642b Remove OSV and WizardOSV 2009-02-28 17:00:52 +01:00
Cédric Krier 72a72894a5 Fix typo 2009-01-21 23:52:55 +01:00
Cédric Krier 7627ede35d Handle fifo cost price for products return to supplier 2008-12-03 15:31:23 +01:00
Cédric Krier 00be599669 Remove type on stock.move 2008-12-02 19:49:13 +01:00
Cédric Krier 8e8d9a02aa Initial commit of product cost fifo module 2008-11-03 18:51:00 +01:00