openerp-community-reviewer team mailing list archive
-
openerp-community-reviewer team
-
Mailing list archive
-
Message #03796
Re: [Merge] lp:~camptocamp/sale-reports/7.0-conditional_discount_print-rde into lp:sale-reports
Review: Needs Fixing code review, no test
Hello,
Thanks for the patch
3 + return group_id in [x.id for x in res_users_obj.browse(
54 + cr,
55 + uid,
56 + uid,
57 + context=context).groups_id]
Just a matter of taste but it is quite ugly and probably a copy paste from original report.
Something like:
groups = res_users_obj.browse(cr, uid, uid, context=context).group_id
return any(x for x in groups if x.id == group_id)
Should be more readable
regards
Nicolas
--
https://code.launchpad.net/~camptocamp/sale-reports/7.0-conditional_discount_print-rde/+merge/206678
Your team OpenERP Community Reviewer/Maintainer is subscribed to branch lp:sale-reports.
References