Merge lp:~yann-papouin/openobject-addons/6.1-bug-1094315-saleorder-requested-date into lp:openobject-addons/6.1

Proposed by Yann Papouin
Status: Needs review
Proposed branch: lp:~yann-papouin/openobject-addons/6.1-bug-1094315-saleorder-requested-date
Merge into: lp:openobject-addons/6.1
Diff against target: 16 lines (+6/-0)
1 file modified
sale_order_dates/sale_order_dates.py (+6/-0)
To merge this branch: bzr merge lp:~yann-papouin/openobject-addons/6.1-bug-1094315-saleorder-requested-date
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+184762@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

7246. By Yann Papouin

Make the requested_date field usefull fot its module

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sale_order_dates/sale_order_dates.py'
2--- sale_order_dates/sale_order_dates.py 2011-07-01 23:41:24 +0000
3+++ sale_order_dates/sale_order_dates.py 2013-09-10 12:23:16 +0000
4@@ -26,6 +26,12 @@
5
6 class sale_order_dates(osv.osv):
7 _inherit = 'sale.order'
8+
9+ def _get_date_planned(self, cr, uid, order, line, start_date, context=None):
10+ result = super(sale_order, self)._get_date_planned(cr, uid, order, line, start_date, context=context)
11+ if order.requested_date and (order.requested_date > result):
12+ result = order.requested_date
13+ return result
14
15 def _get_effective_date(self, cr, uid, ids, name, arg, context=None):
16 res = {}