Commit Graph

59 Commits

Author SHA1 Message Date
Joren Van Onder 49407e46cb
[FIX] sale_margin: convert standard_price to SO currency before using 2017-07-07 16:01:36 -07:00
Goffin Simon 9481ee5c2f [FIX] sale_margin: Cost price in a SO line
The margin in a SO line is the difference between the price unit and
the cost price of this SO line. In function "_product_margin" in model
"sale.order.line", the cost price is equal to the purchase_price or
the standard_price of the product. Then the cost price in the SO line
must be set with the same value when creating SO line linked to the delivery.

opw:668090
2016-02-01 13:29:25 +01:00
Goffin Simon a90b94f291 [FIX] sale_margin: product margin
The product margin computed on each line of a sale order must be
rounded according to the currency of the order pricelist.
Inspired from the field 'price_subtotal' in addons/sale/sale.py
2015-04-27 15:38:01 +02:00
Guewen Baconnier 3a314780c0 [FIX] sale_*, delivery: more consistent ignore of cancelled SO lines
Sales Order lines have a cancelled state, but this state is not
always considered when looping over lines. This check is
done in some places already and this patch's aim is to do it in the
remaining places.

- Cancel the procurement of a sale line in sale.order.line
instead of sale.order, so a line canceled individually with
sale_order_line.button_cancel will properly cancel it
procurement.
- Sale report: uses the state of lines instead of Sales order,
so canceled lines of not-canceled orders are correctly represented
in the analysis.
- test: do not create invoices lines for canceled sale lines
- test: creation of moves with canceled lines
- test: check if lines are still canceled when sale order is done

Closes #6036
2015-04-24 17:29:51 +02:00
Goffin Simon 0d74dce709 [FIX] sale_margin: sale margin accuracy
Unit Price, Cost Price and Margin must have the same accuracy.

opw:632511
2015-04-24 09:08:53 +02:00
Christophe Simonis 2ffbb5f93d [MERGE] forward port of branch 7.0 up to d246e36 2015-04-14 11:40:23 +02:00
Nicolas Martinelli d246e36c82 Revert commit "[FIX] sale_margin: purchase price calculated using the currency of the price type"
Reasons:
- the currency conversion is done assuming that the cost price currency is the company currency
- we support only one price type per field. Defining several price types on the same field using
  different price types is not supported.
2015-04-13 19:09:20 +02:00
Christophe Simonis d3e7a8ef5e [MERGE] forward port of branch 7.0 up to 856bc6f 2015-04-10 18:24:46 +02:00
Nicolas Martinelli 7b7b0d148a [FIX] sale_margin: purchase price calculated using the currency of the price type
When the margin is calculated, the purchase price is calculated using the currency of the price
type 'standard_price' instead of the currency of the company, since they can be different.
opw: 631884
2015-04-09 08:20:36 +02:00
Denis Ledoux 162eb84438 [MERGE] forward port of branch 7.0 up to f46fa1d 2014-12-12 15:44:44 +01:00
Denis Ledoux f46fa1d026 [FIX] sale_margin: margin handle included taxes for sale
Another fix should probably be build for purchase price, but it isn't that easy, we need to know the partner to which the product has been purchased, as taxes are partner/country dependent.

Besides, included taxes in purchase prices happen less often.
2014-12-12 15:41:37 +01:00
Denis Ledoux 117d0d0ca2 [FIX] sale_margin: stored field functions cannot trigger other stored field functions
the update of sale.order margin field was trigger with the margin stored field of sale.order.line: This cannot work with the old api
2014-11-27 12:06:19 +01:00
Denis Ledoux a6024a6376 [MERGE] forward port of branch 7.0 up to 00ec786 2014-10-28 13:40:17 +01:00
Martin Trigaux 79787084ff [FIX] sale_margin: cost price uom
When computing the cost price to display, take the uom into account. The cost of 1 Unit or 1 dozen should not be the same. opw 599727
2014-10-27 18:09:46 +01:00
Christophe Simonis ada9724655 [MERGE] forward port of branch 7.0 up to 3509e15 2014-08-28 16:12:55 +02:00
Daniel Dico f880d89cc4 [FIX] sale_order_line: use order date to compute currency instead of current date 2014-08-25 18:04:43 +02:00
Vo Minh Thu e69326ee3b [REF] removed explicit model instanciations.
bzr revid: vmt@openerp.com-20130415102349-vgcrfok2k5y10cwz
2013-04-15 12:23:49 +02:00
Olivier Dony 7aba2e01f9 [MERGE] sale_margin: functions passed to store triggers cannot use inheritance, courtesy of Serpent Consulting Services
bzr revid: odo@openerp.com-20121219012510-m04yzgxnw9yzwtqc
2012-12-19 02:25:10 +01:00
Serpent Consulting Services 12b699150c [FIX] sale_margin : function _get_order cannot use super call
lp bug: https://launchpad.net/bugs/1090931 fixed

