Commit Graph

53 Commits

Author SHA1 Message Date
Humberto Arocha 81418ec14e [FIX] stock_landed_costs: avoid useless multiple writes
Initialise quant_dict inside for loop as doing outside loops
renders to be a quadratic write of quant object due to the fact that
previous quants are kept each time a new valuation line is read.
In case of posting a Landed Cost record with a huge amount of cost_lines
and huge amount of stock_move having several quants would result in a
extra overhead.

Closes #9005
2015-10-12 10:40:26 +02:00
Humberto Arocha 432d6585c9 [FIX] Landed Cost: When Creating Negative costs with more than one picking line fixes #8714
check_sum fails as whole cost from cost_lines field are
fully allocated to first item in picking.
2015-10-01 16:47:18 +02:00
Ruchir Shukla 61300ee7f1 [FIX] stock_landed_costs: modify quants as admin
Nobody has write access to stock.quants so only the admin was able to execute
this method.
Fix it by using SUPERUSER_ID
Closes #8544
2015-09-21 16:40:34 +02:00
Goffin Simon 92c4a3e89a [FIX] stock_landed_costs: Former Cost
The former cost of a stock.valuation.adjustment.lines line is the sum
of cost * qty  of each quant linked to the stock.move record linked to
this line (with the field 'move_id').

opw:648922
2015-09-10 14:08:37 +02:00
Josse Colpaert 27003621da [FIX] stock_landed_cost: what is already out should use different accounts
When a landed costs is applied on goods that are already out, these landed
costs need to be subtracted in the stock valuation account and added in the output account.
(they were just added before)

When the landed cost is negative, it needs to do the opposite for what is already out also.
2015-07-02 11:34:31 +02:00
Nicolas Lempereur 52aee9a8e7 [FIX] stock_landed_costs: splitting and decimals
When splitting landed costs against the picking line, the decimal
precision was not taken into account.

For example: with a landed cost of 5.01 split equally over two lines,
the cost for each line is 2.505 which is rounded to 2.51 with a decimal
precision of the fractional part of 2. Hence the total was wrongly of
5.02 (which is an issue when wanted to validate the landed costs).

With this commit, the split landed costs are restrained to stay under
the whole landed cost price.

closes #6882
fixes #5568
opw-639503
2015-05-28 16:37:07 +02:00
Olivier Dony 15d00bd957 [FIX] stock_landed_cost: allow reversing valuation via negative quantity + safer cancel/unlink
- Support negative costs by creating reverse valuation move,
  and undoing the quant computation.
  This may or may not produce the exact reverse effect on
  the quant, as it depends on the rounding of the unit
  cost, which uses decimal precision 'Account'
- Hide 'compute' button when cost is not draft
- Forbid cancel of posted cost
- Forbid deletion of cost if not draft
2015-04-09 13:04:24 +02:00
Martin Trigaux 534d5b8fe7 [FIX] stock_landed_costs: avoid rounding issues for comparaison
amount_total may return an unrounded amount, force the comparison with
float_comapre to avoid errors
opw 631157
2015-03-27 14:52:11 +01:00
Grover Menacho 25c57719a2 [FIX]stock_landed_costs: Fixed wrong costs on landed costs with many products 2014-09-17 15:13:48 -04:00
Josse Colpaert 4d3ae9ea54 [IMP] Check sum + out should take quantities from stock move 2014-09-17 17:57:32 +02:00
Josse Colpaert 8e3997158e [IMP] Do the landed costs out of the quants already out of stock 2014-09-17 17:57:25 +02:00
Josse Colpaert df655f00a3 [IMP] Solve landed costs bug + invoice_state in account_anglo_saxon.yml 2014-09-12 13:50:53 +02:00
Josse Colpaert 327c488f2b [IMP] Pass product template to template method 2014-09-03 19:19:18 +02:00
qdp-odoo dce11788fa [FIX] stock_landed_costs: fixed several issues related to the computation and the accounting entries creation. Added a yaml test to cover the different split methods 2014-08-08 10:58:14 +02:00
Raphael Collet cbe2dbb672 [MERGE] new v8 api by rco
A squashed merge is required as the conversion of the apiculture branch from
bzr to git was not correctly done. The git history contains irrelevant blobs
and commits. This branch brings a lot of changes and fixes, too many to list
exhaustively.

