Commit Graph

47 Commits

Author SHA1 Message Date
Nicolas Martinelli bb90e55fb5 [FIX] product_visible_discount: corrected price
This applies the commits 503820a and f26b94fd (and their subsequent
corrections) to the calculation of the discount. Indeed, the calculation
of the discount must take into account the corrected price, otherwise
the discount is wrongly computed.

opw-656604
2015-11-25 16:00:13 +01:00
Goffin Simon 661f76c94a [FIX] product_visible_discount: discount computation
The new_list_price(subtotal) variable must be computed with the currency set on
the price_type of the price_list rule applied.

opw:630039
2015-05-13 09:09:57 +02:00
David Monjoie ac6d67a395 [FIX] product_visible_discount: display full unit price only when the discount column is displayed
Without this, the unit price is visually set to full, the discount column is not visible, but the actual price used in computation is the discounted price, very misleading !
2014-11-03 09:09:53 +01:00
Christophe Simonis 8e637bac92 [MERGE] forward port of branch saas-3 up to 21b1203 2014-10-29 19:33:02 +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 fcc59f12fc [FIX] product_visible_discount: use on_change result for product value
At the end of the onchange call product_id_change, the uom may have changed (e.g. if product in different category).
To compute the quantity, we need to use the new uom and not the first one (that may be Unit, default value)
2014-10-27 13:59:41 +01:00
Martin Trigaux 9f5e989d5d Forward port of branch 7.0 up to 42bf0a5 2014-10-27 11:21:41 +01:00
Martin Trigaux 42bf0a5670 [FIX] product_visible_discount: discount with different unit of measures
The computation of the price without pricelist should take care of the unit of measure.
e.g. if computing discount for objects in dozen (on a product with price in unit), returned unit price should be (price*12) where 12 is the factor to go from dozen to unit.
Otherwise the compared prices (with and without pricelist) would not use the same unit of measure and the comparaison would be inconsistent. (opw 599727)
2014-10-24 17:21:42 +02:00
David Monjoie 2cde5596b9 [FIX] product_visible_discount: fix display of unit price according to rule base price like in 7.0 as requested by gab 2014-10-15 15:46:28 +02:00
Christophe Simonis 8046b7367d [MERGE] forward port of branch saas-5 up to 7e117b1 2014-08-28 16:51:11 +02:00
Christophe Simonis ada9724655 [MERGE] forward port of branch 7.0 up to 3509e15 2014-08-28 16:12:55 +02:00
Daniel Dico 180c4734a6 [FIX] product_visible_discount: use order date to compute currency instead of current date 2014-08-25 17:53:47 +02:00
Olivier Dony d706adba11 [MERGE] Forward-port saas-5 up to 37ba23d 2014-08-04 01:44:30 +02:00
Olivier Dony b6acdc4a74 [MERGE] Forward-port 7.0 up to 2493395 2014-08-04 01:36:31 +02:00
Olivier Dony 2493395962 [FIX] product_visible_discount: no crash when no pricelist passed or product without company
Fixes an error introduced in f6fb2b6
2014-08-04 01:31:44 +02:00
Olivier Dony 37ba23d553 [FIX] product_visible_discount: no crash when no pricelist passed or product without company
Fixes an error introduced in f6fb2b6
2014-08-02 04:01:13 +02:00
Olivier Dony 5a0a500994 [MERGE] Forward-port 7.0 up to 9411a2da 2014-08-01 23:01:57 +02:00
Martin Trigaux f6fb2b69df [FIX] product_visible_discount: multicurrency pricelists
When we compute the discount of a product to display (result of product_id_change), we compare prices in the currency of the product while we expect prices in the currency of the pricelist. opw 606188
2014-08-01 15:48:24 +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
Fabien Pinckaers 66e85ee1e0 [IMP] Product visible discount: discount is expressed based in Public Price
bzr revid: fp@tinyerp.com-20131209142203-20l555dfdyvb60xe
2013-12-09 15:22:03 +01:00
Olivier Dony 44664076da [MERGE] Forward-port of latest 7.0 fixes up to rev 9618 rev-id: dle@openerp.com-20131120142131-s333lyva85cyn41o
bzr revid: odo@openerp.com-20131120144059-yyh7emvgdarff09b
bzr revid: odo@openerp.com-20131120144318-11nmn1zj00zmi10z
2013-11-20 15:43:18 +01:00
Martin Trigaux d2042182b4 [FIX] product_visible_discount: don't compute negative discount, also prevent zero division
bzr revid: mat@openerp.com-20131023132646-8l760d4swsq42zzo
2013-10-23 15:26:46 +02:00
Martin Trigaux 80e142cca3 [FIX] product_visible_discount: don't change the behaviour of account.invoice to be consistent with the normal behaviour (don't use pricelists)
bzr revid: mat@openerp.com-20131023114233-74rtyy5vdsdcy4cl
2013-10-23 13:42:33 +02:00
Ravish (Open ERP) a98bd87122 [FIX] unit_price should be on other_pricelist
bzr revid: rmu@tinyerp.com-20131014100746-inm1snk2hgdc7i98
2013-10-14 15:37:46 +05:30
Christophe Simonis 6a9adbca62 [MERGE] forward port of branch 7.0 up to revid 9236 mat@openerp.com-20130613160953-itt79mu5xrl7suv4
bzr revid: chs@openerp.com-20130613181503-82234mo34wxb0oap
2013-06-13 20:15:03 +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
Ravi Gohil (OpenERP) e01cf4614a [FIX] pass 'uom_id' argument to product_id_change() to avoid traceback which is faced when we create invoice from Sale Orders with option 'Percentage' or 'Fixed Price (deposit)': (Maintenance Case: 584499)
bzr revid: rgo@tinyerp.com-20130125070952-v9fuss7htkl9ilnb
2013-01-25 12:39:52 +05:30
Ravi Gohil (OpenERP) 6ad3f2c835 [FIX] pass 'uom_id' argument to product_id_change() to avoid traceback which is faced when we create invoice from Sale Orders with option 'Percentage' or 'Fixed Price (deposit)': (Maintenance Case: 584499)
bzr revid: rgo@tinyerp.com-20130125063213-2u08rex66cmtt9o1
2013-01-25 12:02:13 +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
Sanjay Gohel (Open ERP) 6239433a00 [IMP]improve code
bzr revid: sgo@tinyerp.com-20121023053412-gpoxqj3jp55m65wu
2012-10-23 11:04:12 +05:30
Quentin (OpenERP) 3f698109a5 [MERGE] less direct call to product template objects: it's better to access them via product.product in case that field is moved there to manage variants. Courtesy of Alexis de Lattre, Akretion
bzr revid: qdp-launchpad@openerp.com-20120711084935-pnay2fm9wc0h3dwq
2012-07-11 10:49:35 +02:00
Alexis de Lattre 36cb6f479a Use product.product instead of product.template when we go through the ORM.
In this process, I re-wrote the fonction change_product_qty_send_note in stock/wizard/stock_change_product_qty.py : the code is now much better !