bzr revid: support@serpentcs.com-20121216182700-63fzj4wi6d49kz1d
2012-12-16 23:57:00 +05:30
Vo Minh Thu e7f4891d46 [IMP] use the openerp namespace.
bzr revid: vmt@openerp.com-20121206145632-0h1coh5aaem65wsy
2012-12-06 15:56:32 +01:00
Twinkle Christian (OpenERP) 3fa45da187 [IMP]Improve tooltip in Quatation
bzr revid: tch@tinyerp.com-20121023120415-b3eo9x5248hr6n7i
2012-10-23 17:34:15 +05:30
Amit (OpenERP) 405f134bd3 [FIX] sale_margin : correction on super method parameter
lp bug: https://launchpad.net/bugs/1003948 fixed

bzr revid: amp@tinyerp.com-20120525064709-a918ieuh4zb298zo
2012-05-25 12:17:09 +05:30
Fabien Pinckaers baa7727d45 [FIX] remove sale_margin unused and bugged code
bzr revid: fp@tinyerp.com-20111111082808-eox3s26qeaz6nm7p
2011-11-11 09:28:08 +01:00
fp b698ba6e29 merge
bzr revid: fp@fp-laptop-20110917173827-8ccsfwycvelvh4bi
2011-09-17 19:38:27 +02:00
fp 8ffc7eb773 merge
bzr revid: fp@fp-laptop-20110917161906-rae6djau18h6stmq
2011-09-17 18:19:06 +02:00
Fabien Pinckaers e3f1cc6b91 merge
bzr revid: fp@tinyerp.com-20110917103657-h1nna1mrxb5z9zwf
2011-09-17 12:36:57 +02:00
Meera Trambadia (OpenERP) fc735d0c78 [MERGE] branch merged with lp:openobject-addons
bzr revid: mtr@tinyerp.com-20110916045926-x2460x1rlas7bdq7
2011-09-16 10:29:26 +05:30
Bharat (OpenERP) d36f018b00 [IMP] Added context in super method as well
bzr revid: bde@tinyerp.com-20110718050528-0r9rseh3w2inr71d
2011-07-18 10:35:28 +05:30
Amit Parik f6b3aa31e0 [FIX] sale : Improved the product_id_change method in sale_margin.py
lp bug: https://launchpad.net/bugs/809751 fixed

bzr revid: bde@tinyerp.com-20110713111231-novysjd1bldn6bv3
2011-07-13 16:42:31 +05:30
Olivier Dony 06fb14130a [IMP] removed method=True params from all fields.function
Server revision 3495 odo@openerp.com-20110701232328-flgxulxva70vnyxr
removed the need for passing method=True to function fields,
so this is the equivalent addons fix, removing it everywhere.
Please be careful from now on, and do not pass it anymore!

bzr revid: odo@openerp.com-20110701234124-a61zl0idvdfz3hyb
2011-07-02 01:41:24 +02:00
mtr c917b92b5c [IMP] sale_margin: improved code for checking the condition
bzr revid: mtr@mtr-20110701115621-2nc8uu9gxitdrcok
2011-07-01 17:26:21 +05:30
mtr 765e5bb5fc [IMP] sale_margin: improved code to check the condition before calculating the Cost Price
bzr revid: mtr@mtr-20110701113311-3jdav34yu1s3cd02
2011-07-01 17:03:11 +05:30
mtr baafca3403 [FIX] sale_margin:-to calculate the Cost Price it now takes the pricelist from Sales Order
lp bug: https://launchpad.net/bugs/800721 fixed

bzr revid: mtr@mtr-20110701085324-2t30i3x1d0yoh6vi
2011-07-01 14:23:24 +05:30
Olivier Dony 560915cb68 [MERGE] merged latest fixes from 6.0 up to r.4556
Rev 4556 = revision-id: jvo@tinyerp.com-20110502133745-s1zyed65h6ojwkvk.

