Code review comment for lp:~openerp-dev/openobject-addons/trunk-bug-921442-kjo

Revision history for this message
Jigar A. (ifixthat) wrote :

First part of the bug which is "Parsing the rules (base_action_rule) breaks if the regexp or the name of the resource (model) has some non-string char". And Technically it is valid bug, we have reproduced the bug and I am adding step here for the same :

Test case :

- Install Module crm.
- Create 'Automated Action' under Settings/Customization/Automated Actions/Automated Actions for the model crm.lead.
   - Now Supply non-character (e.g. "ààààààà") string under following two field :
   - First field Under Conditions on Model Fields Section, 'Regex on Resource Name '
   - Second field Under Section 'Condition on Communication History' Regular Expression on Case History
- Now, When Automated action with non-character string will be trigger we will have traceback on server saying :
 File "/home/jam/rdtools/addons/trunk-calendar-phase2/base_action_rule/base_action_rule.py", line 372, in do_check
    ptrn = re.compile(str(reg_name))
    UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-6: ordinal not in range(128)
    2012-02-15 05:55:44,278 4176 ERROR ? openerp.netsvc: ascii
    ààààààà
   0
   7
    ordinal not in range(128)
(You can see the Video on Comment#13 on bug post for the same)

Thank You.

« Back to merge proposal