Tryton - Issues

 

Issue7291

Title Enregistrement filtre
Priority bug Status resolved
Superseder Nosy List camille, ced, nicoe, pokoli, reviewbot, roundup-bot
Type crash Components proteus, tryton, trytond
Assigned To ced Keywords review
Reviews 46341002, 41241002, 44971002
View: 46341002, 41241002, 44971002

Created on 2018-03-29.14:20:36 by camille, last changed by roundup-bot.

Messages
New changeset 6a522789cc38 by Cédric Krier in branch '4.6':
Support Decimal in PYSONEncoder
http://hg.tryton.org/proteus/rev/6a522789cc38

New changeset e1c54351c4ce by Cédric Krier in branch '4.4':
Support Decimal in PYSONEncoder
http://hg.tryton.org/proteus/rev/e1c54351c4ce

New changeset c1bde3f8daaa by Cédric Krier in branch '4.2':
Support Decimal in PYSONEncoder
http://hg.tryton.org/proteus/rev/c1bde3f8daaa

New changeset c39ffc250ce4 by Cédric Krier in branch '4.0':
Support Decimal in PYSONEncoder
http://hg.tryton.org/proteus/rev/c39ffc250ce4

New changeset ffb3d6a953c1 by Cédric Krier in branch '3.8':
Support Decimal in PYSONEncoder
http://hg.tryton.org/proteus/rev/ffb3d6a953c1
New changeset 226754407ca8 by Cédric Krier in branch '4.6':
Support Decimal in PYSONEncoder
http://hg.tryton.org/tryton/rev/226754407ca8

New changeset 95a307468052 by Cédric Krier in branch '4.4':
Support Decimal in PYSONEncoder
http://hg.tryton.org/tryton/rev/95a307468052

New changeset cade78e3ebcd by Cédric Krier in branch '4.2':
Support Decimal in PYSONEncoder
http://hg.tryton.org/tryton/rev/cade78e3ebcd

New changeset fb262948e8bc by Cédric Krier in branch '4.0':
Support Decimal in PYSONEncoder
http://hg.tryton.org/tryton/rev/fb262948e8bc

New changeset 797544a9c498 by Cédric Krier in branch '3.8':
Support Decimal in PYSONEncoder
http://hg.tryton.org/tryton/rev/797544a9c498
New changeset 8c7e39028b25 by Cédric Krier in branch '4.6':
Support Decimal in PYSONEncoder
http://hg.tryton.org/trytond/rev/8c7e39028b25

New changeset 924aa9357072 by Cédric Krier in branch '4.4':
Support Decimal in PYSONEncoder
http://hg.tryton.org/trytond/rev/924aa9357072

New changeset e1eca0c5dc08 by Cédric Krier in branch '4.2':
Support Decimal in PYSONEncoder
http://hg.tryton.org/trytond/rev/e1eca0c5dc08

New changeset 2b0d2429420c by Cédric Krier in branch '4.0':
Support Decimal in PYSONEncoder
http://hg.tryton.org/trytond/rev/2b0d2429420c

New changeset ef095ab0f156 by Cédric Krier in branch '3.8':
Support Decimal in PYSONEncoder
http://hg.tryton.org/trytond/rev/ef095ab0f156
New changeset 287b9db41fba by Cédric Krier in branch 'default':
Support Decimal in PYSONEncoder
http://hg.tryton.org/proteus/rev/287b9db41fba
New changeset b02c5f05e548 by Cédric Krier in branch 'default':
Support Decimal in PYSONEncoder
http://hg.tryton.org/tryton/rev/b02c5f05e548
New changeset 75ca6f7b8cf1 by Cédric Krier in branch 'default':
Support Decimal in PYSONEncoder
http://hg.tryton.org/trytond/rev/75ca6f7b8cf1

New changeset aa4bcaba7e01 by Cédric Krier in branch 'default':
Test Decimal in PYSONEncoder
http://hg.tryton.org/trytond/rev/aa4bcaba7e01
New review44971002 at https://codereview.tryton.org/44971002/#ps1
New review41241002 at https://codereview.tryton.org/41241002/#ps1
New review46341002 at https://codereview.tryton.org/46341002/#ps1
msg40136 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-04-15.00:04:11
Here are review46341002, review41241002 and review44971002
msg40135 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2018-04-14.23:59:11
Indeed it is the pyson Encoder that can not encode Decimal.
I think it should dumps them as float like sao (Javascript) does.
msg39537 (view) Author: [hidden] (nicoe) (Tryton committer) (Tryton translator) Date: 2018-03-29.14:46:06
Camille is having an issue when trying to save a domain such as:

  "Customers": !0 or "Suppliers": !0

I don't know it's tryton version though.
msg39536 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2018-03-29.14:31:48
Could you please report it in english? 

IIUC you have an error when saving a filter. Could you explain which filter are you tring to save (and the type of fields of each field).

Could you please also indicate which tryton version are you using?
msg39535 (view) Author: [hidden] (camille) Date: 2018-03-29.14:20:36
Lorsque je clique sur l'étoile dans la barre de filtre et que j'enregistre un nom (simple en minuscules)
je reçois le message d'erreur :

Traceback (most recent call last):
  File "/home/cam/Tryton/tryton_Cam/local/lib/python2.7/site-packages/tryton/gui/window/view_form/view/screen_container.py", line 467, in icon_press
    common.VIEW_SEARCH.add(model_name, name, domain)
  File "/home/cam/Tryton/tryton_Cam/local/lib/python2.7/site-packages/tryton/common/common.py", line 194, in add
    'domain': PYSONEncoder().encode(domain),
  File "/usr/lib/python2.7/json/encoder.py", line 207, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/usr/lib/python2.7/json/encoder.py", line 270, in iterencode
    return _iterencode(o, 0)
  File "/home/cam/Tryton/tryton_Cam/local/lib/python2.7/site-packages/tryton/pyson.py", line 120, in default
    return super(PYSONEncoder, self).default(obj)
  File "/usr/lib/python2.7/json/encoder.py", line 184, in default
    raise TypeError(repr(o) + " is not JSON serializable")
TypeError: Decimal('0') is not JSON serializable
History
Date User Action Args
2018-04-26 21:11:42roundup-botsetmessages: + msg40411
2018-04-26 21:07:34roundup-botsetmessages: + msg40410
2018-04-26 21:06:52roundup-botsetmessages: + msg40409
2018-04-17 17:59:55roundup-botsetmessages: + msg40199
2018-04-17 17:59:24roundup-botsetmessages: + msg40198
2018-04-17 17:58:44roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg40197
2018-04-15 00:25:34reviewbotsetmessages: + msg40141
2018-04-15 00:25:32reviewbotsetreviews: 46341002, 41241002 -> 46341002, 41241002, 44971002
2018-04-15 00:25:16reviewbotsetmessages: + msg40140
2018-04-15 00:25:14reviewbotsetreviews: 46341002 -> 46341002, 41241002

Showing 10 items. Show all history (warning: this could be VERY long)