Denis Ledoux
adf18765f6
[FIX] base: typo during forward port 0e4216361b
2014-10-22 19:27:00 +02:00
Denis Ledoux
0e4216361b
[MERGE] forward port of branch 7.0 up to 3a0af6a
2014-10-22 19:26:27 +02:00
Martin Trigaux
7705f883d2
[FIX] base: support float rounding with rounding_method=UP (ceiling)
...
Add rounding_method parameter on float_round method to offer
HALF-UP (default, usual round) or UP (ceiling) rounding method.
Use the second method instead of math.ceil() for product
reservations.
For UP, the python math.ceil() method uses "torwards infinity"
rounding method while we want "away from zero".
Therefore we use the absolute value of normalized_value to make
sure than -1.8 is rounded to -2.0 and not -1.
Fixes #1125 #2793
This is a cherry-pick of d4972ff
which was reverted at 333852e
due
to remaining issue with negative values.
2014-10-22 14:28:22 +02:00
Denis Ledoux
39bb45a8ea
[MERGE] forward port of branch 7.0 up to 333852e
2014-09-26 21:32:40 +02:00
Denis Ledoux
333852e19d
Revert "[FIX] product,float_utils: perform ceiling via float_round with new rounding_method UP"
...
This reverts commit d4972ffdb6
.
Seems to break some cases, at least in _product_reserve from stock/stock.py
Actual use case:
SELECT product_uom, sum(product_qty) AS product_qty FROM stock_move WHERE location_dest_id=%s AND location_id<>%s AND product_id=3645 AND state='done' GROUP BY product_uom;
returning 1 | 6
SELECT product_uom,-sum(product_qty) AS product_qty FROM stock_move WHERE location_id=%s AND location_dest_id<>%s AND product_id=%s AND state in ('done', 'assigned') GROUP BY product_uom;
returning 1 | -6
results += cr.dictfetchall()
total = 0.0
results2 = 0.0
for r in results:
amount = uom_obj._compute_qty(cr, uid, r['product_uom'], r['product_qty'], context.get('uom', False))
results2 += amount
total += amount
Total = 1, amount = -5
It should actually be
Total = 0, amount = -6
2014-09-26 21:21:06 +02:00
Denis Ledoux
76067367b2
[MERGE] forward port of branch 7.0 up to 5f6d324
2014-09-25 15:10:37 +02:00
Cedric Snauwaert
d4972ffdb6
[FIX] product,float_utils: perform ceiling via float_round with new rounding_method UP
...
Modified product ceiling() to use float_round() with special mode
for rounding UP (away from zero), avoiding pathological cases where
float representations errors were ceiling to the superior unit.
Also added correspding tests for rounding_method=UP
Fixes issue #1125 , and replaces PR #1126 .
2014-09-24 17:11:25 +02:00
Christophe Simonis
e59aecca94
[MERGE] forward port of branch 7.0 up to revid 5288 mat@openerp.com-20140423150215-578nzug1glccvpwy
...
bzr revid: chs@openerp.com-20140424125338-26k5atvtqwmmfv4e
2014-04-24 14:53:38 +02:00
Denis Ledoux
3298051016
[FIX] base: search groups by full name not working with operators 'in' nor with operand boolean
...
bzr revid: dle@openerp.com-20140416112239-vl20z3xzgp61vygu
2014-04-16 13:22:39 +02:00
Denis Ledoux
05aab83eb1
[MERGE] Forward-port of latest 7.0 bugfixes, up to rev. 9743 revid:qdp-launchpad@openerp.com-20140108160719-9i8xhrat49cn9l5e
...
bzr revid: chs@openerp.com-20140107141524-xzz39a2ym66swr0t
bzr revid: chs@openerp.com-20140107172248-zic9mqg0rigy2czb
bzr revid: chs@openerp.com-20140108160418-ph17jgy5hlejj9hr
bzr revid: dle@openerp.com-20140108171400-8r0fwv3wi36w2im0
2014-01-08 18:14:00 +01:00
Christophe Simonis
7f8b6542f0
[FIX] expression: allow exclusion of records with translated fields
...
lp bug: https://launchpad.net/bugs/1071710 fixed
bzr revid: chs@openerp.com-20140108152722-7f0dpsuv1skxbqub
2014-01-08 16:27:22 +01:00
Christophe Simonis
9675445dee
[FIX] expression: allow exclusion of records with translated fields
...
Manual forwardport of revid 4369 chs@openerp.com-20140107112227-sc1ssd1dw404vcz2 of 6.1 branch
lp bug: https://launchpad.net/bugs/1071710 fixed
bzr revid: chs@openerp.com-20140107130840-igmm8sy03nrm5d5f
2014-01-07 14:08:40 +01:00
Christophe Simonis
6f170ec732
[MERGE] forward port of branch 7.0 up to revid 5006 chs@openerp.com-20130612151912-m19okjsdkjo12qnt
...
bzr revid: chs@openerp.com-20130612152826-j9sj42ten9mic8s0
2013-06-12 17:28:26 +02:00
Olivier Dony
1509011229
[FIX] base: fix o2m testsuite following change of default currency data, in relation with bug 1111298
...
lp bug: https://launchpad.net/bugs/1111298 fixed
bzr revid: odo@openerp.com-20130606090410-4t6o6se18ejbgqmj
2013-06-06 11:04:10 +02:00
Thibault Delavallée
1d5068b63e
[FORWARD] Forward port of server 7.0 until revision 4988
...
bzr revid: tde@openerp.com-20130528102733-bsszxp6nvy8yws3t
2013-05-28 12:27:33 +02:00
Olivier Dony
8d639576f0
[FIX] modify domain evaluation tests to avoid relying on res.currency entries assigned to companies, as demo data was modified for bug 1111298
...
lp bug: https://launchpad.net/bugs/1111298 fixed
bzr revid: odo@openerp.com-20130517141726-67utxubzdflsgsnx
2013-05-17 16:17:26 +02:00
Vo Minh Thu
a51b6912bd
[FIX] safe_eval: better exception handling:
...
- the re-raising of exceptions ignored the "legal" exceptions
(the one used to early abort RPC calls and generate pop-ups)
- re-raising the exception was attempting to re-use the original
exception type but it does not always take only one argument
so it was breaking.
lp bug: https://launchpad.net/bugs/1146256 fixed
bzr revid: vmt@openerp.com-20130320132238-qzo3jptww59ndlch
2013-03-20 14:22:38 +01:00
Antonin Bourguignon
a8a06ee6e4
[IMP] clean and sort up some old test directories
...
bzr revid: abo@openerp.com-20130211160443-2xcw2quaj4a5taz9
2013-02-11 17:04:43 +01:00
Vo Minh Thu
bcefb11482
[FIX] import openerp.tools instead of tools in YML tests.
...
bzr revid: vmt@openerp.com-20130209061700-hi720o5wq4hk0cd3
2013-02-09 07:17:00 +01:00
Antony Lesuisse
2569587c90
Simplify openerp testing, deprecated redondant test declaration, we feed all
...
tests.* modules to unittest2.TestLoader.loadTestsFromModule(module)
bzr revid: al@openerp.com-20121216173856-euntlfi80uzutkp0
2012-12-16 18:38:56 +01:00
Jigar Amin
a1cb39e65c
[MERGE] Sync with trunk
...
bzr revid: jam@tinyerp.com-20121019042856-w7u49cd295i2ilvi
2012-10-19 09:58:56 +05:30
Olivier Dony
361c0acd2a
[FIX] expression: negative operators (e.g. NOT IN) where not working on o2m fields - tests added
...
bzr revid: odo@openerp.com-20121018124750-bkea51a7zkvwwygi
2012-10-18 14:47:50 +02:00
Twinkle Christian (OpenERP)
6404157707
[FIX]remove warning res.partner.address deprecated
...
bzr revid: tch@tinyerp.com-20121010061127-8e27icb0kqzsyoa5
2012-10-10 11:41:27 +05:30
Twinkle Christian (OpenERP)
4eec1b454e
[FIX]remove warning res.partner.address deprecated
...
bzr revid: tch@tinyerp.com-20121010060717-qmelz3oaxitw3laf
2012-10-10 11:37:17 +05:30
Twinkle Christian (OpenERP)
d79f2cb7b8
[FIX]warning:Field res.partner.address is deprecated
...
bzr revid: tch@tinyerp.com-20121008065316-fblbc7ycbhmv0w1s
2012-10-08 12:23:16 +05:30
Jigar Amin - OpenERP
0fc5b454ab
merge lp:openobject-server
...
bzr revid: jam@tinyerp.com-20120822123011-zy2dt7ihl3ragdci
2012-08-22 18:00:11 +05:30
Christophe Simonis
89f1693653
[IMP] remove unwanted log in test
...
bzr revid: chs@openerp.com-20120822110604-il0sxlvf592wasur
2012-08-22 13:06:04 +02:00
Fabien Pinckaers
7290d5880d
fix
...
bzr revid: fp@openerp.com-20120814165750-k2mmj30200jaee3m
2012-08-14 18:57:50 +02:00
Fabien Pinckaers
cf59ee6f43
[IMP] removed categories in tags , fix
...
bzr revid: fp@openerp.com-20120814132952-1t9pocyaxlsoxwt3
2012-08-14 15:29:52 +02:00
Fabien Pinckaers
d9231871b4
[MERGE] demo data
...
bzr revid: fp@tinyerp.com-20120813102950-b1wl11rfcmofna6a
2012-08-13 12:29:50 +02:00
Quentin (OpenERP)
1e0516784e
[IMP] base: res_partner_categories have to be singular
...
bzr revid: qdp-launchpad@openerp.com-20120723154449-59sg79lqoyrm17b5
2012-07-23 17:44:49 +02:00
Rucha (Open ERP)
e7e5403143
[IMP]: base: Improved test instead of test result in yml
...
bzr revid: rpa@tinyerp.com-20120719105733-dbcfv9mk0i7k2i5d
2012-07-19 16:27:33 +05:30
Rucha (Open ERP)
efe832edf5
[FIX]: base: Fixed commented yml for ilike osv expressions
...
bzr revid: rpa@tinyerp.com-20120716115416-7klqfcen79mg6j32
2012-07-16 17:24:16 +05:30
Rucha (Open ERP)
78f1deb959
[FIX]: Fixed yml test cases based on new demo changes
...
bzr revid: rpa@tinyerp.com-20120712072417-dmhisnypo4t2r45i
2012-07-12 12:54:17 +05:30
Pinakin Nayi (OpenERP)
fbd5d24aaa
[IMP]server-log-warning
...
bzr revid: pna@tinyerp.com-20120704091845-sox7tsm9pjpqn812
2012-07-04 14:48:45 +05:30
Rucha (Open ERP)
85433ad8de
[IMP,REM]: base: Improved demo partner names and xml_id, Removed some unwanted partners
...
bzr revid: rpa@tinyerp.com-20120620120220-46viljmbforn9ag6
2012-06-20 17:32:20 +05:30
Rucha (Open ERP)
d9d5836e29
[FIX]: base: fixed error in test
...
bzr revid: rpa@tinyerp.com-20120619111304-5xa0i1msosmfxc4a
2012-06-19 16:43:04 +05:30
Quentin (OpenERP)
ca7b265e9e
[REV] base, test_osv_expression: put back the tests that were removed for no reason and replaced the reference to the field 'address' by 'child_ids'
...
bzr revid: qdp-launchpad@openerp.com-20120319111357-nuy2abv4far32h1k
2012-03-19 12:13:57 +01:00
Bhumika (OpenERP)
54a39bc87d
[MERGE] Merge with lp:openobject-server
...
bzr revid: sbh@tinyerp.com-20120306083420-r2br7skl91w78ueo
2012-03-06 14:04:20 +05:30
Vo Minh Thu
6323111950
[IMP] tests:
...
- moved a few YAML tests to unittest2 for demonstration purpose
- changed --test-disable to --test-enable (and swapped its meaning)
bzr revid: vmt@openerp.com-20120301134608-szuktuj8imdhmn0r
2012-03-01 14:46:08 +01:00
Kuldeep Joshi (OpenERP)
0d6c14fec4
[IMP] res_partner: set parent_id field
...
bzr revid: kjo@tinyerp.com-20120220104430-x2sc8ivxa9pi7ikk
2012-02-20 16:14:30 +05:30
Kuldeep Joshi (OpenERP)
93960634c1
[IMP] res_partner:add res_partner_address field to res_partner
...
bzr revid: kjo@tinyerp.com-20120220091705-y7xdh00sdkotpqj6
2012-02-20 14:47:05 +05:30
Olivier Dony
5c5a5b94fc
[IMP] ir.values: add (breaking) testcase for conditional defaults, currently misbehaving
...
bzr revid: odo@openerp.com-20120209130526-b6rg5qlf07sucafq
2012-02-09 14:05:26 +01:00
Vo Minh Thu
4d77130107
[IMP] tools: removed literal_eval as we drop python 2.6 support.
...
bzr revid: vmt@openerp.com-20120118112400-n7uulbbwm7wr5lpu
2012-01-18 12:24:00 +01:00
Olivier Dony
e410b81cc4
[FIX] fields.float: always round floats when persisting
...
Added test to try a full round-trip to
the database as well to make sure the
automatic rounding is working properly.
lp bug: https://launchpad.net/bugs/882036 fixed
bzr revid: odo@openerp.com-20111221011100-gybt9pjdfpg4wc86
2011-12-21 02:11:00 +01:00
Olivier Dony
759ccd9845
[IMP] float_utils: simplified code, added float_repr
...
lp bug: https://launchpad.net/bugs/882036 fixed
bzr revid: odo@openerp.com-20111220234740-kotcgoz3opcbkx4b
2011-12-21 00:47:40 +01:00
Olivier Dony
ed53ef4761
[IMP] float_utils: fix HALF_UP rounding according to discussions on bug 882036
...
Also improved test and added warning logging when
crossing the precision limit due to too many
significant digits. There is apparently a limitation
in Python's float implementation for this.
bzr revid: odo@openerp.com-20111220163420-lz0sh1h0yjkh6jdc
2011-12-20 17:34:20 +01:00
Olivier Dony
ba2b2bdae1
[IMP] tools.float_*: more tests with negative values, some cleanup
...
bzr revid: odo@openerp.com-20111115113605-l5e6gg675qbrvjz6
2011-11-15 12:36:05 +01:00
Olivier Dony
ffe640cece
[IMP] tools.float_*: added tests and docstrings
...
bzr revid: odo@openerp.com-20111114182310-kkzh78uej0uuwhaz
2011-11-14 19:23:10 +01:00
Olivier Dony
4140e3546a
[FIX] expression: proper handling of empty string in m2o domain criterions
...
Also fixed incorrect name_search() implementations in
res.partner and res.currency, and added corresponding
tests.
lp bug: https://launchpad.net/bugs/861350 fixed
bzr revid: odo@openerp.com-20111011163435-szj9vm6x9x8nryn8
2011-10-11 18:34:35 +02:00