bzr revid: odo@openerp.com-20110502184643-d3qzosqdurscd51i
2011-05-02 20:46:43 +02:00
Tejas (OpenERP) 3bccbb1c12 FIX : sale_margin, wrong invoice type was set , improved the code
bzr revid: tta@openerp.com-20110414111033-22q08b79c7fvmyvb
2011-04-14 16:40:33 +05:30
Quentin (OpenERP) 206952d86e [FIX] adapted the fix of bug lp:715470 to use properly the store feature
lp bug: https://launchpad.net/bugs/715470 fixed

bzr revid: qdp-launchpad@openerp.com-20110310144522-tcx99kf8cdjuwpwi
2011-03-10 15:45:22 +01:00
ARA (OpenERP) fc58602369 [FIX] sale_margin: sale margin module : wrong computation
bzr revid: ara@tinyerp.com-20110225132010-iox9poe0eptdbynr
2011-02-25 18:50:10 +05:30
ARA (OpenERP) 8c4be231cc [FIX] sale_margin: sale margin module : wrong computation
lp bug: https://launchpad.net/bugs/715470 fixed

bzr revid: ara@tinyerp.com-20110225123901-d5jn5p87blk73ksj
2011-02-25 18:09:01 +05:30
pso f32adf267a [FIX] sale_marging: Calculated cost price as per pricelist
lp bug: https://launchpad.net/bugs/689924 fixed

bzr revid: pso@tinyerp.com-20101221102410-lylp224ghp45qkpi
2010-12-21 15:54:10 +05:30
pso 96c353e309 [IMP] sale_margin: Code reverted
bzr revid: pso@tinyerp.com-20101221094204-8kdgkgmtr7d886zd
2010-12-21 15:12:04 +05:30
pso 69c31f245b [FIX] sale_marging: Calculated cost price as per pricelist
lp bug: https://launchpad.net/bugs/689924 fixed

bzr revid: pso@tinyerp.com-20101221085107-rbq0875kpzivi6wg
2010-12-21 14:21:07 +05:30
Mustufa Rangwala b0f61a9546 [MERGE] merge from trunk addons
bzr revid: mra@mra-laptop-20101214130232-wqsim6966u1hilu9
bzr revid: mra@mra-laptop-20101217043732-ri8dfx38pacpruye
2010-12-17 10:07:32 +05:30
qdp-launchpad@tinyerp.com 10868c2eb5 [IMP] sale_margin: replaced tabs with 4 spaces in view and removed the button 'create invoice' in order to reuse the one defined in the first tab
bzr revid: qdp-launchpad@tinyerp.com-20101216163025-x1rbfsd4bcrxgdu9
2010-12-16 17:30:25 +01:00
Mustufa Rangwala 7b390b3c81 [FIX] Sale_*: Misc improvements (tooltips,strings...etc)
lp bug: https://launchpad.net/bugs/687463 fixed

bzr revid: mra@mra-laptop-20101213060723-3yvidr2b3x9n4q6n
2010-12-13 11:37:23 +05:30
P. Christeas 7c5d0e6aba delivery, purchase, sale, stock_location: minor fixes, mutable args
bzr revid: p_christ@hol.gr-20101127201616-fq46x1c2uo7s7b62
2010-11-27 22:16:16 +02:00
uco (OpenERP) 6dd290e824 [REF]: Replace the condition 'if not context' with 'if context is None'.
bzr revid: uco@tinyerp.com-20101123070505-9i2lrqhgxzaii3zn
2010-11-23 12:35:05 +05:30
uco (OpenERP) 8035df3e11 [IMP]: Added context=None in function argument for rest modules.
bzr revid: uco@tinyerp.com-20101122103753-idv9fdaqc28rvugu
2010-11-22 16:07:53 +05:30
pso e54dbddd67 [IMP] sale modules : Cleaning modules
bzr revid: pso@tinyerp.com-20101025092424-h4ovhk9oidooby4j
2010-10-25 14:54:24 +05:30
pso 471572043d [IMP] sale modules: Cleaning modules
bzr revid: pso@tinyerp.com-20101022072346-ud8khvwiwhcjpcga
2010-10-22 12:53:46 +05:30
vth cc93971022 [REF] sale
bzr revid: vth@tinyerp.com-20101015121122-qj7pv8rcd0jg81rr
2010-10-15 17:41:22 +05:30