X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=remembership.py;h=1c394ad50d1edc930881e4e267c68443e6b547fc;hb=6c7ada6035639f9c23e04906308b03081557a015;hp=25aa5fb5c24c653ec5492aab646595dfc1404b16;hpb=bb3e7e2979f7eaeddcf5c8460cea3b521cb3f910;p=burette%2Fremembership.git diff --git a/remembership.py b/remembership.py index 25aa5fb..1c394ad 100644 --- a/remembership.py +++ b/remembership.py @@ -315,7 +315,7 @@ class account_invoice_line(osv.osv): and context['date_from'] and datetime.strptime(context['date_from'], "%Y-%m-%d") or date.today()) - date_to = date_from + relativedelta(months = +12) # TODO: parameterize this delta? + date_to = date_from + relativedelta(days = +364) # TODO: parameterize this delta? date_from = date_from.strftime("%Y-%m-%d") date_to = date_to .strftime("%Y-%m-%d") print ("DEV: [create] date_from: %s" % str(date_from)) @@ -351,22 +351,4 @@ class account_invoice_line(osv.osv): return res account_invoice_line() - - -class pos_make_payment(osv.osv_memory): - _inherit = 'pos.make.payment' - - def check(self, cr, uid, ids, context=None): - """ - Auto invoice orders. Temporarly solution before make partner members just with orders, without invoice. - """ - res = super(pos_make_payment, self).check(cr, uid, ids, context=context) - - order_obj = self.pool.get('pos.order') - order_obj.action_invoice(cr, uid, ids, context=context) - - return res - -pos_make_payment() - # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: