Comment 15 for bug 921442

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

Hello,

Their are two points proposed in this bug as per Comment #7 by Jignesh Rathod.

So We have tested the 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 for the same)

SO the Merge Proposal Given by Kuldeep Joshi(OpenERP) at Comment#8, Fixes the First Part of Bug,
MP Link : https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-921442-kjo/+merge/92248.

About second Part we do not any case which produce bug.
So I request Community Team to take Appropriate Decision for the Second Part of the Bug.
Update me If I am wrong.

Thank You.