bzr revid: alexis@via.ecp.fr-20120709162124-jmqv7hrl94fbzk1j
2012-07-09 18:21:24 +02:00
Kuldeep Joshi (OpenERP) 8037caeead [IMP]product_visible_discount: remove address_invoice_id field
bzr revid: kjo@tinyerp.com-20120306113258-y06w371pqo74j6ph
2012-03-06 17:02:58 +05:30
Thibault Delavallée dae57e7b4e [MERGE] product_visible_discount: fixed bug 912953: added company_id argument to product_id_change method
bzr revid: tde@openerp.com-20120110125854-eim1n3eeng6k8ips
2012-01-10 13:58:54 +01:00
Mayur Maheshwari (OpenERP) 0ae41592cd [FIX]product_visible_discount: add a company in product_id_change method
lp bug: https://launchpad.net/bugs/912953 fixed

bzr revid: mma@tinyerp.com-20120110113625-j57286pylpidtfnr
2012-01-10 17:06:25 +05:30
fp 8aff5209ea [IMP] improved error message, constraints must allways propose a solution
bzr revid: fp@fp-laptop-20111231075720-4kak7o320td4wxqc
2011-12-31 08:57:20 +01:00
Ujjvala Collins (OpenERP) a5ca2b0eb7 [FIX] product_visible_discount: Fixed missing argument while calling super method.
lp bug: https://launchpad.net/bugs/809491 fixed

bzr revid: uco@tinyerp.com-20110912091630-3sqpotrixlt7wc96
2011-09-12 14:46:30 +05:30
Ujjvala Collins (OpenERP) e84d292ceb [IMP] sale: Improved code by adding context argument wherever required.
* product_visible_discount, warning: Added remaining context argument on product_id_change method.

bzr revid: uco@tinyerp.com-20110718095344-tdlsys7uueqp9kdy
2011-07-18 15:23:44 +05:30
Sbh (OpenERP) d5d18ea957 [Fix] fix buildbot warning
bzr revid: sbh@tinyerp.com-20110127105333-ufjh65jmz21uzdsu
2011-01-27 16:23:33 +05:30
Harry (OpenERP) ee2b1b8aa9 [FIX] backport product_visible_discout fix from stable/6.0 at rev#4350
bzr revid: hmo@tinyerp.com-20110125095111-9ke4m8tq8g3tvyul
2011-01-25 15:21:11 +05:30
uco (OpenERP) b1cf433ecc [MERGE]: Merged with trunk-addons.
bzr revid: uco@tinyerp.com-20101206131102-z2xzz8eshkswo00q
2010-12-06 18:41:02 +05:30
uco (OpenERP) 12fcd1be2f [IMP] : Added context=None on methods used for _constraints and replaced context={} with context=None.
bzr revid: uco@tinyerp.com-20101119134801-974ev29j4tu46pq2
2010-11-19 19:18:01 +05:30
rpa (Open ERP) af3c12649e [MERGE]: Merge with lp:openobject-addons
bzr revid: rpa@tinyerp.com-20101115062357-ergodyxlts4o8sek
2010-11-15 11:53:57 +05:30
rpa (Open ERP) 95124a4a3f [FIX]: product_visible_discount: Fixed computation of discount
lp bug: https://launchpad.net/bugs/667558 fixed

bzr revid: rpa@tinyerp.com-20101103123855-tqtml3aggrxu9fka
2010-11-03 18:08:55 +05:30
uco (OpenERP) eccc1d33b2 [REF] copyrights: Replaced 'GNU General Public License' with 'GNU Affero General Public License'
bzr revid: uco@tinyerp.com-20101028065418-ahi6poaxn1aa5dmp
2010-10-28 12:24:18 +05:30
Harry (OpenERP) c178f70944 [MERGE]
bzr revid: hmo@tinyerp.com-20100817062757-0pyn7a54etz2pk0j
2010-08-17 11:57:57 +05:30
MTR(OpenERP) d781b93335 [IMP] product_margin, product_expiry,product_manufacturer: improve and cleaning
bzr revid: mra@mra-laptop-20100813072843-l72opp20yoiik3pg
2010-08-13 12:58:43 +05:30