- New orm api, objects are now used instead of ids
- Environements to encapsulates cr uid context while maintaining backward compatibility
- Field compute attribute is a new object oriented way to define function fields
- Shared browse record cache
- New onchange protocol
- Optional copy flag on fields
- Documentation update
- Dead code cleanup
- Lots of fixes
2014-07-06 17:05:41 +02:00
Jaydeep Barot 026e38b48f [REM] Unnecessary `size` parameters on char fields 2014-06-25 17:13:43 +02:00
Olivier Dony 74d2f592bf [IMP] Minor spellchecking/cleanup/nitpicking while reviewing new v8 WMS
bzr revid: odo@openerp.com-20140508143940-itpazj4eatznerw7
2014-05-08 16:39:40 +02:00
Quentin (OpenERP) f36b470c1b [MERGE] stock_landed_costs: better usability
bzr revid: qdp-launchpad@openerp.com-20140425124634-9bxzm92hx0di5ogy
2014-04-25 14:46:34 +02:00
Quentin (OpenERP) b96b904b2c [REF] stock_account: refactoring of do_change_standard_price() + removal of TODO statements
bzr revid: qdp-launchpad@openerp.com-20140425121810-tp2caagu1rnzpgcg
2014-04-25 14:18:10 +02:00
Mansi Kariya (OpenERP) 440ddae7f8 [ADD] Added sequence on Stock Landed Cost and added Landed Cost type Configuration view and improved product view
bzr revid: mka@tinyerp.com-20140425104945-1vfv217uy1xhbnmx
2014-04-25 16:19:45 +05:30
Quentin (OpenERP) 5237343263 [FIX] stock_landed_costs: accounting entries
bzr revid: qdp-launchpad@openerp.com-20140425084006-qwqv4qk4zpm86dgy
2014-04-25 10:40:06 +02:00
Quentin (OpenERP) 09bc7c923a [REF] stock_landed_costs: refactoring/improvements/fixes made during code review
bzr revid: qdp-launchpad@openerp.com-20140424133518-nqi1sxggetaum72r
2014-04-24 15:35:18 +02:00
DJ Patel c0d45ba62f [FIX] stock_landed_costs : Added a button to cancel the landed cost.
bzr revid: mdi@tinyerp.com-20140424133030-bxj3x4au976suj36
2014-04-24 19:00:30 +05:30
Quentin (OpenERP) f71e545f65 [FIX] stock_landed_costs: do not recompute the landed cost at each write
bzr revid: qdp-launchpad@openerp.com-20140424132020-mju7xq3g5c4j4j3r
2014-04-24 15:20:20 +02:00
Quentin (OpenERP) 76a96723a2 [FIX] stock_landed_costs: qty and volume computation
bzr revid: qdp-launchpad@openerp.com-20140424131510-hx55angkbe6jh4um
2014-04-24 15:15:10 +02:00
Quentin (OpenERP) 5183909ade [REF] stock_landed_costs usability imp
bzr revid: qdp-launchpad@openerp.com-20140424130846-6348yoos4omernli
2014-04-24 15:08:46 +02:00
DJ Patel f5a285267c [FIX] stock_landed_costs : Automatic computation of landed cost when we save the record.
bzr revid: mdi@tinyerp.com-20140424130403-3tqm8okdqwgzkm73
2014-04-24 18:34:03 +05:30
Quentin (OpenERP) 301b9a70eb [IMP] stock_landed_cost: functional review of the module.
bzr revid: qdp-launchpad@openerp.com-20140424103752-w12z1frkuujotnrb
2014-04-24 12:37:52 +02:00
DJ Patel 5f4876e7be [FIX] stock_landed_costs : You cannot validate a landed cost which has no valuation line.
bzr revid: mdi@tinyerp.com-20140424121656-8wb2mefhh7ons92d
2014-04-24 17:46:56 +05:30
DJ Patel 7e700e4554 [FIX] stock_landed_costs : Fixed the cost price of related quant.
bzr revid: mdi@tinyerp.com-20140424102431-llaqwn80mfp1j3h6
2014-04-24 15:54:31 +05:30
DJ Patel d626d770bf [ADD] stock_landed_costs : Added the openchatter notification system.
bzr revid: mdi@tinyerp.com-20140424100337-fbcyr73fjbj5gecw
2014-04-24 15:33:37 +05:30
Quentin (OpenERP) 20328559e6 [FIX] stock_landed_costs: don't consider products for which it doesn't make sense to compute a landed cost
bzr revid: qdp-launchpad@openerp.com-20140424091905-3pe5vyxwyg3atu9g
2014-04-24 11:19:05 +02:00
DJ Patel d2c484656c [FIX] stock_landed_costs : Fixed the calculation of landed costs.
bzr revid: mdi@tinyerp.com-20140421104149-iscgxoru7rgb25xs
2014-04-21 16:11:49 +05:30
DJ Patel 4751a49a9f [FIX] stock_landed_costs : Fixed the calculation of former cost per unit.
bzr revid: mdi@tinyerp.com-20140421094748-eg9l1yfjwr57ekz6
2014-04-21 15:17:48 +05:30
DJ Patel 7d5b66c526 [REM] stock_landed_costs : Removed the unnecessary code.
bzr revid: mdi@tinyerp.com-20140416054045-3kyrasl4ixtwcpzi
2014-04-16 11:10:45 +05:30
DJ Patel d9b6bcce29 [IMP] stock_landed_costs : Override the copy method in stock valuation adjustments.
bzr revid: mdi@tinyerp.com-20140411131553-tfav54oruj2rsp45
2014-04-11 18:45:53 +05:30
DJ Patel a5ba8f22a9 [IMP] stock_landed_costs : All the fields are readonly in 'open' state.
bzr revid: mdi@tinyerp.com-20140411131028-z5olzn8t9elmy3cm
2014-04-11 18:40:28 +05:30
DJ Patel 1ce2520ed3 [ADD] stock_landed_costs : Added the mechanism to generate accounting entries for landed costs.
bzr revid: mdi@tinyerp.com-20140411125430-dd35oblzmz0onasq
2014-04-11 18:24:30 +05:30
DJ Patel bd665fbada [IMP] stock_landed_costs : If weight and volume is not there, then divide the cost equally among the lines.
bzr revid: mdi@tinyerp.com-20140411094843-o0ravoiyfw9mda0m
2014-04-11 15:18:43 +05:30
DJ Patel 442a73af4e [ADD] stock_landed_costs : Added the mechanism to create valuation line per cost line.
bzr revid: mdi@tinyerp.com-20140411093957-ucna8z1837urzez2
2014-04-11 15:09:57 +05:30
DJ Patel 5e04721db4 [ADD] stock_landed_costs : Added the mechanism to automatically fill the weight and volume on picking onchange.
bzr revid: mdi@tinyerp.com-20140411045437-p6fhz1tgpp9893lh
2014-04-11 10:24:37 +05:30
DJ Patel fb18693a4d [ADD] stock_landed_costs : Added the weight and volume in valuation adjustments.
bzr revid: mdi@tinyerp.com-20140411044608-hn5qm6o5nwahutzq
2014-04-11 10:16:08 +05:30
DJ Patel 63e8f9efc7 [IMP] stock_landed_costs : Improved the onchange on product.
bzr revid: mdi@tinyerp.com-20140410102825-xy44ot6b4fn9pia3
2014-04-10 15:58:25 +05:30
DJ Patel cabc401513 [ADD] stock_landed_costs : Added the functionality to add landed costs in cost of quants.
bzr revid: mdi@tinyerp.com-20140410094933-9w8ch4izzaf1tq01
2014-04-10 15:19:33 +05:30
DJ Patel 66a62da61a [ADD] stock_landed_costs : Added the function to compute former cost per unit.
bzr revid: mdi@tinyerp.com-20140410054901-xhh85tdnom8t5x21
2014-04-10 11:19:01 +05:30
DJ Patel b81d0d0436 [FIX] stock_landed_costs : Fixed the onchange method on product.
bzr revid: mdi@tinyerp.com-20140410053041-227rgrwi9uzyc16w
2014-04-10 11:00:41 +05:30
DJ Patel 62341f2e7e [ADD] stock_landed_costs : Added the logic to compute landed costs.
bzr revid: mdi@tinyerp.com-20140410052146-die56ht7xv0ezooy
2014-04-10 10:51:46 +05:30
DJ Patel babb4debb3 [ADD] stock_landed_costs : Added the button to compute landed cost.
bzr revid: mdi@tinyerp.com-20140409131155-e023ykx0uwkqq9qf
2014-04-09 18:41:55 +05:30
DJ Patel 6cbe02bcbc [REM] stock_landed_costs : Removed the unused fields.
bzr revid: mdi@tinyerp.com-20140409124522-a7i511p0ywnr2wpo
2014-04-09 18:15:22 +05:30
DJ Patel ed605d0f45 [ADD] stock_landed_costs : Added the function to calculate final coston valuation adjustment lines.
bzr revid: mdi@tinyerp.com-20140409093918-mmgbiya5ai993xwv
2014-04-09 15:09:18 +05:30