[FIX] {website_,}membership: membership should start the same day of the invoice
This commit is contained in:
parent
b1bd0c6cfa
commit
0cddf87a77
|
@ -231,7 +231,7 @@ class Partner(osv.osv):
|
|||
s = 4
|
||||
if partner_data.member_lines:
|
||||
for mline in partner_data.member_lines:
|
||||
if mline.date_to >= today and mline.date_from < today:
|
||||
if mline.date_to >= today and mline.date_from <= today:
|
||||
if mline.account_invoice_line and mline.account_invoice_line.invoice_id:
|
||||
mstate = mline.account_invoice_line.invoice_id.state
|
||||
if mstate == 'paid':
|
||||
|
|
|
@ -45,7 +45,7 @@ class WebsiteMembership(http.Controller):
|
|||
today = time.strftime(DEFAULT_SERVER_DATE_FORMAT)
|
||||
base_line_domain += [
|
||||
('membership_id', '=', membership_id), ('date_to', '>=', today),
|
||||
('date_from', '<', today), ('state', '=', 'paid')
|
||||
('date_from', '<=', today), ('state', '=', 'paid')
|
||||
]
|
||||
membership = product_obj.browse(cr, uid, membership_id, context=context)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue