Merge lp:~openerp-dev/openobject-addons/saas-3-removed-domain-warning-mme into lp:~openerp/openobject-addons/saas-3

Proposed by Mehul Mehta(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/saas-3-removed-domain-warning-mme
Merge into: lp:~openerp/openobject-addons/saas-3
Diff against target: 12 lines (+1/-1)
1 file modified
sale_crm/sale_crm.py (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/saas-3-removed-domain-warning-mme
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+212093@code.launchpad.net

Description of the change

Hello,

    Resolved the Warning
      [Warning] The domain term '('state', '=', ['draft'])' should use the 'in' or 'not in' operator.

Thanks,
Mehul Mehta(mme)

To post a comment you must log in.

Unmerged revisions

9331. By Mehul Mehta(OpenERP)

[FIX] Warning: The domain term '('state', '=', ['draft'])' should use

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'sale_crm/sale_crm.py'
--- sale_crm/sale_crm.py 2013-12-18 15:57:15 +0000
+++ sale_crm/sale_crm.py 2014-03-21 06:34:34 +0000
@@ -76,7 +76,7 @@
76 date_end = month_begin.replace(day=calendar.monthrange(month_begin.year, month_begin.month)[1]).strftime(tools.DEFAULT_SERVER_DATE_FORMAT)76 date_end = month_begin.replace(day=calendar.monthrange(month_begin.year, month_begin.month)[1]).strftime(tools.DEFAULT_SERVER_DATE_FORMAT)
77 for id in ids:77 for id in ids:
78 res[id] = dict()78 res[id] = dict()
79 created_domain = [('section_id', '=', id), ('state', '=', ['draft']), ('date_order', '>=', date_begin), ('date_order', '<=', date_end)]79 created_domain = [('section_id', '=', id), ('state', '=', 'draft'), ('date_order', '>=', date_begin), ('date_order', '<=', date_end)]
80 res[id]['monthly_quoted'] = self.__get_bar_values(cr, uid, obj, created_domain, ['amount_total', 'date_order'], 'amount_total', 'date_order', context=context)80 res[id]['monthly_quoted'] = self.__get_bar_values(cr, uid, obj, created_domain, ['amount_total', 'date_order'], 'amount_total', 'date_order', context=context)
81 validated_domain = [('section_id', '=', id), ('state', 'not in', ['draft', 'sent', 'cancel']), ('date_order', '>=', date_begin), ('date_order', '<=', date_end)]81 validated_domain = [('section_id', '=', id), ('state', 'not in', ['draft', 'sent', 'cancel']), ('date_order', '>=', date_begin), ('date_order', '<=', date_end)]
82 res[id]['monthly_confirmed'] = self.__get_bar_values(cr, uid, obj, validated_domain, ['amount_total', 'date_order'], 'amount_total', 'date_order', context=context)82 res[id]['monthly_confirmed'] = self.__get_bar_values(cr, uid, obj, validated_domain, ['amount_total', 'date_order'], 'amount_total', 'date_order', context=context)

Subscribers

People subscribed via source and target branches